Theorem 2
An nxn matrix A is diagonalizable if and only if A has n linearly independent eigenvectors
Proof
Let A be diagonalizable
Thus, $A = PDP^{-1}$ for some invertible matrix P and diagonal matrix D
$P = \begin{bmatrix} \vec{v}_1&\vec{v}_2&\vec{v}_3,...,\vec{v}_n \end{bmatrix}$ and $D = \begin{bmatrix} d_1&0&0&...&0\\0&d_2&0&...&0\\0&0&d_3&...&0\\0&0&0&...&0\\0&0&0&...&d_n \end{bmatrix}$
Where P is linearly independent since P is invertible
Since $A = PDP^{-1}$
(1)$A\vec{v}_1 = d_1\vec{v}_1$
$A\vec{v}_2 = d_2\vec{v}_2$
Therefore, $\begin{bmatrix} \vec{v}_1&\vec{v}_2&\vec{v}_3,...,\vec{v}_n \end{bmatrix}$ are eigenvectors
Since these are also the columns of P, we know they are linearly independent.
A has n linearly independent eigenvectors
let $\begin{bmatrix} \vec{v}_1&\vec{v}_2&\vec{v}_3,...,\vec{v}_n \end{bmatrix}$ be linearly independent eigenvectors
let $\lambda_1, \lambda_2, \lambda_3...\lambda_n$ be the associated eigenvalues
let $P = \begin{bmatrix} \vec{v}_1&\vec{v}_2&\vec{v}_3,...,\vec{v}_n \end{bmatrix}$
P is invertible since its components are linearly independent
D is the diagonal matrix with the eigenvalues as the entries on the primary diagonal
Then
(4)Since $\begin{bmatrix} \vec{v}_1&\vec{v}_2&\vec{v}_3,...,\vec{v}_n \end{bmatrix}$ are eigenvectors,
$A\vec{v}_1 = \lambda_1\vec{v}_1$
$A\vec{v}_2 = \lambda_2\vec{v}_2$
So it can be shown that $AP = PD$, and multiplying both sides on the right by $P^{-1}$, we find that $A = PDP^{-1}$ and is therefore diagonalizable.