There are many methods to obtain a diagonalisable matrix.
Using Eigenvectors and Eigenvalues
We can use eigenvectors to make things easier:
Diagonalisable Matrices using Eigenvectors ^theorem
A matrix, is diagonalisable over the field ( must be or ) if and only if it has linearly independent eigenvectors. Then:
\boldsymbol{D} = \begin{bmatrix} \lambda_{1} & 0 & 0 & 0 \\
0 & \lambda_{2} & 0 & 0 \ 0 & 0 & \ddots & 0 \ 0 & 0 & 0 & \lambda_{i}\end{bmatrix} = \text{diag}(\lambda_{1}, \lambda_{2}, \dots, \lambda_{i})
>Where each eigenvector corresponds to a unique eigenvalue. Alternatively, for *every* [eigenvalue](Eigenvalue.md), $\lambda$ the [algebraic multiplicity](Eigenvalue.md#Algebraic%20Multiplicity) must equal the [geometric multiplicity](Eigenvalue.md#Geometric%20Multiplicity)
Note that this requires [obtaining the eigenvectors from a matrix](Obtaining%20the%20Eigenvectors%20from%20a%20Matrix.md).
### Using Orthogonal Matrices
If $\boldsymbol{A}$ is both *real* and a [symmetric matrix](Matrix%20Transposition.md), then the diagonalising matrix, $\boldsymbol{P}$ is an [orthogonal matrix](Orthogonal%20Matrix.md)
>[!theorem] Orthogonal Diagonalisation ^theorem2
>
>If $\boldsymbol{A}$ is a *real* [symmetric matrix](Matrix%20Transposition.md) of size $n \times n$, it can be diagonalised in $\mathbb{R}^n$, with the [inner product](Inner%20Product.md) being the [dot product](Dot%20Product.md):
>1. All [eigenvalues](Eigenvalue.md) of $\boldsymbol{A}$ are real: $\lambda_{1\dots n} \in \mathbb{R}$
>2. Each [eigenvector](Eigenvector.md) that corresponds to the [eigenvalue](Eigenvalue.md) is [orthonormal](Orthogonality.md#Orthonormal%20Vectors%20&%20Sets). The set of these eigenvectors is an [orthonormal basis](Basis.md#Orthonormal%20Basis).
>3. $\boldsymbol{A}$ is diagonalisable with:
>$$
>\boldsymbol{A} = \boldsymbol{QDQ}^{-1}
>$$
>where:
>$$
>\boldsymbol{D} = \text{diag}(\lambda_{1}, \lambda_{2}, \dots, \lambda_{n})
>$$
>$$
>\boldsymbol{Q} = \begin{bmatrix} {\vec{v}_{\lambda}}_{1} & {\vec{v}_{\lambda}}_{2} & \dots & {\vec{v}_{\lambda}}_{n}
\end{bmatrix}