Matrix Power Calculator

Raise a square matrix to a whole-number power.

Matrix A
Size
2

Write rows separated by semicolons, like 1, 2; 3, 4.

A whole number from 0 to 20.

Try

Result

You entered(1110)5\begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^{5}

(8553)\displaystyle \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix}
Show the work
  1. Repeated squaring

    Squaring over and over reaches a high power in few multiplications: A2A^2, then A4A^4, then A8A^8, and so on, doubling the exponent each time, until the next square would pass n=5n = 5. Entry (i,j)(i, j) of a product is row ii of the left matrix multiplied, entry by entry, with column jj of the right matrix, and the products added.

    Using A2m=AmAmA^{2m} = A^m A^m

    A2=(1110)×(1110)=(2111)A^{2} = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} \times \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}
  2. Repeated squaring

    Square A2A^{2} to get A4A^{4}.

    A4=(2111)×(2111)=(5332)A^{4} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} \times \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 5 & 3 \\ 3 & 2 \end{pmatrix}
  3. Binary expansion of the exponent

    Write n=5n = 5 as a sum of the powers of 2 that were found, then multiply the matching powers of AA together, because AaAb=Aa+bA^{a} A^{b} = A^{a+b}.

    5=1+45 = 1 + 4
  4. Multiply the powers

    Multiply A1A^{1} by A4A^{4} to get A5A^{5}.

    A5=(1110)×(5332)=(8553)A^{5} = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} \times \begin{pmatrix} 5 & 3 \\ 3 & 2 \end{pmatrix} = \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix}
  5. Result

    So A5=(8553)A^{5} = \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix}.

Worked examples