# Matrix ^ ZZ -- power

## Synopsis

• Operator: ^
• Usage:
f^n
• Inputs:
• Outputs:
• , f^n

## Description

 i1 : R = ZZ/7[x]/(x^6-3*x-4) o1 = R o1 : QuotientRing i2 : f = matrix{{x,x+1},{x-1,2*x}} o2 = | x x+1 | | x-1 2x | 2 2 o2 : Matrix R <--- R i3 : f^2 o3 = | 2x2-1 3x2+3x | | 3x2-3x -2x2-1 | 2 2 o3 : Matrix R <--- R 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

If the matrix is invertible, then f^-1 is the inverse.

 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 i6 : det M o6 = 9 o6 : QQ 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 i8 : M^-1 * M o8 = | 1 0 0 | | 0 1 0 | | 0 0 1 | 3 3 o8 : Matrix QQ <--- QQ i9 : R = QQ[x] o9 = R o9 : PolynomialRing 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 i11 : det N o11 = -1 o11 : R i12 : N^-1 o12 = {3} | -1 x+1 | {1} | x2-x+1 -x3 | 2 2 o12 : Matrix R <--- R i13 : N^-1 * N o13 = {3} | 1 0 | {1} | 0 1 | 2 2 o13 : Matrix R <--- R