Matrix Calculator
Enter matrices up to 6 × 6 and add, subtract or multiply them, or find the determinant, inverse and transpose of matrix A.
Matrix A
Matrix B
Fill in the matrices, then calculate.
How it's calculated
- A + B and A − B: add or subtract matching cells. Both matrices must be the same size.
- A × B: each cell of the result is a row of A multiplied term by term with a column of B and summed. A's columns must equal B's rows, and the result has A's rows and B's columns. Order matters: A × B is usually not B × A.
- Determinant: a single number for a square matrix, found here by row elimination. For a 2 × 2 matrix it is
ad − bc. - Inverse: the matrix that gives the identity when multiplied by A, found by Gauss-Jordan elimination. It exists only when the determinant is not 0.
- Transpose: rows become columns.
Worked example
Take A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]].
A × B: 1×5 + 2×7 = 19, 1×6 + 2×8 = 22, 3×5 + 4×7 = 43, 3×6 + 4×8 = 50, giving [[19, 22], [43, 50]]. A + B is [[6, 8], [10, 12]].
Determinant of A: 1×4 − 2×3 = −2. Inverse of A: (1 ÷ −2) × [[4, −2], [−3, 1]] = [[−2, 1], [1.5, −0.5]].
Frequently asked
Why can't I multiply two matrices?
The number of columns in A must equal the number of rows in B. The calculator keeps B's row count in step with A's columns for you, so change A's columns or B's columns to fit your problem.
Why does it say my matrix is singular?
A singular matrix has a determinant of 0, which happens when one row is a multiple or a combination of the others. Such a matrix has no inverse.
How accurate are the results?
Calculations use standard floating-point numbers and results are rounded to 6 decimal places, so very large or very ill-conditioned matrices may show small rounding differences.
Last updated: October 2026