Calculate power of a matrix using jordan form I need to calculate: 
$$
\begin{bmatrix}
1&1\\
-1&3
\end{bmatrix}^{50}
$$
The solution i have uses jordan form and get to: 

There are some points that i dont understand:
$1.$ In the right upper corner of the matrix, last line of the solution, he changed the $1$ to $50 \cdot 2^{49}$ why? how? 
$2.$ What is the $P_A$? He didnt realy get to a final solution... where is the asnwer? how do i get to $P_A$?
 A: You should already have learned what $P_A$ is before coming to this example of the use of the JCF: it’s a matrix of generalized eigenvectors of $A$. I’m not going to go into that any more than this because there are plenty of resources that describe this in excruciating detail. I suggest looking earlier in the course material when the Jordan decomposition itself is explained.  
As to how powers of the JCF are computed, the easiest way I know is to write $$J=\begin{bmatrix}\lambda&1\\0&\lambda\end{bmatrix} = \begin{bmatrix}\lambda&0\\0&\lambda\end{bmatrix}+\begin{bmatrix}0&1\\0&0\end{bmatrix} = \lambda I+N.$$ Now, observe that $N^2=0$. Multiples of the identity matrix commute with everything, we can expand using the binomial theorem: $$(\lambda I+N)^n = (\lambda I)^n+n(\lambda I^{n-1})N+\cdots = \lambda^n I+n\lambda^{n-1}N = \begin{bmatrix}\lambda^n&n\lambda^{n-1}\\0&\lambda^n\end{bmatrix}$$ since all of the terms that involve $N^2$ or a higher power of $N$ vanish. You can use a similar decomposition for powers of larger Jordan blocks: the expansion will terminate after a number of terms equal to the size of the block.  
I suspect that you’re expected to perform a full Jordan decomposition in your solutions to exercises like this one, but the above derivation suggests a way to compute this knowing only the (repeated) eigenvalue. We have $$A^n = P_AJ^nP_A^{-1} = P_A(\lambda^nI+n\lambda^{n-1}N)P_A^{-1} = \lambda^nI + n\lambda^{n-1}(P_ANP_A^{-1}),$$ but $P_ANP_A^{-1} = A-\lambda I$, so $$A^n = \lambda^nI+n\lambda^{n-1}(A-\lambda I).$$ For the matrix in your question, this yields $$2^{50}I+50\cdot2^{49}\begin{bmatrix}-1&1\\-1&1\end{bmatrix}.$$
A: There are two ways to construct a change of basis matrix $P$ for Jordan form. The way I like is to take the matrix $A-2I,$ which squares to the $0$ matrix, and pick a column vector it does NOT annihilate. I like to put in a single 1 if I can, so let the column vector $v$ be $v=(0,1)^T.$ Then the left column is $u = (A-2I)v,$ so that
$$
P = 
\left(
\begin{array}{rr}
 1 & 0 \\
1 & 1
\end{array}
\right)
$$
of determinant $1,$ which helps. keep the inverse with small denominator, namely $1.$
$$
P^{-1} = 
\left(
\begin{array}{rr}
 1 & 0 \\
-1 & 1
\end{array}
\right)
$$
$$ 
\left(
\begin{array}{rr}
 1 & 0 \\
-1 & 1
\end{array}
\right)
\left(
\begin{array}{rr}
 1 & 1 \\
-1 & 3
\end{array}
\right)
\left(
\begin{array}{rr}
 1 & 0 \\
1 & 1
\end{array}
\right) =  J = 
\left(
\begin{array}{rr}
 2 & 1 \\
0 & 2
\end{array}
\right)
$$
===============
parisize = 4000000, primelimit = 500000
? a = [ 1,1; -1,3]
%1 = 
[ 1 1]

[-1 3]

? charpoly(a)
%2 = x^2 - 4*x + 4
? factor(charpoly(a))
%3 = 
[x - 2 2]

? minpoly(a)
%4 = x^2 - 4*x + 4
? b = a - 2 * matid(2)
%5 = 
[-1 1]

[-1 1]

? b^2
%6 = 
[0 0]

[0 0]

? p = [ 1,0; 1,1]
%7 = 
[1 0]

[1 1]

? matdet(p)
%8 = 1
? pinv = matadjoint(p)
%9 = 
[ 1 0]

[-1 1]

? pinv * p
%10 = 
[1 0]

[0 1]

? pinv *a * p
%11 = 
[2 1]

[0 2]

? 

=============
A: Ok, so as it may be that someone else will be stack as i did, i will write here what i found in the end. 
The answer to the first question: 
It seems that there is a formula for power of Jordan blocks of the form: 
$$
\begin{bmatrix} 
\lambda_0 & 1 \\ 
0 & \lambda_0
\end{bmatrix}^m = \begin{bmatrix} 
\lambda_0^m & m \lambda_0^{m-1} \\ 
0 & \lambda_0^m
\end{bmatrix} 
$$

The answer to the second question: didnt found yet, ill update that post if i will find (and remember)
