Section 20.1 Powers of Matrices
Given the square matrix \(A\) of order \(k\) the problem is to calculate the matrix \(A^n\) where \(n \in \mathbb{N}\text{.}\) For small values of \(n\) the calculation can be done by brute force but for large values of \(n\) this becomes intractable. A solution to this problem if the matrix \(A\) has \(k\) distinct eigenvalues is as follows.
Let the \(k\) distinct eigenvalues of matrix \(A\) be \(\lambda_1, \lambda_2, \ldots, \lambda_k\) and let the associated eigenvectors be \(\mathbf{v_1}, \mathbf{v_2}, \ldots, \mathbf{v_k}\text{.}\) Now let \(P\) be the matrix whose columns are these eigenvectors, i.e.
\begin{equation*}
P = \begin{pmatrix}
\mathbf{v_1} \amp \mathbf{v_2} \amp \cdots \amp \mathbf{v_k}
\end{pmatrix}
\end{equation*}
Then
\begin{equation*}
A = PDP^{-1} \quad \text{ (or equivalently } P^{-1}AP = D)
\end{equation*}
where
\begin{equation*}
D = \begin{pmatrix}
\lambda_1 \amp 0 \amp \cdots \amp 0 \\
0 \amp \lambda_2 \amp \cdots \amp 0 \\
\vdots \amp \vdots \amp \ddots \amp \vdots \\
0 \amp 0 \amp \cdots \amp \lambda_k
\end{pmatrix}\text{.}
\end{equation*}
Thus
\begin{align*}
A^n \amp = \left( PDP^{-1} \right) \left( PDP^{-1} \right) \ldots \left( PDP^{-1} \right)\\
\amp = PD \left( P^{-1} P \right)D \left( P^{-1} P \right) \ldots DP^{-1}\\
\amp = PD^n P^{-1}\text{.}
\end{align*}
Since
\begin{equation*}
D^n = \begin{pmatrix}
\lambda_1^n \amp 0 \amp \cdots \amp 0 \\
0 \amp \lambda_2^n \amp \cdots \amp 0 \\
\vdots \amp \vdots \amp \ddots \amp \vdots \\
0 \amp 0 \amp \cdots \amp \lambda_k^n
\end{pmatrix}\text{.}
\end{equation*}
this provides a relatively easy way to calculate \(A^n\) for large values of \(n\text{.}\)
Example 20.1.1.
Calculate \(A^3\) for
\begin{equation*}
A = \begin{pmatrix} 3 \amp 1 \\ 1 \amp 3 \end{pmatrix}\text{.}
\end{equation*}
Answer.\(A^3 = \begin{pmatrix} 36 \amp 28 \\ 28 \amp 36 \end{pmatrix}\)
Solution.
Since \(n\) is small here it is easiest just to do the matrix multiplications to obtain
\begin{equation*}
A^3 = \begin{pmatrix} 3 \amp 1 \\ 1 \amp 3 \end{pmatrix} \begin{pmatrix} 3 \amp 1 \\ 1 \amp 3 \end{pmatrix} \begin{pmatrix} 3 \amp 1 \\ 1 \amp 3 \end{pmatrix} = \begin{pmatrix} 3 \amp 1 \\ 1 \amp 3 \end{pmatrix} \begin{pmatrix} 10 \amp 6 \\ 6 \amp 10 \end{pmatrix} = \begin{pmatrix} 36 \amp 28 \\ 28 \amp 36 \end{pmatrix}
\end{equation*}
However, let's illustrate the above method (admittedly leaving out the working of finding eigenvalues, eigenvectors and matrix inverse). \(A\) has two distinct eigenvalues \(\lambda_1 = 2\) and \(\lambda_2 = 4\) with corresponding eigenvectors \(\bm{v}_1 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}\) and \(\bm{v}_2 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}\text{,}\) so let
\begin{equation*}
P = \begin{pmatrix} 1 \amp 1 \\ -1 \amp 1 \end{pmatrix}\text{.}
\end{equation*}
Thus
\begin{equation*}
P^{-1} = \dfrac{1}{2} \begin{pmatrix} 1 \amp -1 \\ 1 \amp 1 \end{pmatrix}
\end{equation*}
and therefore
\begin{align*}
A^3 \amp = PD^3 P^{-1}\\
\amp = \begin{pmatrix} 1 \amp 1 \\ -1 \amp 1 \end{pmatrix} \begin{pmatrix} 2^3 \amp 0 \\ 0 \amp 4^3 \end{pmatrix} \begin{pmatrix} 1/2 \amp -1/2 \\ 1/2 \amp 1/2 \end{pmatrix}\\
\amp = \begin{pmatrix} 1 \amp 1 \\ -1 \amp 1 \end{pmatrix} \begin{pmatrix} 4 \amp -4 \\ 32 \amp 32 \end{pmatrix}\\
\amp = \begin{pmatrix} 36 \amp 28 \\ 28 \amp 36 \end{pmatrix}
\end{align*}
As an aside, note that
\begin{align*}
P^{-1} AP \amp = \dfrac{1}{2} \begin{pmatrix} 1 \amp -1 \\ 1 \amp 1 \end{pmatrix} \begin{pmatrix} 3 \amp 1 \\ 1 \amp 3 \end{pmatrix} \begin{pmatrix} 1 \amp 1 \\ -1 \amp 1 \end{pmatrix}\\
\amp = \dfrac{1}{2} \begin{pmatrix} 1 \amp -1 \\ 1 \amp 1 \end{pmatrix} \begin{pmatrix} 2 \amp 4 \\ -2 \amp 4 \end{pmatrix}\\
\amp = \begin{pmatrix} 2 \amp 0 \\ 0 \amp 4 \end{pmatrix}
\end{align*}
To see why \(A = PDP^{-1}\text{,}\) note that since \(\mathbf{v_i}\) are eigenvectors of \(A\)
\begin{align*}
AP \amp = A \begin{pmatrix} \mathbf{v_1} \amp \mathbf{v_2} \amp \cdots \amp \mathbf{v_k} \end{pmatrix}\\
\amp = \begin{pmatrix} A\mathbf{v_1} \amp A\mathbf{v_2} \amp \cdots \amp A\mathbf{v_k} \end{pmatrix}\\
\amp = \begin{pmatrix} \lambda_1 \mathbf{v_1} \amp \lambda_2 \mathbf{v_2} \amp \cdots \amp \lambda_k \mathbf{v_k} \end{pmatrix}
\end{align*}
and by matrix multiplication
\begin{align*}
PD \amp = \begin{pmatrix} \mathbf{v_1} \amp \mathbf{v_2} \amp \cdots \amp \mathbf{v_k} \end{pmatrix} \begin{pmatrix}
\lambda_1 \amp 0 \amp \cdots \amp 0 \\
0 \amp \lambda_2 \amp \cdots \amp 0 \\
\vdots \amp \vdots \amp \ddots \amp \vdots \\
0 \amp 0 \amp \cdots \amp \lambda_k
\end{pmatrix}\\
\amp = \begin{pmatrix} \lambda_1 \mathbf{v_1} \amp \lambda_2 \mathbf{v_2}\amp \cdots \amp \lambda_k \mathbf{v_k} \end{pmatrix}
\end{align*}
Since \(AP = PD\) then \(A = PDP^{-1}\text{.}\)
To summarise the above (and introduce some associated terminology):
Definition 20.1.2. Diagonal Matrices.
A square matrix \(D\) of order \(k\) is called diagonal if all of its off-diagonal entries are 0, i.e. it is of the form
\begin{equation*}
D = \begin{pmatrix}
d_1 \amp 0 \amp \cdots \amp 0 \\
0 \amp d_2 \amp \cdots \amp 0 \\
\vdots \amp \vdots \amp \ddots \amp \vdots \\
0 \amp 0 \amp \cdots \amp d_k
\end{pmatrix}\text{.}
\end{equation*}
A square matrix \(A\) of order \(k\) is called diagonalisable if there exists a matrix \(P\) such that \(D = P^{-1} AP\) is a diagonal matrix.
A square matrix \(A\) of order \(k\) is diagonalisable if it has \(k\) distinct eigenvalues.
If a square matrix \(A\) of order \(k\) is diagonalisable then
\begin{equation*}
A^n = PD^n P^{-1} \: \text{for } n \in \mathbb{N}\text{.}
\end{equation*}
Example 20.1.3.
A town contains \(51000\) inhabitants. Initially \(2000\) of these are sick. Each month there is a change in the population: of those who are well \(\frac{3}{4}\) remain well and \(\frac{1}{4}\) become sick, of those who are sick \(\frac{1}{2}\) recover but \(\frac{1}{2}\) remain unwell. What is the long term prognosis for this town?
Answer.The long term prognosis for the town is that there will be twice as many well people as sick people.
Solution.
Let \(w_n\) denote the number of people in the town who are well after \(n\) months and let \(s_n\) denote the number of people in the town who are sick after \(n\) months. Then
\begin{align*}
w_0 \amp = 49000, \, \, s_0 = 2000 \, \text{ and}\\
w_n \amp = \frac{3}{4}w_{n-1} + \frac{1}{2} s_{n-1}, \, \, s_n = \frac{1}{4} w_{n-1} + \frac{1}{2} s_{n-1}\text{,}
\end{align*}
or in matrix notation
\begin{equation*}
\mathbf{w_n} = A \mathbf{w_{n-1}}, \, \, \mathbf{w_0} = \begin{pmatrix} 49000 \\ 2000 \end{pmatrix}
\end{equation*}
where
\begin{equation*}
\mathbf{w_n} = \begin{pmatrix} w_n \\ s_n \end{pmatrix}, \, \, A = \begin{pmatrix} 3/4 \amp 1/2 \\ 1/4 \amp 1/2 \end{pmatrix}\text{.}
\end{equation*}
Now
\begin{equation*}
\mathbf{w_n} = A \mathbf{w_{n-1}} = A \left( A \mathbf{w_{n-2}} \right) = A \left( A \left( A \mathbf{w_{n-3}} \right) \right) = \ldots = A^n \mathbf{w_0}\text{.}
\end{equation*}
Thus we need to calculate powers of \(A\text{.}\) The eigenvalues of \(A\) are \(1\) and \(1/4\) with corresponding eigenvectors \(\begin{pmatrix} 2 \\ 1 \end{pmatrix}\) and \(\begin{pmatrix} -1 \\ 1 \end{pmatrix}\text{,}\) and so
\begin{align*}
A^n \amp = P D^n P^{-1}\\
\amp = \begin{pmatrix} 2 \amp -1 \\ 1 \amp 1 \end{pmatrix} \begin{pmatrix} 1^n \amp 0 \\ 0 \amp (1/4)^n \end{pmatrix} \dfrac{1}{3} \begin{pmatrix} 1 \amp 1 \\ -1 \amp 2 \end{pmatrix}\\
\amp = \dfrac{1}{3} \begin{pmatrix} 2+(1/4)^n \amp 2-2(1/4)^n \\ 1-(1/4)^n \amp 1+2(1/4)^n \end{pmatrix}\text{.}
\end{align*}
Notice that
\begin{align*}
\lim_{n \to \infty} A^n \amp = \lim_{n \to \infty} \dfrac{1}{3} \begin{pmatrix} 2+(1/4)^n \amp 2-2(1/4)^n \\ 1-(1/4)^n \amp 1+2(1/4)^n \end{pmatrix}\\
\amp = \dfrac{1}{3} \begin{pmatrix} 2 \amp 2 \\ 1 \amp 1 \end{pmatrix}
\end{align*}
so that as \(n \to \infty\)
\begin{equation*}
w_n \to \dfrac{1}{3} \begin{pmatrix} 2 \amp 1 \\ 1 \amp 1 \end{pmatrix} \begin{pmatrix} 49000 \\ 2000 \end{pmatrix} = \begin{pmatrix} 34000 \\ 17000 \end{pmatrix}\text{.}
\end{equation*}
We conclude that the long term prognosis for the town is that there will be twice as many well people as sick people.
Exercises Example Tasks
1.
Calculate \(A^{100}\) if
\begin{equation*}
A = \begin{pmatrix} 1 \amp 2 \\ 2 \amp 4 \end{pmatrix}\text{.}
\end{equation*}
2.
Find a matrix \(P\) such that \(P^{-1} AP\) is diagonal if
\begin{equation*}
A = \begin{pmatrix} 0 \amp 3 \amp 0 \\ 1 \amp 0 \amp -1 \\ 0 \amp 2 \amp 0 \end{pmatrix}\text{.}
\end{equation*}