Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Matrix Powers


Visualization of Aⁿ as bracket-and-collapse: every cell shows its real symbolic content.

Matrix size (square)?Raising a matrix to a power means multiplying it by itself repeatedly: A^n = A · A · ... · A (n times). A must be square. Each cell of A^n is a sum of products of n entries of A, joining row-index to column-index step by step.
A2×2
Exponent
n4
Computing
A4 = A · A · A · A
A4 is repeated multiplication
A4 = A · A · A · A. 4 copies of A. We'll collapse them pairwise, watching the exponent grow and the cell content build up.
A2×2
a1,1
a1,2
a2,1
a2,2
·
A2×2
a1,1
a1,2
a2,1
a2,2
·
A2×2
a1,1
a1,2
a2,1
a2,2
·
A2×2
a1,1
a1,2
a2,1
a2,2
Step 1 / 7

Step explanations

1A4 is repeated multiplication
A4 = A · A · A · A. 4 copies of A. We'll collapse them pairwise, watching the exponent grow and the cell content build up.








Key Terms

Matrix powerAn=AAAA^n = A \cdot A \cdots A, the product of nn copies of a square matrix AA.

Square requirement — only a square matrix can be multiplied by itself; an m×nm \times n matrix with mnm \neq n has no powers.

Exponent rulesAmAn=Am+nA^m A^n = A^{m+n} and (Am)n=Amn(A^m)^n = A^{mn}, exactly as for numbers; A0=IA^0 = I and A1=AA^1 = A.

Associativity(AB)C=A(BC)(AB)C = A(BC), which is why the copies of AA can be grouped in any order and the power is well defined.

Path expansion — the entry (An)i,j(A^n)_{i,j} is the sum over all index chains ik1kn1ji \to k_1 \to \cdots \to k_{n-1} \to j of the products ai,k1ak1,k2akn1,ja_{i,k_1} a_{k_1,k_2} \cdots a_{k_{n-1},j}; there are sn1s^{n-1} of them for an s×ss \times s matrix.

Bracket and collapse — the tool's choreography: group the next pair of factors, then replace the pair by the higher power.

Diagonalization shortcut — if A=PDP1A = PDP^{-1} then An=PDnP1A^n = PD^nP^{-1}, and only the diagonal entries are raised to the power.

Nilpotent and idempotent — matrices with Ak=0A^k = 0 for some kk, or with A2=AA^2 = A; two cases where the powers stop changing.

Getting Started with the Visualizer

Set the size of AA and the exponent, then watch the copies collapse into a single power.

• Use the Matrix size stepper for 2×22 \times 2 up to 4×44 \times 4; both dimensions move together because AA must be square
• Use the Exponent stepper for nn from 11 to 55; the run has 2(n1)+12(n - 1) + 1 scenes, two per collapse plus the definition
• Hover the ? icon for a reminder of what a matrix power is and why the matrix must be square
• Press play or step manually through the scene player; the speed selector and step log let you control pace and review
• From A3A^3 upward the cells switch to a Σ\Sigma summary; hover any cell to see its full expansion as a tooltip, with the number of terms in its header

Everything is symbolic. The entries of AA stay as ai,ja_{i,j}, so what you see is the structure of each entry of AnA^n, not a numerical result.

Bracket and Collapse

The visualizer computes AnA^n the way the definition suggests: pairwise, from the left.

Definition — the opening scene shows nn copies of AA in a row with multiplication signs between them
Bracket — a dashed group encloses the leftmost pair, labelled with the power it is about to become; the exponents add, p+1p + 1
Collapse — the pair is replaced by a single matrix Ap+1A^{p+1}, highlighted, with one fewer bare copy of AA to its right
• The bracket and collapse repeat until one matrix remains; the final scene wraps AnA^n in a solid group

The left-to-right grouping is a choice, not a requirement. Matrix multiplication is associative, so (AA)A(A \cdot A) \cdot A and A(AA)A \cdot (A \cdot A) give the same A3A^3, and the caption on the final scene says so. What the choreography shows is the exponent growing by one at each collapse and the cell contents growing with it.

The Definition: n Copies of A

The player opens with nn copies of AA in a row, multiplication signs between them, and no power formed yet. At the defaults that is four 2×22 \times 2 copies.

Nothing is computed. What the scene establishes is the definition, A4=AAAAA^4 = A \cdot A \cdot A \cdot A, and the plan: collapse the copies pairwise from the left.
A2×2a1,1a1,2a2,1a2,2·A2×2a1,1a1,2a2,1a2,2·A2×2a1,1a1,2a2,1a2,2·A2×2a1,1a1,2a2,1a2,2
The definition, frozen

Four copies of A in a row: A4 = A·A·A·A. Nothing computed yet; the copies will collapse pairwise from the left, and associativity is what makes that choice harmless.

The row of identical factors is the whole content of the definition, and it makes the square requirement visible: each multiplication sign needs the columns of the matrix on its left to match the rows of the matrix on its right, which for identical matrices means rows equal columns.

Associativity is what makes the row unambiguous. Without it, AAAA \cdot A \cdot A would need brackets to mean anything; with it, any bracketing gives the same matrix, and the tool's left-to-right choice is just one of the possibilities.

The First Collapse: A Squared

The first bracket groups the leftmost pair and the first collapse replaces it by A2A^2, leaving two bare copies to its right. At 2×22 \times 2 every cell of A2A^2 is written out in full: ai,1a1,j+ai,2a2,ja_{i,1} a_{1,j} + a_{i,2} a_{2,j}.

The frozen picture below is that collapse: A2AAA^2 \cdot A \cdot A, with the square highlighted and its 2 terms per cell readable inline.
2×2a1,1a1,1+a1,2a2,1a1,1a1,2+a1,2a2,2a2,1a1,1+a2,2a2,1a2,1a1,2+a2,2a2,2·A2×2a1,1a1,2a2,1a2,2·A2×2a1,1a1,2a2,1a2,2
First collapse, frozen

A2·A·A with the square highlighted. Each cell reads ai,1a1,j + ai,2a2,j - a row of A against a column of A, the last power that fits inline.

Each cell of A2A^2 is a row of AA dotted with a column of AA, the same row-times-column rule as any product, applied to a matrix and itself. The two terms are the two chains i1ji \to 1 \to j and i2ji \to 2 \to j.

This is the last power at which everything fits in the cell. The next collapse multiplies every term by a further row-times-column sum, and the count doubles.

The Second Collapse: A Cubed and the Σ Summary

The second collapse forms A3A^3, and the cells change character: each now holds 4 products of three factors, too many to write inline, so the tool shows a Σ\Sigma summary and moves the full expansion into a hover tooltip.

The frozen picture below is A3AA^3 \cdot A with the cube highlighted, each cell reading k1,k2ai,k1ak1,k2ak2,j\sum_{k_1, k_2} a_{i,k_1} a_{k_1,k_2} a_{k_2,j}.
2×2Σk1,k2 a1,k1ak1,k2ak2,1Σk1,k2 a1,k1ak1,k2ak2,2Σk1,k2 a2,k1ak1,k2ak2,1Σk1,k2 a2,k1ak1,k2ak2,2·A2×2a1,1a1,2a2,1a2,2
Second collapse, frozen

A3·A with the cube highlighted. Four products per cell now, so the tool writes the Σ summary over k1, k2 and moves the expansion into a hover tooltip.

The summary is the general formula for a matrix power, one product for every chain of intermediate indices. Hovering a cell in the live tool lists the chains explicitly, and the header of the tooltip counts them.

Reading the Σ\Sigma as a sum over paths is what turns matrix powers into counting. For an adjacency matrix the products are 00 or 11 and the sum counts walks; for a transition matrix the products are probabilities and the sum is the probability of arriving in nn steps.

The Result: A to the Fourth

The final collapse leaves a single matrix, A4A^4, inside a solid outline. Each cell is a sum of 8 products of four factors, summarised as k1,k2,k3ai,k1ak3,j\sum_{k_1, k_2, k_3} a_{i,k_1} \cdots a_{k_3,j}.

The frozen picture below is the result at the defaults.
A⁴2×2Σk1,k2,k3 a1,k1ak3,1Σk1,k2,k3 a1,k1ak3,2Σk1,k2,k3 a2,k1ak3,1Σk1,k2,k3 a2,k1ak3,2
The result, frozen

A4 alone: eight products of four factors in every cell, one for each chain of intermediate indices. The term count doubled at every collapse.

The exponent went 1,2,3,41, 2, 3, 4 across the three collapses, and the term count went 1,2,4,81, 2, 4, 8: multiplying by one more AA doubles the number of chains, because each existing chain can be extended through either of the two intermediate indices.

The final caption makes the point that the bracketing did not matter. Grouping from the right, or as (AA)(AA)(A \cdot A)(A \cdot A), would have produced the same matrix by a different sequence of scenes, and that freedom, associativity, is what makes A4A^4 a well-defined thing rather than a recipe.

Reading the Scene Player

The cells change character as the power grows, because their content grows exponentially.

AA — each cell is a single entry ai,ja_{i,j}
A2A^2 — each cell shows its full content inline: for a 2×22 \times 2, ai,1a1,j+ai,2a2,ja_{i,1} a_{1,j} + a_{i,2} a_{2,j}, two products
A3A^3 and beyond — each cell shows a Σ\Sigma summary, k1,k2ai,k1ak1,k2ak2,j\sum_{k_1, k_2} a_{i,k_1} a_{k_1,k_2} a_{k_2,j}, because the full sum has sn1s^{n-1} terms; hover the cell and a tooltip lists every term, with the count in its header
• In a bracket scene, the two matrices being grouped are highlighted primary inside a dashed outline labelled with the coming power
• In a collapse scene, the new power is highlighted accent, and on the final scene it sits inside a solid outline
• The step log on the right keeps a record of every bracket and collapse

The tooltips are where the definition becomes concrete. A cell of A4A^4 in a 3×33 \times 3 matrix holds 2727 products of four factors each; the tooltip shows all of them.

Choosing Size and Exponent

Size sets how many terms each cell has; the exponent sets how many factors each term has.

• A 2×22 \times 2 matrix at exponent 22 is the smallest non-trivial case: four cells, two terms each, everything visible inline
• Raising the exponent to 33 at size 22 gives four terms per cell, and the display switches to the Σ\Sigma summary with tooltips
• Raising the size to 33 at exponent 22 gives three terms per cell, still inline; at exponent 33, nine terms; at exponent 44, twenty-seven
• A 4×44 \times 4 matrix at exponent 55 has 256256 terms per cell, which is the point at which the Σ\Sigma notation stops being a convenience and becomes the only sensible way to write the entry

The term count is sn1s^{n-1} for an s×ss \times s matrix, one term for every chain of intermediate indices. That growth is why powers are computed by repeated multiplication or by diagonalization, never by expanding the formula.

What a Matrix Power Is

For a square matrix AA and a positive integer nn,

An=AAAn factors,A0=IA^n = \underbrace{A \cdot A \cdots A}_{n \text{ factors}}, \qquad A^0 = I


Because matrix multiplication is associative, the product does not depend on how the factors are grouped, and the familiar exponent rules follow: AmAn=Am+nA^m A^n = A^{m+n} and (Am)n=Amn(A^m)^n = A^{mn}. What does not follow is anything involving two different matrices: (AB)n(AB)^n is not AnBnA^n B^n unless AA and BB commute.

Entry by entry, the power is a sum over chains of indices. Applying the row-times-column rule n1n - 1 times gives

(An)i,j=k1,,kn1ai,k1ak1,k2akn1,j(A^n)_{i,j} = \sum_{k_1, \ldots, k_{n-1}} a_{i,k_1} a_{k_1,k_2} \cdots a_{k_{n-1},j}


one product for every way of getting from ii to jj in nn steps through intermediate indices. This is the formula the tool's cells display, inline while it is short and as a Σ\Sigma with a tooltip once it is not.

The path reading is literal for adjacency matrices: if ai,ja_{i,j} is 11 when there is an edge from ii to jj and 00 otherwise, then (An)i,j(A^n)_{i,j} counts the walks of length nn from ii to jj. For the algebra of matrix operations in general, see the matrix operations theory page.

Key Properties

Powers of a single matrix behave like powers of a number; powers of products do not.

Exponent rules: AmAn=Am+nA^m A^n = A^{m+n}, (Am)n=Amn(A^m)^n = A^{mn}, A0=IA^0 = I
Commuting powers: AmA^m and AnA^n always commute with each other
Products: (AB)n=AnBn(AB)^n = A^n B^n only when AB=BAAB = BA
Determinant: det(An)=(detA)n\det(A^n) = (\det A)^n
Transpose and inverse: (An)T=(AT)n(A^n)^T = (A^T)^n, and (An)1=(A1)n=An(A^n)^{-1} = (A^{-1})^n = A^{-n} when AA is invertible
Diagonal matrices: DnD^n raises each diagonal entry to the nn-th power
Diagonalizable matrices: A=PDP1A = PDP^{-1} gives An=PDnP1A^n = PD^nP^{-1}, so the eigenvalues are raised to the power and the eigenvectors are untouched
Idempotent: A2=AA^2 = A means every power equals AA; projections are the standard example
Nilpotent: Ak=0A^k = 0 for some kk; strictly triangular matrices are the standard example
Growth: for large nn, AnA^n is dominated by the eigenvalue of largest absolute value

Why It Matters

Anything that evolves by the same linear rule at every step is a matrix power.

Markov chains: if PP holds the one-step transition probabilities, PnP^n holds the nn-step probabilities, and PnP^n converging is the chain settling to a steady state
Graph walks: (An)i,j(A^n)_{i,j} counts walks of length nn from vertex ii to vertex jj in the graph with adjacency matrix AA
Linear recurrences: the Fibonacci numbers, and every sequence defined by a fixed linear rule, are read off the powers of a companion matrix
Discrete dynamical systems: population models, coupled oscillators sampled in time, and any system with xt+1=Axt\mathbf{x}_{t+1} = A\mathbf{x}_t have xt=Atx0\mathbf{x}_t = A^t \mathbf{x}_0
The matrix exponential: eAt=Antn/n!e^{At} = \sum A^n t^n / n! solves linear differential equations, and every term is a matrix power
Eigenvalues by iteration: power iteration multiplies a vector by AA repeatedly, and the vector turns toward the dominant eigenvector

Worked Example

Take the Fibonacci matrix

A=(1110)A = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}


Then

A2=(2111),A3=(3221),A4=(5332),A5=(8553)A^2 = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}, \quad A^3 = \begin{pmatrix} 3 & 2 \\ 2 & 1 \end{pmatrix}, \quad A^4 = \begin{pmatrix} 5 & 3 \\ 3 & 2 \end{pmatrix}, \quad A^5 = \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix}


Every power holds three consecutive Fibonacci numbers: AnA^n has Fn+1F_{n+1} in the top left, FnF_n on the anti-diagonal, and Fn1F_{n-1} in the bottom right. The exponent rule Am+n=AmAnA^{m+n} = A^m A^n turns into the addition formula Fm+n=FmFn+1+Fm1FnF_{m+n} = F_m F_{n+1} + F_{m-1} F_n, and det(An)=(detA)n=(1)n\det(A^n) = (\det A)^n = (-1)^n is Cassini's identity, Fn+1Fn1Fn2=(1)nF_{n+1} F_{n-1} - F_n^2 = (-1)^n.

Check one entry of A4A^4 against the path formula: (A4)1,1(A^4)_{1,1} is the sum over the eight chains 1k1k2k311 \to k_1 \to k_2 \to k_3 \to 1 of the products a1,k1ak1,k2ak2,k3ak3,1a_{1,k_1} a_{k_1,k_2} a_{k_2,k_3} a_{k_3,1}. Since the only zero entry is a2,2a_{2,2}, a chain contributes 11 exactly when it never steps 222 \to 2; there are five such chains, and (A4)1,1=5=F5(A^4)_{1,1} = 5 = F_5. Set the visualizer to 2×22 \times 2 and exponent 44, hover the top-left cell of A4A^4, and count the eight terms.

Common Mistakes

A few mistakes recur.

Raising each entry to the powerA2A^2 is AAA \cdot A, not the matrix of squared entries; those agree only for diagonal matrices
Applying (AB)n=AnBn(AB)^n = A^n B^n — false unless AA and BB commute, because the factors cannot be reordered
Powers of non-square matrices — undefined; the inner dimensions of AAA \cdot A must match, which forces AA to be square
Expanding the formula by hand — the term count is sn1s^{n-1} per cell; multiply repeatedly or diagonalize instead
Forgetting A0=IA^0 = I — the empty product is the identity, which is what makes AmA0=AmA^m A^0 = A^m work
Expecting powers to shrink or grow uniformly — the behaviour of AnA^n is governed by the eigenvalues, and different directions can grow, shrink or rotate at the same time