\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)

Matrix Diagonalisation

In this chapter, we study vectors \(\mathbf{x}\) whose direction is unchanged by a matrix \(\mathbf{A}\). After multiplying by \(\mathbf{A}\), the new vector \(\mathbf{A}\mathbf{x}\) lies on the same line through the origin as the original one (it may be longer, shorter, or even point in the opposite direction). Such a vector is called an eigenvector, and the number \(\lambda\) that tells how the length (and possibly the direction) changes is called the eigenvalue.

Eigenvalues and Eigenvectors

Definition Eigenvalues and Eigenvectors
Let \(\mathbf{A}\) be a square matrix. An eigenvector of \(\mathbf{A}\) is a non-zero vector \(\mathbf{x}\) such that:$$ \mathbf{A}\mathbf{x} = \lambda \mathbf{x} $$where \(\lambda\) is a scalar called the eigenvalue associated with the eigenvector \(\mathbf{x}\).
Method Finding Eigenvalues and Eigenvectors
To find the eigenvalues and eigenvectors of a matrix \(\mathbf{A}\):
  1. Find the eigenvalues (\(\lambda\)): Solve the characteristic equation $$ \det(\mathbf{A} - \lambda \mathbf{I}) = 0, $$ where \(\mathbf{I}\) is the identity matrix. The solutions are the eigenvalues.
  2. Find the eigenvectors (\(\mathbf{x}\)): For each eigenvalue \(\lambda\), substitute it into $$ \mathbf{A}\mathbf{x} = \lambda\mathbf{x}\text{ or } (\mathbf{A} - \lambda \mathbf{I})\mathbf{x} = \mathbf{0} $$ and solve for the non-zero vector \(\mathbf{x}\).
Example
Find the eigenvalues and corresponding eigenvectors of the matrix$$ \mathbf{A} = \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix}. $$

  • Find eigenvalues: $$\begin{aligned} \det(\mathbf{A} - \lambda \mathbf{I}) &= 0\\ \det\left( \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} - \lambda \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \right) &= 0\\ \det\left( \begin{pmatrix} 4-\lambda & 2 \\ 1 & 3-\lambda \end{pmatrix} \right) &= 0\\ (4-\lambda)(3-\lambda) - (2)(1) &= 0\\ \lambda^2 - 7\lambda + 12 - 2 &= 0\\ \lambda^2 - 7\lambda + 10 &= 0\\ (\lambda - 5)(\lambda - 2) &= 0 \end{aligned}$$ The eigenvalues are \(\lambda_1 = 5\) and \(\lambda_2 = 2\).
  • Find an eigenvector for \(\lambda_1 = 5\): $$\begin{aligned} (\mathbf{A} - 5 \mathbf{I})\mathbf{x} &= \mathbf{0}\\ \left( \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} - 5 \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \right)\begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix}\\ \begin{pmatrix} 4-5 & 2 \\ 1 & 3-5 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix}\\ \begin{pmatrix} -1 & 2 \\ 1 & -2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix}\\ \begin{pmatrix} -x + 2y \\ x - 2y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix} \end{aligned}$$ This gives \(-x + 2y = 0\) and \(x - 2y = 0\), so \(x = 2y\).
    Letting \(y = t\), we have \(x = 2t\), so $$ \mathbf{x} = \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 2t \\ t \end{pmatrix} = t\begin{pmatrix} 2 \\ 1 \end{pmatrix}, \quad t \neq 0. $$ Any vector of the form \(t\begin{pmatrix} 2 \\ 1 \end{pmatrix}\), \(t\neq 0\), is an eigenvector corresponding to the eigenvalue \(5\).
  • Find an eigenvector for \(\lambda_2 = 2\): $$\begin{aligned} (\mathbf{A} - 2 \mathbf{I})\mathbf{x} &= \mathbf{0}\\ \left( \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} - 2 \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \right)\begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix}\\ \begin{pmatrix} 4-2 & 2 \\ 1 & 3-2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix}\\ \begin{pmatrix} 2 & 2 \\ 1 & 1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix}\\ \begin{pmatrix} 2x + 2y \\ x + y \end{pmatrix} &= \begin{pmatrix} 0 \\ 0 \end{pmatrix} \end{aligned}$$ This gives \(2x + 2y = 0\) and \(x + y = 0\), so \(y = -x\).
    Letting \(x = t\), we have \(y = -t\), so $$ \mathbf{x} = \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} t \\ -t \end{pmatrix} = t\begin{pmatrix} 1 \\ -1 \end{pmatrix}, \quad t \neq 0. $$ Any vector of the form \(t\begin{pmatrix} 1 \\ -1 \end{pmatrix}\), \(t\neq 0\), is an eigenvector corresponding to the eigenvalue \(2\).

Matrix Diagonalisation

Definition Diagonal Matrix
A square matrix is said to be diagonal if the elements not on its leading diagonal are zero.
A \(2 \times 2\) diagonal matrix has the form:$$ \mathbf{D} = \begin{pmatrix} a & 0 \\ 0 & b \end{pmatrix} $$
Definition Diagonalisable Matrix
A square matrix \(\mathbf{A}\) is diagonalisable if there exists an invertible matrix \(\mathbf{P}\) such that$$ \mathbf{D} = \mathbf{P}^{-1}\mathbf{A}\mathbf{P} $$is a diagonal matrix. We say that \(\mathbf{P}\) diagonalises \(\mathbf{A}\).
Equivalently, we can write$$ \mathbf{A} = \mathbf{P}\mathbf{D}\mathbf{P}^{-1}. $$
From the definition of diagonalisation, we start with the relationship:$$ \mathbf{D} = \mathbf{P}^{-1}\mathbf{A}\mathbf{P} $$We can rearrange this equation to make \(\mathbf{A}\) the subject. This specific form is particularly useful for calculating powers of matrices (as we will see in the next section).
To isolate \(\mathbf{A}\), we multiply by \(\mathbf{P}\) on the left and by \(\mathbf{P}^{-1}\) on the right:$$\begin{aligned}\mathbf{D} &= \mathbf{P}^{-1}\mathbf{A}\mathbf{P} \\ \mathbf{P}\mathbf{D} &= \underbrace{\mathbf{P}\mathbf{P}^{-1}}_{\mathbf{I}}\mathbf{A}\mathbf{P} && \text{(multiply by } \mathbf{P} \text{ on the left)} \\ \mathbf{P}\mathbf{D} &= \mathbf{A}\mathbf{P} \\ \mathbf{P}\mathbf{D}\mathbf{P}^{-1} &= \mathbf{A}\underbrace{\mathbf{P}\mathbf{P}^{-1}}_{\mathbf{I}} && \text{(multiply by } \mathbf{P}^{-1} \text{ on the right)} \\ \mathbf{A} &= \mathbf{P}\mathbf{D}\mathbf{P}^{-1}\end{aligned}$$
Proposition Diagonalising a \(2 \times 2\) Matrix
If \(\mathbf{A}\) is a \(2 \times 2\) matrix with distinct real eigenvalues \(\lambda_1, \lambda_2\) and corresponding eigenvectors \(\mathbf{x}_1, \mathbf{x}_2\), then the matrix \(\mathbf{P}\) formed by these eigenvectors diagonalises \(\mathbf{A}\):$$\text{If } \mathbf{P} = (\mathbf{x}_1 \mid \mathbf{x}_2)\text{ then }\mathbf{P}^{-1}\mathbf{A}\mathbf{P} =\begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}.$$Here, \(\mathbf{P} = (\mathbf{x}_1 \mid \mathbf{x}_2)\) is the matrix whose first column is \(\mathbf{x}_1\) and whose second column is \(\mathbf{x}_2\).
Example
The matrix$$ \mathbf{A} = \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} $$has eigenvalues \(\lambda_1 = 5\) and \(\lambda_2 = 2\) with corresponding eigenvectors$$\mathbf{x}_1 = \begin{pmatrix} 2 \\ 1 \end{pmatrix}\quad\text{and}\quad\mathbf{x}_2 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}.$$Show that \(\mathbf{P} = (\mathbf{x}_1 \mid \mathbf{x}_2)\) diagonalises \(\mathbf{A}\).

To show that \(\mathbf{P}\) diagonalises \(\mathbf{A}\), we must show that \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) is a diagonal matrix.
  1. Form the matrix \(\mathbf{P}\): $$ \mathbf{P} = \begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}. $$
  2. Find the inverse \(\mathbf{P}^{-1}\): $$ \det(\mathbf{P}) = (2)(-1) - (1)(1) = -3, $$ so $$ \mathbf{P}^{-1} = \frac{1}{-3} \begin{pmatrix} -1 & -1 \\ -1 & 2 \end{pmatrix} = \frac{1}{3} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}. $$
  3. Calculate \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\): $$ \begin{aligned} \mathbf{P}^{-1}\mathbf{A}\mathbf{P} &= \frac{1}{3} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix} \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} \begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix} \\ &= \frac{1}{3} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix} \begin{pmatrix} 10 & 2 \\ 5 & -2 \end{pmatrix} \\ &= \frac{1}{3} \begin{pmatrix} 15 & 0 \\ 0 & 6 \end{pmatrix} \\ &= \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}. \end{aligned} $$
The result is the diagonal matrix$$ \mathbf{D} = \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}, $$which contains the eigenvalues on the diagonal. Thus, \(\mathbf{P}\) diagonalises \(\mathbf{A}\).

Matrix Powers

Calculating powers of a matrix \(\mathbf{A}\) (such as \(\mathbf{A}^{10}\)) by repeated multiplication is tedious. However, if we diagonalise the matrix first, the process becomes much simpler.
If \(\mathbf{A}\) is diagonalisable, we can write$$ \mathbf{A} = \mathbf{P}\mathbf{D}\mathbf{P}^{-1}, $$where \(\mathbf{D}\) is diagonal. To calculate \(\mathbf{A}^n\):$$\begin{aligned}\mathbf{A}^n &= \underbrace{\mathbf{A}\mathbf{A}\dots \mathbf{A}}_{n \text{ times}}\\ &= \underbrace{(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}) (\mathbf{P}\mathbf{D}\mathbf{P}^{-1}) \dots (\mathbf{P}\mathbf{D}\mathbf{P}^{-1})}_{n \text{ times}} && \text{(substitute } \mathbf{A} = \mathbf{P}\mathbf{D}\mathbf{P}^{-1})\\ &= \mathbf{P}\mathbf{D}(\mathbf{P}^{-1}\mathbf{P})\mathbf{D} (\mathbf{P}^{-1}\mathbf{P})\dots\mathbf{D}\mathbf{P}^{-1} && \text{(regroup terms)}\\ &= \mathbf{P}\mathbf{D}\mathbf{I}\mathbf{D}\mathbf{I}\dots\mathbf{D}\mathbf{P}^{-1} && \text{(since } \mathbf{P}^{-1}\mathbf{P} = \mathbf{I})\\ &= \mathbf{P}(\mathbf{D}\mathbf{D}\dots\mathbf{D})\mathbf{P}^{-1}\\ &= \mathbf{P}\mathbf{D}^n\mathbf{P}^{-1}.\end{aligned}$$It is easy to raise a diagonal matrix to a power. If$$\mathbf{D} = \begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix},$$then$$\begin{aligned}\mathbf{D}^2 &=\begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}\begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}= \begin{pmatrix} \lambda_1^2 & 0 \\ 0 & \lambda_2^2 \end{pmatrix},\\ \mathbf{D}^3 &= \mathbf{D}^2\mathbf{D}= \begin{pmatrix} \lambda_1^2 & 0 \\ 0 & \lambda_2^2 \end{pmatrix} \begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}= \begin{pmatrix} \lambda_1^3 & 0 \\ 0 & \lambda_2^3 \end{pmatrix},\\ &\vdots\\ \mathbf{D}^n &= \begin{pmatrix} \lambda_1^n & 0 \\ 0 & \lambda_2^n \end{pmatrix}.\end{aligned}$$
Method Calculating Matrix Powers
To calculate a high power \(\mathbf{A}^n\) of a diagonalisable matrix \(\mathbf{A}\):
  1. Find the eigenvalues and eigenvectors of \(\mathbf{A}\).
  2. Form \(\mathbf{P}\) from the eigenvectors and \(\mathbf{D}\) from the eigenvalues so that \(\mathbf{A} = \mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).
  3. Compute \(\mathbf{D}^n\) by raising each diagonal entry to the power \(n\).
  4. Use $$ \mathbf{A}^n = \mathbf{P}\mathbf{D}^n\mathbf{P}^{-1}. $$
Example
The matrix$$ \mathbf{P} = \begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix} $$diagonalises$$ \mathbf{A} = \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} $$with$$ \mathbf{P}^{-1} = \frac{1}{3} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}\quad\text{and}\quad\mathbf{D} = \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}. $$Calculate the matrix \(\mathbf{A}^5\).

$$\begin{aligned}\mathbf{A}^5 &= \mathbf{P}\mathbf{D}^5\mathbf{P}^{-1} \\ &= \begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} 5^5 & 0 \\ 0 & 2^5 \end{pmatrix} \left( \frac{1}{3}\begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix} \right) \\ &= \frac{1}{3} \begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} 3125 & 0 \\ 0 & 32 \end{pmatrix} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix} \\ &= \frac{1}{3} \begin{pmatrix} 6250 & 32 \\ 3125 & -32 \end{pmatrix} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix} \\ &= \frac{1}{3} \begin{pmatrix} 6250(1) + 32(1) & 6250(1) + 32(-2) \\ 3125(1) - 32(1) & 3125(1) - 32(-2) \end{pmatrix} \\ &= \frac{1}{3} \begin{pmatrix} 6282 & 6186 \\ 3093 & 3189 \end{pmatrix} \\ &= \begin{pmatrix} 2094 & 2062 \\ 1031 & 1063 \end{pmatrix}.\end{aligned}$$