Matrix Power Calculator - Raise a 2x2 A to the nth Power

Use this matrix power calculator to raise a 2x2 matrix A to an integer power n and read the A^1, A^2, and A^n cells with a det(A) check for negative exponents.

Updated: June 16, 2026 • Free Tool

Matrix Power Calculator

Entry in row 1, column 1 of the 2x2 input matrix A. Decimals and negatives allowed.

Entry in row 1, column 2 of matrix A.

Entry in row 2, column 1 of matrix A.

Entry in row 2, column 2 of matrix A. This is the diagonal partner of a11.

Integer exponent n applied to A. Use 0 for the identity, negative integers when A is invertible.

Results

A^n row 1, col 1
0
A^n row 1, col 2 0
A^n row 2, col 1 0
A^n row 2, col 2 0
A^1 row 1, col 1 (input echo) 0
A^1 row 1, col 2 (input echo) 0
A^1 row 2, col 1 (input echo) 0
A^1 row 2, col 2 (input echo) 0
A^2 row 1, col 1 0
A^2 row 1, col 2 0
A^2 row 2, col 1 0
A^2 row 2, col 2 0
det(A) (a11*a22 - a12*a21) 0
Status (negative-n flag) Ready

What Is Matrix Power Calculator?

A matrix power calculator raises a square matrix A to an integer power n by repeated matrix multiplication. Type the four cells of a 2x2 matrix A, pick an integer exponent n, and the result panel returns A^1, A^2, and A^n with a det(A) line and a status flag for the singular-matrix case on negative n.

  • Linear-algebra homework: Confirm A^n by hand on a 2x2 matrix, then check each cell against the row-by-column rule.
  • Recurrence relations and sequences: Model Fibonacci or other linear recurrences with the 2x2 companion matrix.
  • Computer graphics transforms: Compose scaling, rotation, and shear matrices by raising a transform to a power.
  • Markov chain step n: Raise a 2x2 transition matrix to a power to project the chain n steps ahead.

Matrix power extends matrix multiplication. A^1 is A, A^2 is A * A, and A^n is A multiplied by itself n times. A^0 returns the identity, and a negative exponent is legal when A is invertible.

If you want the row-by-column product for two different matrices, the matrix multiplication calculator applies the same dot-product rule this calculator uses to build A * A.

How Matrix Power Calculator Works

The calculator reads the four cells of the 2x2 matrix A and the integer exponent n, then multiplies A by itself |n| times using the row-by-column rule. A^0 returns I, and negative exponents use A^(-1) first.

A^n = A · A · A · ... · A (n times), with A^0 = I, and A^(-n) = (A^(-1))^n when det(A) != 0
  • A[i][k]: Entry in row i, column k of the left factor. The index k runs across the inner dimension of size 2 for a 2x2 by 2x2 product.
  • A[k][j]: Entry in row k, column j of the right factor, sharing the same k with the left factor's column index.
  • n: Integer exponent applied to A. n = 0 returns the identity, and negative integers require A to be invertible.
  • det(A): Determinant a11 * a22 - a12 * a21. When this value is zero and n is negative, the A^n cells show '—' and the status line reads 'Singular - A^n undefined for negative n'.

The result panel lists the cells in the same row-column order as the input matrix, so each cell maps directly between A and A^n. A^1 and A^2 appear separately, det(A) is shown explicitly, and the status line flags the singular-matrix case for negative n.

Worked example: A = [[2, 1], [1, 2]] raised to the power 3

A = [[2, 1], [1, 2]] and n = 3.

A^2 = A * A = [[5, 4], [4, 5]]. A^3 = A^2 * A = [[14, 13], [13, 14]].

A^3 = [[14, 13], [13, 14]].

Each cell of A^3 is the dot product of one row of A^2 with one column of A.

As published by Wolfram MathWorld, the n-th power of a square matrix A is the matrix product of A with itself n times, and the zero-th power is the identity matrix of the same size. Wikipedia gives the same rule in terms of the n-fold product A · A · ... · A.

When n is negative, the calculator inverts A first, and the matrix inverse calculator walks through the same adjugate-over-determinant step that powers the negative-exponent branch of this page.

Key Concepts Explained

Four short ideas cover what matrix power means, what the n = 0 case collapses to, why A^(-1) sometimes does not exist, and how the result behaves for large n.

A^0 is the identity matrix I

The zero-th power of any square matrix A is the matching identity matrix I, with 1s on the diagonal and 0s off-diagonal. The result panel returns I for n = 0 regardless of the entries of A.

A^1, A^2, A^n share the row-by-column rule

Each cell of A^2, A^3, and A^n is a sum of products across the shared inner dimension. The result panel returns A^1 and A^2 separately so the pattern is visible before the full n-th power.

Negative exponents require an invertible matrix

A^(-n) is defined as (A^(-1))^n, so A has to be invertible. The 2x2 case requires det(A) = a11*a22 - a12*a21 to be non-zero.

Some matrices collapse to zero for large n

A nilpotent matrix such as [[0, 1], [0, 0]] satisfies A^2 = 0, so A^n is the zero matrix for every n greater than or equal to 2.

These four ideas cover the matrix power questions that come up early in linear algebra. The most common slip is treating A^n as the entrywise power a[i][j]^n, which it is not. The result panel returns I for n = 0, so that case is a quick sanity check.

For matrices that grow rapidly with n, the matrix norm calculator puts a number on the size of A^n with the Frobenius or infinity norm once you have the result.

How to Use This Calculator

Enter the four cells of matrix A, pick an integer exponent n from -10 to 25, then read the A^1, A^2, and A^n cells in the result panel.

  1. 1 Type the first row of A: Fill in A row 1, col 1 and A row 1, col 2 with the top row of the matrix A.
  2. 2 Type the second row of A: Fill in A row 2, col 1 and A row 2, col 2 with the bottom row of A.
  3. 3 Pick the exponent n: Enter an integer exponent in the n field. Use 0 to see the identity, positive integers to grow the power, and negative integers only when A is invertible.
  4. 4 Read det(A) and the status line: If n is negative and det(A) is zero, the four A^n cells display '—' and the status line reads 'Singular - A^n undefined for negative n'.
  5. 5 Read A^1 and A^2 first: The A^1 echo and A^2 cells confirm the matrix was entered correctly and the row-by-column rule is producing the right square.
  6. 6 Read the A^n result: The four A^n cells at the top of the result panel are the final answer. Use them in a hand calculation or a Markov-chain step.

Modelling a Fibonacci sequence with A = [[1, 1], [1, 0]] and asking for F_6: type A into the four cells, set n to 5, and the matrix power calculator returns A^5 = [[8, 5], [5, 3]]. The top row reads (F_6, F_5) = (8, 5), which gives F_6 from the A^n cells.

When the second factor is a single number rather than a 2x2 matrix, the math power calculator applies the same exponent rule to scalars and returns the entrywise power a^n.

Benefits of Using This Calculator

The row-by-column rule is short, but tracking which row goes with which column across |n| multiplications goes wrong by hand. The matrix power calculator surfaces det(A) and a status flag so the singular-matrix case for negative n is impossible to miss.

  • A^1, A^2, and A^n side by side: The result panel returns A^1, A^2, and A^n at the same time so you can read how the cells grow across powers.
  • det(A) line and status flag for negative exponents: The result panel shows det(A) and the 'Singular - A^n undefined for negative n' status when A is singular and n is negative.
  • Covers n = 0, n > 0, and n < 0 in one form: The same form covers the identity case, the repeated-product case, and the negative case, so you do not have to switch tools.
  • Matches the textbook row-by-column rule: The calculation applies the rule |n| times, so the cells of A^n match what you would write by hand.
  • Real-time updates as you type: The form recalculates on every keystroke, so you can try different exponents.

The biggest payoff is the negative-exponent case: many homework sets ask for A^(-1) of a 2x2 matrix, and the det(A) line tells you immediately whether the inverse exists. The A^1 cells double as an entry check, and the status line keeps the undefined case separate from a real zero result.

If you need a quick entrywise scaling before raising the matrix to a power, the matrix by scalar calculator walks through the cell-by-cell kA step that you can apply first to A.

Factors That Affect Your Results

A few input choices and structural facts decide what the cells of A^n look like and whether the negative-exponent branch is even defined.

Exponent n and the identity case

Positive n builds A^n by repeated multiplication, n = 0 always returns I, and negative n requires A to be invertible. n = 0 is a useful sanity check.

Determinant of A and the negative-exponent status

For the 2x2 case, det(A) = a11 * a22 - a12 * a21. When det(A) is zero, A is singular and A^(-1) does not exist, so the result panel shows '—' in the four A^n cells and the status line reads 'Singular - A^n undefined for negative n' instead of returning 0.

Symmetric and diagonal matrices

A symmetric matrix (a12 = a21) keeps A^n symmetric for every n; a diagonal matrix (a12 = a21 = 0) keeps the off-diagonal cells at zero.

Nilpotent matrices collapse to zero for large n

A nilpotent input such as [[0, 1], [0, 0]] satisfies A^2 = 0, so the result panel returns the zero matrix for n >= 2.

Magnitude of the entries and roundoff for large n

Large entries (for example a 2x2 matrix with 1,000 in each cell) grow as 1,000^n, which can overflow standard JavaScript numbers. The exponent is capped at 25.

  • The calculator is limited to 2x2 matrices and integer exponents from -10 to 25. For a 3x3 matrix, the row-by-column rule still applies but each cell becomes a 3-term sum of products.
  • Output values are rounded to four decimal places for display, so a true fraction like 1/3 will appear as 0.3333 in the cell.

Roundoff for large n matches repeated matrix multiplication because each cell of A^n is a chain of |n| row-by-column products. The result is exact to four decimal places for most 2x2 inputs.

According to Wikipedia, a square matrix A is invertible exactly when its determinant is non-zero, and A^(-1) is the unique matrix that satisfies A * A^(-1) = A^(-1) * A = I.

When the negative-exponent case is too tight to compute by hand, the adjoint matrix calculator returns the adjugate [[a22, -a12], [-a21, a11]] that powers A^(-1) = adj(A) / det(A) using the same four input cells.

Matrix power calculator showing a 2x2 matrix A and the A^1, A^2, and A^n result cells
Matrix power calculator showing a 2x2 matrix A and the A^1, A^2, and A^n result cells

Frequently Asked Questions

Q: How do you raise a 2x2 matrix to a power?

A: Type the four cells of the 2x2 input matrix A and an integer exponent n, and the calculator returns the cells of A^n by applying the row-by-column rule |n| times. For n = 0 the result is the 2x2 identity matrix I.

Q: What is the matrix power formula?

A: The matrix power formula is A^n = A · A · A · ... · A, with A multiplied by itself n times. For n = 0 the result is the identity matrix, and for negative n the result is (A^(-1))^|n| whenever A is invertible.

Q: Can a matrix be raised to a negative power?

A: Yes, as long as the matrix is invertible. A^(-n) is defined as (A^(-1))^n, so the 2x2 case requires det(A) = a11*a22 - a12*a21 to be non-zero. The calculator shows that determinant and a status line that reads 'Singular - A^n undefined for negative n' when the inverse does not exist.

Q: What is A to the power 0?

A: A to the power 0 is the matching identity matrix I, with 1s on the diagonal and 0s off the diagonal. The result panel always returns I for n = 0 regardless of the entries of A.

Q: How is matrix power different from scalar power?

A: Scalar power a^n multiplies the same number n times and the result is still a number. Matrix power A^n multiplies the same matrix n times using the row-by-column rule and the result is still a matrix of the same size as A, with each cell a sum of products that runs across the inner dimension.

Q: When does a matrix power become the zero matrix?

A: A nilpotent matrix collapses to the zero matrix for large enough n. For the 2x2 case the classic example is A = [[0, 1], [0, 0]], which satisfies A^2 = 0, so A^n = 0 for every n greater than or equal to 2.