# Revision history [back]

From Sage v.8.0.beta3,

sage: A = Matrix([[1,2],[3,4]])
sage: n = SR.var('n')
sage: A^n
[ 1/22*(-1/2*sqrt(33) + 5/2)^n*(sqrt(33) + 11) - 1/22*(1/2*sqrt(33) + 5/2)^n*(sqrt(33) - 11)                                                          2/33*sqrt(33)*(1/2*sqrt(33) + 5/2)^n - 2/33*sqrt(33)*(-1/2*sqrt(33) + 5/2)^n]
[-1/88*(-1/2*sqrt(33) + 5/2)^n*(sqrt(33) + 11)*(sqrt(33) - 3) - 1/88*(1/2*sqrt(33) + 5/2)^n*(sqrt(33) + 3)*(sqrt(33) - 11)                    1/66*sqrt(33)*(1/2*sqrt(33) + 5/2)^n*(sqrt(33) + 3) + 1/66*sqrt(33)*(-1/2*sqrt(33) + 5/2)^n*(sqrt(33) - 3)]


which is

$$\left(\begin{array}{rr} \frac{1}{22} {\left(-\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} {\left(\sqrt{33} + 11\right)} - \frac{1}{22} {\left(\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} {\left(\sqrt{33} - 11\right)} & \frac{2}{33} \sqrt{33} {\left(\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} - \frac{2}{33} \sqrt{33} {\left(-\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} \\ -\frac{1}{88} {\left(-\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} {\left(\sqrt{33} + 11\right)} {\left(\sqrt{33} - 3\right)} - \frac{1}{88} {\left(\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} {\left(\sqrt{33} + 3\right)} {\left(\sqrt{33} - 11\right)} & \frac{1}{66} \sqrt{33} {\left(\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} {\left(\sqrt{33} + 3\right)} + \frac{1}{66} \sqrt{33} {\left(-\frac{1}{2} \sqrt{33} + \frac{5}{2}\right)}^{n} {\left(\sqrt{33} - 3\right)} \end{array}\right)$$

Also in the case of 2x2 matrices there is a derivation of the closed formula for $A^n$ in this note by K. S. Williams.