The matrix calculator adds, subtracts and multiplies matrices and finds the determinant, inverse, transpose, rank and scalar multiples. Type or paste your matrices — any size, with fractions if you like — and pick an operation. Results are neatly aligned and ready to copy, and everything runs in your browser.
| Operation | Requirement |
|---|---|
| A + B, A − B | Same size |
| A × B | Columns of A = rows of B |
| det(A), A⁻¹ | Square matrix |
| A⁻¹ | Determinant ≠ 0 |
Enter A and B and choose A×B. The number of columns in A must equal the number of rows in B.
Only when it's square and its determinant isn't zero.
One row per line with values separated by spaces or commas, or rows separated by semicolons.
Yes. Values like 1/3 are accepted; results are shown as decimals.
No. It runs in your browser.
Matrices are typed or pasted with values separated by spaces or commas and rows by new lines or semicolons; fractions such as 1/2 are accepted. Addition and subtraction work element by element and require equal sizes; multiplication sums row-by-column products and requires A's column count to equal B's row count, with a clear message when it doesn't. The determinant is found by Gaussian elimination with partial pivoting — the product of the pivots, with the sign flipped for each row swap — which is far faster and more stable than cofactor expansion. The inverse uses Gauss–Jordan elimination on [A | I], and singular matrices (determinant 0) are reported rather than producing infinities. Rank is the number of non-zero pivots after elimination, with a small tolerance for rounding. Results are shown aligned and rounded to 8 significant digits.