Find a matrix $P$ that diagonalizes $\begin{bmatrix}0&0&-2\\1&2&1\\1&0&3\end{bmatrix}$
Solution:
$(\lambda-1)(\lambda-2)^2=0$
we found the following Eigenspaces:
$\lambda=2\\\lambda=1$ the eigenvalues and $P_1=\begin{bmatrix}-1\\0\\1\end{bmatrix},P_2=\begin{bmatrix}0\\1\\0\end{bmatrix},P_3=\begin{bmatrix}-2\\1\\1\end{bmatrix}$
There are three basis in total , so the matrix is diagonalizable and $P=\begin{bmatrix}-1&0&-2\\0&1&1\\1&0&1\end{bmatrix}$ diagonalizes $A$.
$P^{-1}AP=\begin{bmatrix}-1&0&-2\\0&1&1\\1&0&1\end{bmatrix}\begin{bmatrix}0&0&-2\\1&2&1\\1&0&3\end{bmatrix}\begin{bmatrix}-1&0&-2\\0&1&1\\1&0&1\end{bmatrix}=\begin{bmatrix}2&0&0\\0&2&0\\0&0&1\end{bmatrix}$
If you notice there are two equal eigenvalues with respect each of the matrix P columns. If you multiply PA.
Theorem : Let V be a vector space over $K$, and let $A:V\to V$ be an operator. Let $v_1,...,v_m$ be eigenvectors of $A$, with eigenvalues $\lambda_1,...,\lambda_m$ respectively. Assume that these eigenvalues are distinct,i.e.
$\lambda_i\neq\lambda_j$ if $i\neq j$
Then $v_1,...,v_m$ are linearly independent.
Question:
If you notice there are two equal eigenvalues with respect to each of the matrix columns P in the example. For the matrix to be invertible the columns must be linearly independent, which means by the theorem that need to have different eigenvalues. However 2 stands for the eigenvalue of two different columns of the matrix $P$. How can it be?
Thanks in advance!