Power of a matrix

On this post we explain how to calculate the power of a matrix. Here you will find examples and exercises solved step by step of matrix powers that will help you understand it perfectly. You will also learn what the nth power of a matrix is and how to find it.

How to find the power of a matrix?

To find the power of a matrix, multiply the matrix by itself as many times as the exponent indicates.

A^4=A\cdot A\cdot A \cdot A

Therefore, to calculate the power of a matrix, you must first know how to multiply matrices. Otherwise you will not be able to calculate the power of a matrix. Then, before reading any further, we recommend that you first see the matrix multiplication algorithm.

Example of the power of a matrix

Let A be a 2×2 square matrix, the 4th power of matrix A is calculated as follows:

power of 2x2 matrices examples

There is an important property of matrix power that you must know: you can only calculate the power of a matrix when it is a square matrix.

The power of a matrix can also be calculated using using eigenvalues, that is, by diagonalizing the matrix. However, you have to know how to do a matrix diagonalization. In this link you will find how to diagonalize a matrix and also how to calculate the power of a matrix by diagonalization.

What is the nth power of a matrix?

The nth power of a matrix is an expression that allows us to calculate any power of a matrix easily.

Many times powers of matrices follow a pattern. Therefore, if we find the sequence that the powers of a matrix follow, we can calculate any power without having to do all the multiplications.

This means that we can find a formula that gives us the nth power of a matrix without having to calculate all the powers.

The formula of some matrix powers can be found as follows:

  • The parity of the exponent. It may be that the even powers are one way and odd powers another.
  • Variation in signs. For example, it could be that the elements of the even powers are positive and the elements of the odd powers negative, or vice versa.
  • Repetition: whether the same matrix is repeated every a certain number of powers or not.
  • There is a mathematical relationship between the exponent and the elements of the matrix.

Example of the nth power of a matrix

  • Let A be a the following matrix of order 2, find An and A100:

\displaystyle A = \begin{pmatrix} 1 & 1 \\[1.1ex] 1 & 1 \end{pmatrix}

First we are going to calculate several powers of matrix A to try to guess the pattern that the powers follow. So we calculate the five first powers of the matrix:

power of a matrix in mathematica

When calculating up to A5, we see that the powers of matrix A follow a pattern: with each increase in power the result is multiplied by 2. Therefore, all the elements of the matrices are powers of 2:

  \displaystyle A^2= \begin{pmatrix} 2 & 2 \\[1.1ex] 2 & 2 \end{pmatrix} =\begin{pmatrix} 2^1 & 2^1 \\[1.1ex] 2^1 & 2^1 \end{pmatrix}

  \displaystyle A^3= \begin{pmatrix} 4 & 4 \\[1.1ex] 4 & 4 \end{pmatrix}=\begin{pmatrix} 2^2 & 2^2 \\[1.1ex] 2^2 & 2^2 \end{pmatrix}

  \displaystyle A^4= \begin{pmatrix} 8 & 8 \\[1.1ex] 8 & 8 \end{pmatrix}=\begin{pmatrix} 2^3 & 2^3 \\[1.1ex] 2^3 & 2^3 \end{pmatrix}

  \displaystyle A^5= \begin{pmatrix} 16 & 16 \\[1.1ex] 16 & 16 \end{pmatrix}=\begin{pmatrix} 2^4 & 2^4 \\[1.1ex] 2^4 & 2^4 \end{pmatrix}

So we can deduce by induction that the formula for the nth power of matrix A is as follows:

how to find the nth power of a matrix

And from this formula we can calculate matrix A raised to 100:

matrix raised to a power

Practice matrix power

Problem 1

Given the following 2×2 dimension matrix:

 \displaystyle A=\begin{pmatrix} 1 & 2 \\[1.1ex] -1 & 1 \end{pmatrix}

Raise the matrix to the fourth power.

To calculate the power of a matrix, we have to multiply the matrix one by one. Therefore, we first calculate the square of matrix A:

  \displaystyle A^2= A \cdot A = \begin{pmatrix} 1 & 2 \\[1.1ex] -1 & 1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 \\[1.1ex] -1 & 1 \end{pmatrix} = \begin{pmatrix} -1 & 4 \\[1.1ex] -2 &  -1\end{pmatrix}

Now we calculate the cube of matrix A:

 \displaystyle A^3= A^2 \cdot A = \begin{pmatrix} -1 & 4 \\[1.1ex] -2 &  -1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 \\[1.1ex] -1 & 1 \end{pmatrix} =\begin{pmatrix} -5 & 2 \\[1.1ex] -1 &  -5 \end{pmatrix}

And finally we determine A4:

 \displaystyle A^4= A^3 \cdot A = \begin{pmatrix} -5 & 2 \\[1.1ex] -1 &  -5 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 \\[1.1ex] -1 & 1 \end{pmatrix} = \begin{pmatrix} \bm{-7} & \bm{-8} \\[1.1ex] \bm{4} &  \bm{-7} \end{pmatrix}

 

Problem 2

Given the following matrix of order 2:

\displaystyle A=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix}

Calculate:

\displaystyle A^{35}

A35 is a power too large to calculate by hand, therefore the powers of the matrix must follow a pattern. So we’re going to calculate up to A5 to try to figure out the sequence:

 \displaystyle A^2= A \cdot A = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix} \cdot \begin{pmatrix}1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 9 \end{pmatrix}

\displaystyle A^3= A^2 \cdot A = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 9 \end{pmatrix} \cdot \begin{pmatrix}1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 27 \end{pmatrix}

\displaystyle A^4= A^3 \cdot A = \begin{pmatrix}1 & 0 \\[1.1ex] 0 & 27 \end{pmatrix} \cdot \begin{pmatrix}1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 81 \end{pmatrix}

\displaystyle A^5= A^4 \cdot A = \begin{pmatrix}1 & 0 \\[1.1ex] 0 & 81 \end{pmatrix} \cdot \begin{pmatrix}1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 243 \end{pmatrix}

Now we can see the pattern that the powers follow: at each power all numbers remain the same, except for the element in the second column of the second row, which is multiplied by 3. Therefore, all numbers always remain the same and the last element is a power of 3:

 \displaystyle A=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3 \end{pmatrix}=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3^1 \end{pmatrix}

\displaystyle A^2=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 9 \end{pmatrix}=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3^2 \end{pmatrix}

\displaystyle A^3=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 27 \end{pmatrix}=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3^3 \end{pmatrix}

\displaystyle A^4=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 81 \end{pmatrix}=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3^4 \end{pmatrix}

\displaystyle A^5=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 243 \end{pmatrix}=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3^5 \end{pmatrix}

Thus, the formula for the nth power of matrix A is:

 \displaystyle A^n=\begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 3^n\end{pmatrix}

And from this formula we can calculate A35:

  \displaystyle\bm{A^{35}=}\begin{pmatrix} \bm{1} & \bm{0} \\[1.1ex] \bm{0} & \bm{3^{35}}\end{pmatrix}

 

Problem 3

Given the following 3×3 dimension matrix:

\displaystyle A=\begin{pmatrix} 1 & \frac{1}{5}  & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

Calculate:

\displaystyle A^{100}

A100 is a power too large to calculate by hand, which means that the powers must follow a pattern. So we’re going to calculate up to A5 to try to figure out the sequence:

\displaystyle A^2= A \cdot A = \begin{pmatrix} 1 & \frac{1}{5}  & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix} \cdot \begin{pmatrix}1 & \frac{1}{5}  & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix} =  \begin{pmatrix} 1 & \frac{2}{5}   & \frac{2}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^3= A^2 \cdot A = \begin{pmatrix} 1 & \frac{2}{5}   & \frac{2}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1\end{pmatrix} \cdot \begin{pmatrix}1 & \frac{1}{5}  & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix} = \begin{pmatrix} 1 & \frac{3}{5}   & \frac{3}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^4= A^3 \cdot A = \begin{pmatrix} 1 & \frac{3}{5}   & \frac{3}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1\end{pmatrix} \cdot \begin{pmatrix}1 & \frac{1}{5}  & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix} =  \begin{pmatrix} 1 & \frac{4}{5}   & \frac{4}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^5= A^4 \cdot A = \begin{pmatrix} 1 & \frac{4}{5}   & \frac{4}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1\end{pmatrix} \cdot \begin{pmatrix}1 & \frac{1}{5}  & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix} =  \begin{pmatrix} 1 & \frac{5}{5}   & \frac{5}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

Thus, at each power all numbers remain the same except for the fractions, which increase by one unit in the numerator:

 \displaystyle A=\begin{pmatrix} 1 & \frac{1}{5}   & \frac{1}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^2= \begin{pmatrix} 1 & \frac{2}{5}   & \frac{2}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^3= \begin{pmatrix} 1 & \frac{3}{5}   & \frac{3}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^4= \begin{pmatrix} 1 & \frac{4}{5}   & \frac{4}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

\displaystyle A^5= \begin{pmatrix} 1 & \frac{5}{5}   & \frac{5}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

So the formula that defines the nth power of matrix A is:

\displaystyle A^n= \begin{pmatrix} 1 & \frac{n}{5}   & \frac{n}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}

And from this formula we can find A100:

  \displaystyle A^{100}=   \begin{pmatrix} 1 & \frac{100}{5}   & \frac{100}{5} \\[1.1ex] 0 & 1  & 0 \\[1.1ex] 0 & 0  & 1 \end{pmatrix}= \begin{pmatrix} \bm{1} & \bm{20}   & \bm{20} \\[1.1ex] \bm{0} & \bm{1}  & \bm{0} \\[1.1ex] \bm{0} & \bm{0}  & \bm{1} \end{pmatrix}

 

Problem 4

Given the following matrix of size 2×2:

\displaystyle A=\begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix}

Find:

 \displaystyle A^{201}

A201 is a power too large to calculate by hand, therefore the powers of the matrix must follow a pattern. In this case, we must calculate up to A8 in order to find out their sequence:

 \displaystyle A^2= A \cdot A = \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} -1 & 0 \\[1.1ex] 0 & -1 \end{pmatrix}

\displaystyle A^3= A^2 \cdot A = \begin{pmatrix} -1 & 0 \\[1.1ex] 0 & -1 \end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 1 \\[1.1ex] -1 & 0 \end{pmatrix}

 \displaystyle A^4= A^3 \cdot A = \begin{pmatrix}0 & 1 \\[1.1ex] -1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 1 \end{pmatrix} = \bm{I}

\displaystyle A^5= A^4 \cdot A = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 1\end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix}

\displaystyle A^6= A^5 \cdot A = \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} -1 & 0 \\[1.1ex] 0 & -1 \end{pmatrix}

\displaystyle A^7= A^6 \cdot A = \begin{pmatrix} -1 & 0 \\[1.1ex] 0 & -1 \end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 1 \\[1.1ex] -1 & 0 \end{pmatrix}

\displaystyle A^8= A^7 \cdot A = \begin{pmatrix}0 & 1 \\[1.1ex] -1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 0 & -1 \\[1.1ex] 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\[1.1ex] 0 & 1 \end{pmatrix} = \bm{I}

With these calculations we can see that every 4 powers we obtain the identity matrix. That is, powers A4, A8, A12, A16, … will result in the identity matrix. So to calculate A201 we have to decompose 201 into multiples of 4:

201=4\cdot 50+1

Thus, A201 will be 50 times A4 and once A1:

\displaystyle A^{201}=\left(A^4 \right)^{50} \cdot A^1

Since we know that A4 is the identity matrix:

\displaystyle A^4 =I

\displaystyle A^{201}=\left(A^4 \right)^{50} \cdot A^1 = I^{50}\cdot A

Besides, the identity matrix raised to any number gives the identity matrix. So:

 \displaystyle A^{201}= I^{50}\cdot A = I \cdot A

And finally, any matrix multiplied by the identity matrix results in the same matrix. Thus:

 \displaystyle A^{201}= I \cdot A = A

So A201 is equal to A:

 \displaystyle A^{201}= A =\begin{pmatrix} \bm{0} & \bm{-1} \\[1.1ex] \bm{1} & \bm{0} \end{pmatrix}

 

Problem 5

Given the following square matrix of order 3:

\displaystyle A=\begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix}

Calculate:

\displaystyle A^{62}

Obviously, A62 is a calculation too large a to do by hand, so the powers of the matrix have to follow a pattern. In this case we must calculate up to A6 in order to find out the sequence that they follow:

\displaystyle A^2= A \cdot A = \begin{pmatrix}3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} \cdot \begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} = \begin{pmatrix} 3 & 3 & 1 \\[1.1ex] -2 & -2 & -1 \\[1.1ex] 0 & 1 & -1 \end{pmatrix}

\displaystyle A^3= A^2 \cdot A = \begin{pmatrix}3 & 3 & 1 \\[1.1ex] -2 & -2 & -1 \\[1.1ex] 0 & 1 & -1\end{pmatrix} \cdot \begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\[1.1ex] 0 & 1 & 0 \\[1.1ex] 0 & 0 & 1 \end{pmatrix}

\displaystyle A^4= A^3 \cdot A = \begin{pmatrix}1 & 0 & 0 \\[1.1ex] 0 & 1 & 0 \\[1.1ex] 0 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} = \begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix}

\displaystyle A^5= A^4 \cdot A = \begin{pmatrix}3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} \cdot \begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} = \begin{pmatrix} 3 & 3 & 1 \\[1.1ex] -2 & -2 & -1 \\[1.1ex] 0 & 1 & -1 \end{pmatrix}

\displaystyle A^6= A^5 \cdot A = \begin{pmatrix}3 & 3 & 1 \\[1.1ex] -2 & -2 & -1 \\[1.1ex] 0 & 1 & -1\end{pmatrix} \cdot \begin{pmatrix} 3 & 4 & -1 \\[1.1ex] -2 & -3 & 1 \\[1.1ex] -2 & -3 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\[1.1ex] 0 & 1 & 0 \\[1.1ex] 0 & 0 & 1 \end{pmatrix}

With these calculations we can see that every 3 powers we obtain the identity matrix. In other words, powers A3, A6, A9, A12, … result in the identity matrix. So to calculate A62 we have to decompose 62 into multiples of 3:

62 = 3 \cdot 20 +2

Thus, A62 is 20 times A3 and once A2:

\displaystyle A^{62}=\left(A^3 \right)^{20} \cdot A^2

Since we know that A3 is the identity matrix:

\displaystyle A^3 =I

\displaystyle A^{62}=\left(A^3 \right)^{20} \cdot A^2 = I^{20}\cdot A^2

Besides, the identity matrix raised to any number gives the identity matrix. So:

\displaystyle A^{62}= I^{20}\cdot A^2 = I \cdot A^2

Finally, any matrix multiplied by the identity matrix results in the same matrix. So:

\displaystyle A^{62}= I \cdot A^2 = A^2

So A62 will be equal to A2:

 \displaystyle A^{62}= A^2=\begin{pmatrix} \bm{3} & \bm{3} & \bm{1} \\[1.1ex] \bm{-2} & \bm{-2} & \bm{-1} \\[1.1ex] \bm{0} & \bm{1} & \bm{-1} \end{pmatrix}

 

2 thoughts on “Power of a matrix”

Leave a Comment

Your email address will not be published. Required fields are marked *