Here's the section from my textbook. I can diagonalize matrices with no problem, I just want to understand why this procedure works, something that isn't explained in this book.

Here's the section from my textbook. I can diagonalize matrices with no problem, I just want to understand why this procedure works, something that isn't explained in this book.

On
For any eigenvector, $v$, of a matrix $A$, we know that \begin{equation} Av = \lambda v \end{equation} where $\lambda$ is the eigenvalue corresponding to $v$. Using $\Lambda$ to denote the matrix which contains the eigenvalues of $A$ on its main diagonal (and zeros in all other positions), namely \begin{equation} \Lambda = \left(\begin{array}{cccc} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & & \ddots & \vdots \\ 0 & 0 & 0 & \lambda_n \end{array}\right) \end{equation} we can extend the above equation to the case of multiple eigenvectors. Denoting by $V$ the matrix which has eigenvectors of $A$ as columns, i.e., \begin{equation} V = \bigg(\begin{array}{cccc} v_1 & v_2 & \cdots & v_n \end{array}\bigg) \end{equation} we may write \begin{equation} AV = V\Lambda \end{equation} Then left-multiplying by $V^{-1}$ gives the diagonalization. The key here is that we take the ordinary eigenvector equation and extend it to the case of multiple eigenvectors placed "shoulder-to-shoulder" in a matrix.
On
We have basis vector matrix $P=[v_1 v_2 \dots v_n]:Av_i=\lambda_i v_i$
Now $v_i$ would be represented in the basis $P$ as $e_i$, where $e_i$ is a vector with 1 on its $i^{th}$ column and rest all columns zero.
Since $Av_i = \lambda v_i, \; P^{-1}APe_i=\lambda e_i$ because $P^{-1}AP$ is the representation of the same transformation in the basis $P$.
$P^{-1}APe_i=\lambda e_i$ implies that $P^{-1}AP=D:d_{ij}=0 \;if \; i \neq j$ and $d_{ii}=\lambda_i$.
This is exactly the diagonal matrix we get. I hope this clears it.
You can interpret a matrix as a "representation" of a linear operator in a given basis. Diagonalizing means to find a basis which turns this representation in diagonal form. The matrix $P$ represents an operator which changes your basis, and multiplying those matrices as written corresponds to changing basis, applying the operator, and changing back to the original basis so that nobody gets hurt.