Matrix Power Calculator

Raise a square matrix to any positive, zero, or negative integer power with fast exponentiation.

Calculate a matrix power
Enter a square matrix and integer exponent to compute A raised to n.

Separate columns with commas and rows with semicolons. Negative powers require an invertible matrix.

About matrix powers

A matrix power repeats matrix multiplication in much the same way that an ordinary power repeats scalar multiplication. If A is square, A squared means A multiplied by A, while A cubed means A multiplied by A multiplied by A. Matrix multiplication is not entry-by-entry multiplication: each output entry is a row-by-column dot product. That distinction makes matrix powers useful for describing repeated linear transformations. Only square matrices can be raised to ordinary integer powers because the same matrix must remain dimensionally compatible at every multiplication. A positive exponent n repeats the transformation n times. This appears in discrete dynamical systems, Markov chains, graph walks, recurrence relations, population models, and computer graphics. For example, an entry of an adjacency matrix raised to n can count walks of length n between two vertices. The zero power of every square matrix is defined as the identity matrix of the same size. The identity has ones on its main diagonal and zeros elsewhere, and multiplying by it leaves a matrix unchanged. This convention preserves exponent rules such as A to m multiplied by A to zero equaling A to m. A negative power uses the inverse matrix. A to negative one is the inverse of A, and A to negative n is the inverse raised to positive n. This is possible only when A is nonsingular. If elimination finds no nonzero pivot, the matrix has no inverse and the calculator reports that the requested negative power is undefined. This calculator uses exponentiation by squaring rather than performing every multiplication separately. It squares the current base and uses its value only when the corresponding binary digit of the exponent is active. That reduces the number of matrix multiplications from roughly n to roughly the logarithm of n, making larger exponents practical. For negative exponents, Gauss-Jordan elimination with partial pivot selection first computes the inverse. Results are rounded only for display, limiting distracting floating-point noise while retaining useful precision. Enter integers or decimals with commas between columns and semicolons between rows.

Matrix power examples

These examples cover positive, zero, and negative exponents.

Matrix and exponentResultExplanation
[[1,2],[3,4]], n = 2[[7,10],[15,22]]Multiply the matrix by itself.
[[2,0],[0,3]], n = 0[[1,0],[0,1]]Every square matrix to power zero gives identity.
[[2,0],[0,4]], n = -1[[0.5,0],[0,0.25]]A negative first power is the inverse.

How to calculate a matrix power

  1. Enter a square matrix with commas between columns and semicolons between rows.
  2. Enter a positive, zero, or negative integer exponent.
  3. Click Calculate Power to perform fast matrix exponentiation.
  4. Read the resulting matrix in row order.

Frequently asked questions

What does a matrix power mean?

A positive matrix power means repeated matrix multiplication. It represents repeated application of the same linear transformation.

What is a matrix raised to zero?

The zero power is the identity matrix of matching size. This definition keeps the standard exponent laws consistent.

Can an exponent be negative?

Yes, when the matrix is invertible. A negative power applies repeated powers of the matrix inverse.

Why must the matrix be square?

Repeated multiplication requires the output dimensions to match the input dimensions. A rectangular matrix cannot generally be multiplied by itself.

How are large powers calculated?

The calculator uses exponentiation by squaring to reduce the multiplication count. This is much faster than multiplying the matrix once for every exponent step.