Matrix Calculator
Add, multiply, invert and row reduce matrices, with each operation laid out step by step.
What a matrix is
A matrix is a rectangular grid of numbers arranged in rows and columns; an matrix has rows and columns. Matrices store systems of equations, geometric transformations and tables of data compactly, and matrix operations work on all of the entries at once.
How to use the matrix calculator
- Type or paste your problem into the box above — for example
[[1, 2], [3, 4]] × [[0, 1], [1, 0]]. Use^for powers,/for fractions andsqrt()for square roots, or describe it in words. - Press Enter. The solver works through the problem with every step shown; switch Steps off if you only want the final answer.
- Ask a follow-up in the same chat — "why did you do that?" or "now check it" — and it answers with the earlier working in context.
The main operations
- Addition: add matching entries. Both matrices must be the same size.
- Multiplication: entry of is row of times column of . needs as many columns as has rows, and in general .
- Transpose: swap rows and columns, so an matrix becomes .
- Inverse: the matrix with . It exists only when .
The 2×2 inverse
For a matrix there's a direct formula:
For larger matrices the usual method is Gauss–Jordan elimination: row reduce until the left half becomes . The right half is then .
Worked example: the inverse of
- Find the determinant. It isn't zero, so the inverse exists.
- Swap and negateSwap and , and negate and :
- Divide by the determinantDividing by 1 changes nothing, so .
- Check
Common mistakes to avoid
Multiplying entry by entry
Matrix multiplication is rows times columns. Multiplying matching entries is a different operation, the Hadamard product.
Assuming
Order matters. Reversing a product usually changes the answer, and the reversed product may not even be defined.
Inverting a singular matrix
If the determinant is zero there is no inverse. Check the determinant first.
Related calculators
- Determinants2×2, 3×3 and larger matrices
- Systems of equationsSubstitution and elimination
- Solve for XLinear and multi-step equations
- GraphingPlot and compare functions
Questions students ask
How do I type a matrix?
Write each row in square brackets, separated by commas: [[1, 2], [3, 4]] is the matrix with first row 1, 2 and second row 3, 4.
What sizes does it support?
Any size you can type. and are the most common, and the same methods extend to larger matrices.
Can it find eigenvalues?
Yes. Ask for the eigenvalues or eigenvectors and it solves the characteristic equation step by step.
Can it solve a system using matrices?
Yes. Ask it to solve with an augmented matrix, the inverse method or Cramer's rule.