TOOLDENCALCULATORSON-DEVICE
Matrix Calculator
Perform the essential matrix operations, addition, subtraction, multiplication, determinant, inverse and transpose, in your browser.
HOW TO USE
- 1Set the number of rows and columns for matrix A and matrix B (from 1×1 up to 5×5) and fill in the cells. Empty cells count as zero.
- 2Pick the operation: add, subtract or multiply need both matrices; determinant, inverse and transpose are computed on matrix A.
- 3For multiplication, A's columns must equal B's rows, the result has A's rows and B's columns.
- 4The determinant and inverse need a square matrix, and a matrix with a zero determinant is singular, meaning it has no inverse.
EXAMPLE
INPUT
A = [[1, 2], [3, 4]], B = [[5, 6], [7, 8]]
OUTPUT
A + B = [[6, 8], [10, 12]] · A × B = [[19, 22], [43, 50]] · det(A) = −2
FAQ
When can two matrices be multiplied?
A × B is only defined when A's number of columns equals B's number of rows. The result then has A's rows and B's columns, for example a 2×3 times a 3×2 gives a 2×2.
Why does the inverse say the matrix is singular?
A matrix with a determinant of zero collapses at least one dimension, so no inverse exists. Such matrices cannot be used to solve the related system of equations.
Why must matrices be square for determinant and inverse?
The determinant is only defined for square matrices, and the inverse of a non-square matrix does not exist in the usual sense. Transpose, addition, subtraction and multiplication work on any rectangular shapes that are compatible.
How accurate are the results?
Calculations use double-precision arithmetic with partial pivoting for stability, and results are rounded to 6 decimal places for display. Near-singular matrices can accumulate small rounding errors.
Is my data sent anywhere?
No. All calculations run entirely in your browser, your matrices never leave your device.