Matrix Power Calculator

Raise a 2x2 or 3x3 matrix to any positive integer power.
Enter matrix entries and an exponent up to 20 to get the result by repeated multiplication.

Matrix Power

Raising a matrix to an integer power means multiplying it by itself repeatedly: A^3 = A x A x A. Matrix powers appear throughout applied mathematics: Markov chains (long-run state probabilities require high powers), population dynamics (Leslie matrices projected forward), graph theory (counting paths of exactly length k), and solving linear recurrences like the Fibonacci sequence.

This calculator uses fast binary exponentiation, also called exponentiation by squaring. Instead of k-1 multiplications for A^k, it needs only about log2(k) multiplications. For A^20, that is 5 multiplications instead of 19.

The algorithm: start with result = identity matrix. While the exponent is positive, if the current exponent bit is odd, multiply result by the current base power. Square the base. Halve the exponent. Repeat until done.

A^0 = I (the identity matrix) by definition. A^1 = A.

Enter the matrix as rows separated by semicolons: “1,1;1,0” for a 2x2 matrix. For a 3x3 identity, enter “1,0,0;0,1,0;0,0,1”.

Classic example: the 2x2 Fibonacci matrix A = [[1,1],[1,0]]. A^n has the nth Fibonacci number in position [0][1]. A^10 = [[89,55],[55,34]], so F(10) = 55.

A practical caution: if your matrix has large eigenvalues, entries in A^k grow exponentially. At high powers (k near 20) with large-entry matrices, you may see floating-point rounding errors accumulate. The results are exact for small integers but approximate for large entries combined with high exponents.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.