Previous Up Next

5.48.6 Powers of a square matrix: matpow

The matpow command finds the power of a square matrix, computed using the Jordan form.

Example.

Input:

matpow([[1,2],[2,1]],n)

Output:









3n+
−1
n
2
3n
−1
n
2
3n
−1
n
2
3n+
−1
n
2









Notice that jordan([[1,2],[2,1]]) returns



1−1
11


,

30
0−1



Previous Up Next