TITLE: Computing $A^{50}$ for a given matrix $A$
QUESTION [8 upvotes]: $A =\left(
               \begin{array}{ccc}
                 1 & 0 & 0 \\
                 1 & 0 & 1 \\
                 0 & 1 & 0 \\
               \end{array}
             \right)$ then what would be $A^{50}$?
For real entries

REPLY [2 votes]: The characteristic polynomial of $A$ is 
$$X^3-X^2-X+1=(x-1)^2(x+1)$$
The Division Theorem tells us that 
$$X^{50}=(X^3-X^2-X+1)Q(x)+ax^2+bx+c (*)$$
Plugging in $x=1$, $x=-1$ yield 
$$1=a+b+c$$
$$1=a-b+c$$
Thus $b=0$ and $a+c=1$.
Differentiating $(*)$ and using the fact that $(X^3-X^2-X+1)Q(x)=(x-1)^2(something)$ we get
$$50x^{49}=(x-1)(junk)+2ax+b$$
Plugging in $a=1$ we get
$$50=2a+b$$
Thus $a=25, b=0, c=-24$
This proves that 
$$X^{50}=(X^3-X^2-X+1)Q(x)+25x^2-24$$
Using the fact that $A^3-A^2-A+I =0$ we get
$$A^{50}=25A^2-24I$$
P.S. This is basically the same proof as Ihf 's, the only difference is that long division can replace the induction process. 
To get the general formula,  repeating the process for
$$X^{n}=(X^3-X^2-X+1)Q(x)+ax^2+bx+c (*)$$
yields 
$$a+b+c=1$$
$$a-b+c =(-1)^n$$
$$2a+b=n$$
and
$$A^n= aA^2+bA+cI$$