<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>Matrix ^ ZZ -- power</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___Matrix_sp_us_sp__Array.html">next</a> | <a href="___Matrix_sp^_sp__List.html">previous</a> | <a href="___Matrix_sp_us_sp__Array.html">forward</a> | <a href="___Matrix_sp^_sp__List.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>Matrix ^ ZZ -- power</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>f^n</tt></div> </dd></dl> </div> </li> <li><span>Operator: <a href="_^.html" title="a binary operator, usually used for powers">^</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>f</tt>, <span>a <a href="___Matrix.html">matrix</a></span></span></li> <li><span><tt>n</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>a <a href="___Matrix.html">matrix</a></span>, <tt>f^n</tt></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><table class="examples"><tr><td><pre>i1 : R = ZZ/7[x]/(x^6-3*x-4) o1 = R o1 : QuotientRing</pre> </td></tr> <tr><td><pre>i2 : f = matrix{{x,x+1},{x-1,2*x}} o2 = | x x+1 | | x-1 2x | 2 2 o2 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i3 : f^2 o3 = | 2x2-1 3x2+3x | | 3x2-3x -2x2-1 | 2 2 o3 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i4 : f^1000 o4 = | 3x5-2x4-2x2+2x+3 -2x5+x3-x2+x+1 | | x5+x4-2x2-3x+1 -x5+2x4-3x3+x-3 | 2 2 o4 : Matrix R <--- R</pre> </td></tr> </table> <p/> If the matrix is invertible, then f^-1 is the inverse.<table class="examples"><tr><td><pre>i5 : M = matrix(QQ,{{1,2,3},{1,5,9},{8,3,1}}) o5 = | 1 2 3 | | 1 5 9 | | 8 3 1 | 3 3 o5 : Matrix QQ <--- QQ</pre> </td></tr> <tr><td><pre>i6 : det M o6 = 9 o6 : QQ</pre> </td></tr> <tr><td><pre>i7 : M^-1 o7 = | -22/9 7/9 1/3 | | 71/9 -23/9 -2/3 | | -37/9 13/9 1/3 | 3 3 o7 : Matrix QQ <--- QQ</pre> </td></tr> <tr><td><pre>i8 : M^-1 * M o8 = | 1 0 0 | | 0 1 0 | | 0 0 1 | 3 3 o8 : Matrix QQ <--- QQ</pre> </td></tr> <tr><td><pre>i9 : R = QQ[x] o9 = R o9 : PolynomialRing</pre> </td></tr> <tr><td><pre>i10 : N = matrix{{x^3,x+1},{x^2-x+1,1}} o10 = | x3 x+1 | | x2-x+1 1 | 2 2 o10 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i11 : det N o11 = -1 o11 : R</pre> </td></tr> <tr><td><pre>i12 : N^-1 o12 = {3} | -1 x+1 | {1} | x2-x+1 -x3 | 2 2 o12 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i13 : N^-1 * N o13 = {3} | 1 0 | {1} | 0 1 | 2 2 o13 : Matrix R <--- R</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_determinant.html" title="determinant of a matrix">determinant</a> -- determinant of a matrix</span></li> </ul> </div> </div> </body> </html>