Matrix Calculator

13 operations on one page. Determinant, inverse, eigenvalues, multiplication, and more — with step-by-step solutions.

Matrix A
Filter by op & difficulty · printable PDF · full answer key
Examples — click to load
Pick an operation, enter a matrix, and click Calculate.
Steps appear here after you Calculate.
Geometric overlay appears here after you Calculate — shown for 2×2 and 3×3 numeric matrices on operations with a clean geometric interpretation (det, inverse, transpose, eigenvectors, power, A·B, A+B, A−B).

What is a matrix?

A matrix is a rectangular grid of numbers (or symbolic expressions) arranged in rows and columns. Matrices are the fundamental object of linear algebra — they encode systems of equations, linear transformations, rotations, projections, networks, and the state of physical systems. Almost every numerical computation in science, engineering, machine learning, and computer graphics is, at some level, a matrix operation.

The 13 operations on this page

Operation Input shape Output Method shown in steps
det Asquarescalarcofactor expansion (row 1)
A⁻¹square & non-singularmatrixadjugate (n≤3) / Gauss-Jordan (n≥4)
Aᵀanymatrixswap rows ↔ columns
tr Asquarescalarsum of main diagonal
rank Aanyinteger# of pivot columns in RREF
RREFanymatrixGauss-Jordan elimination
Aⁿsquare (invertible if n<0)matrixrepeated multiplication
eigenvaluessquarelistdet(A−λI)=0 → solve
eigenvectorssquarevectorssolve (A−λI)v=0 per λ
char. polysquarepolynomialdet(A−λI) expanded
A + B / A − Bsame shapematrixelement-wise
A · BA.cols = B.rowsmatrixrow-by-column dot products

Identities worth memorising

(AB)T = BTAT

Transpose reverses order.

(AB)−1 = B−1A−1

Inverse reverses order too.

det(AB) = det(A) det(B)

Determinant is multiplicative.

tr(A + B) = tr(A) + tr(B)

Trace is linear.

tr(AB) = tr(BA)

Cyclic property of trace.

det(AT) = det(A)

Transpose preserves determinant.

A invertible ⇔ det(A) ≠ 0

Singular matrices have no inverse.

tr(A) = Σ λi

Sum of eigenvalues.

Frequently asked

Yes. Click the green 📷 Scan button next to Matrix A, upload a photo or PDF of your homework, and our AI extracts every matrix problem from the page and tells you the operation (determinant, inverse, eigenvalues, A·B, etc.). Pick one to fill the form and solve, or click Solve All to batch-solve every problem in the image with full step-by-step solutions for each. Works on textbook pages, exam papers, and handwritten work.
Thirteen operations on a single page: determinant, inverse, transpose, trace, rank, RREF (Gauss-Jordan), eigenvalues, eigenvectors, characteristic polynomial, matrix power An, addition A+B, subtraction A−B, and multiplication A·B. Switch operations with one click; your matrix persists across switches. Up to 8×8 plus rectangular shapes (2×3, 3×4, 4×2…) where the operation supports them.
Three ways: (1) Visual matrix editor — pick a size and a fresh grid appears; Tab and arrow keys move between cells. Integers, fractions like 1/2, decimals, symbols (a, x, θ), and constants (π, e) all work. (2) Symbolab-style smart input — paste a self-describing expression like \det A, A^{-1}, A^T, A B (juxtaposition for multiply), \tr A, gauss jordan A, eigenvectors A and the calculator auto-detects the operation and switches the chip. (3) AI photo scan — upload an image and the AI extracts the matrix into the editor for you.
A geometric overlay of the matrix as a linear transformation. For 2×2 numeric matrices the unit square is drawn in grey and the transformed parallelogram is overlaid in green (or red if det A is negative, indicating orientation flip). For determinants the shaded area equals |det A|. For eigenvectors, coloured arrows mark the directions A leaves invariant. For multiplication you see B applied first, then A applied to the result — making composition order obvious. For powers An, you see successive frames. 3×3 numeric matrices show the unit cube and parallelepiped via 3D mesh. Operations like rank, trace, char. polynomial, RREF, and eigenvalues alone are purely algebraic and don’t get a visualization.
For a 2×2 matrix [[a,b],[c,d]] the determinant is ad−bc. For 3×3 and larger, this calculator uses cofactor expansion along the first row: det(A) = Σj (−1)1+j a1j M1j, where M1j is the minor — the determinant of the submatrix obtained by deleting row 1 and column j. The Steps tab walks through each minor, the signed sum, and the simplification to a single number. The Visualize tab shows the geometric meaning: |det A| is the area of the parallelogram (2×2) or the volume of the parallelepiped (3×3) that A maps the unit square or cube to.
For 2×2 and 3×3 matrices the calculator uses the adjugate method shown step by step: compute det(A), build the cofactor matrix, transpose to get the adjugate adj(A), then divide every entry by det(A). The full chain A−1 = (1/det A) · adj(A) is rendered with LaTeX. For 4×4 and larger we use Gauss-Jordan elimination on the augmented matrix [A | I]: row-reduce until the left block becomes the identity I, and the right block is A−1. If the determinant is zero the matrix is singular and the calculator clearly explains that no inverse exists.
Eigenvalues solve det(A − λI) = 0, the characteristic equation. The Steps tab shows: (1) form A − λI, (2) compute its determinant as a polynomial in λ, (3) set it to zero and solve for λ. Eigenvectors then come from solving (A − λI) v = 0 for each λ — the calculator displays (A − λI), its row-reduced echelon form, and the basis eigenvectors with algebraic multiplicities. For 2×2 numeric cases, the Visualize tab draws each eigenvector as a coloured arrow with a dotted arrow showing A·v = λ·v on the same line, demonstrating the invariant-direction property visually.
A·B is defined when the number of columns of A equals the number of rows of B. If A is m×n and B is n×p, then AB is m×p. The (i,j) entry of AB is the dot product of row i of A with column j of B: (AB)ij = Σk Aik Bkj. The calculator validates dimensions before computing (saving you the typo) and, for results up to 3×3, shows each entry as an explicit row-by-column dot product. The Visualize tab shows AB as the composition of two linear transformations: B is applied first (dashed parallelogram), then A is applied to that result (solid parallelogram), making the order of composition geometrically obvious.
The calculator validates each operation before solving and shows a clear inline warning. Determinant, trace, eigenvalues, eigenvectors, characteristic polynomial, inverse, and power all require a square matrix; non-square inputs are caught immediately. Inverse additionally requires a non-zero determinant; if A is singular the warning explains that no inverse exists. RREF, rank, transpose, addition, subtraction, and multiplication work on rectangular matrices subject to their own dimension rules — A+B and A−B need matching shapes, A·B needs A.cols = B.rows.
Yes — 100% free, no signup, no daily limits, no paywalls on step-by-step solutions. You get all 13 operations, AI photo scan, batch solve, geometric visualization, the Python (SymPy) compiler with editable code, and shareable deep-link URLs. Everything runs in your browser; the only server calls are the AI image extraction and the SymPy execution itself, neither of which require an account. Dark mode included.