Find $P$ where $P^{-1}AP$ for a given matrix $A$ I am doing a past paper and I have been given a matrix A:
\begin{bmatrix}
    4       & -1 & -3 &  2 \\
    4       & -2 & -4 &  4 \\
    -4       & 4 & 6 & -4  \\
    -6       & 5 & 7 & -4  \\
\end{bmatrix}
and I need to find a matrix $P$ such that $P^{-1}AP$ = 
\begin{bmatrix}
    2       & 0 & 0 &  0 \\
    0       & 2 & 1 &  0 \\
    0       & 0 & 2 & 0  \\
    0       & 0 & 0 & -2  \\
\end{bmatrix}
I'm really not sure how to begin with this question, would anyone be able to help out?
 A: This corresponds to the so-called Jordan decomposition.
Theorem: 
If $A \in \mathbb{C}^{n\times n}$, then there exists a nonsingular $P \in \mathbb{C}^{n\times n}$ such that:
$$
P^{-1}AP=\text{diag}(J_1, \dots, J_k)
$$
where
$$
J_i=
\begin{bmatrix}
\lambda_i & 1 & \dots & 0 \\
0 & \lambda_i & \ddots  & \vdots\\
\vdots & & \ddots &  1\\
0 & \dots &  0 & \lambda_i
\end{bmatrix} \in \mathbb{C}^{n_i\times n_i}
$$
and $n_1 + \dots + n_k = n$.
In your example, you have 
$$
P^{-1} A P = J = \text{diag}(J_1, J_2, J_3)
$$
$n_1 = n_3 = 1, n_2 = 2$ and $\lambda_1 = \lambda_2 = 2, \lambda_3 = -2$. That is,
$J_1 = 2, J_3 = -2$ and 
$J_2 = 
\begin{bmatrix}
2 & 1\\
0 & 2
\end{bmatrix}.
$
To find $P$, you can write the decomposition as $AP = PJ$. Assuming $P = [p_1, p_2, p_3, p_4]$, with $p_i$ columns of $P$, you have
$$
A [p_1, p_2, p_3, p_4] = [p_1, p_2, p_3, p_4]J
$$
leading to
$$
A [p_1, p_2, p_3, p_4] = [2p_1, 2p_2, p_2+2p_3, -2p_4]
$$
which gives (column by column)
$$
A p_1 = 2p_1 \qquad \text{(1)}\\
A p_2 = 2p_2 \qquad \text{(2)}\\
A p_3 = p_2 + 2p_3 \qquad \text{(3)}\\
A p_4 = -2p_4 \qquad \text{(4)}
$$
Now, (1), (2) indicate that $p_1$ and $p_2$ are the eigenvectors of $A$ associated with the same eigenvalue $\lambda = 2$. Similarly, (4) indicates that $p_4$ is the eigenvector of $A$ associated with $\lambda = -2$. Moreover (3) can be written as
$$
(A - 2I) p_3 = p_2
$$
multiplying both sides by (A - 2I) we get 
$$
(A - 2I)^2 p_3 = (A - 2I) p_2 = 0
$$
since $(A - 2I) p_2 = 0$ comes from (2). This indicates that $p_3$ is the generalized eigenvector of rank 2 of $A$ (see here) corresponding to the (generalized) eigenvalue $\lambda = 2$.
A: From the given information, we know that matrix A had eigenvalues 2, -2, and 2 is an eigenvalue of multiplicity.
We want to find eigenvectors that are associated with each of these eigenvalues.
find $v$ such that
$(A-\lambda I) v = 0$
$\lambda = 2$
$\begin{bmatrix}
    2       & -1 & -3 &  2 \\
    4       & -4 & -4 &  4 \\
    -4       & 4 & 4 & -4  \\
    -6       & 5 & 7 & -6  \\
\end{bmatrix}v = 0$
With a little bit of trial and error we find 
$\begin{bmatrix} 1\\1\\1\\1 \end{bmatrix}, \begin{bmatrix} -1\\0\\0\\1 \end{bmatrix} $
You might have found different eigenvectors, any two independent vectors in the eigenspace will do.
for the remaining vector we are looking for some vector $w$ such that
$Aw = 2w + v$ where $v$ is one of the the eigenvectors that is associated with the eigenvalue 2.
if such a vector exists then 
$(A-2I) w = v\\ 
(A-2I)^2 w = (A-2I)v = 0$
$(A-2I)^2 = \begin{bmatrix} 0&0&0&0\\-16&16&16&-16\\16&-16&-16&16\\16&-16&-16&16\end{bmatrix}$
Which means that $w$ must be some linear combination of
$\begin{bmatrix} 1\\1\\0\\0\end{bmatrix},\begin{bmatrix} 1\\0\\1\\0\end{bmatrix},\begin{bmatrix} 1\\0\\0\\1\end{bmatrix}$
find some combination of these such that $(A-2I)w$ equals one of the eigenvectors you already have.
$(A-2I)\begin{bmatrix} 1\\0\\1\\0\end{bmatrix} =\begin{bmatrix} -1\\0\\0\\1 \end{bmatrix}$
$A \begin{bmatrix} 1&-1&1\\1&0&0\\1&0&1\\1&1&0\end{bmatrix}= \begin{bmatrix} 1&-1&1\\1&0&0\\1&0&1\\1&1&0\end{bmatrix}\begin{bmatrix} 2&0&0\\0&2&1\\0&0&2\end{bmatrix}$
And I will leave it to you to find the remaining eigenvector and complete the matrix.
