Matrix Calculator
Calculators · Added
Type a matrix one row per line and pick an operation. The determinant and the inverse come from Gaussian elimination with partial pivoting rather than cofactor expansion, and where a matrix is close to singular the result says so instead of returning digits it cannot support.
How to use the matrix calculator
- 1Choose the operation. Ones needing a second matrix reveal the B field.
- 2Type each matrix with one row per line, values separated by spaces or commas. Brackets are ignored, so pasting from code works.
- 3Press Calculate.
- 4For a determinant, read the rank and trace alongside it — they say more about a singular matrix than the zero does.
Examples
A 2×2 determinant
- Input
- 4 7 / 2 6
- Result
- 10 — the matrix scales area by a factor of 10
A singular matrix
- Input
- 1 2 / 2 4
- Result
- Determinant 0, rank 1 — no inverse exists, and the matrix collapses the plane onto a line
About the matrix calculator
What the determinant measures
Treat a square matrix as a transformation of space. The determinant is the factor by which it scales volume — area in two dimensions, volume in three. A determinant of 3 triples volume; one of 0.5 halves it.
A negative determinant means the transformation also flips orientation, turning a right-handed set of axes into a left-handed one. And a determinant of zero means volume has gone entirely: the transformation has squashed space flat, which is precisely why it cannot be undone and why no inverse exists.
Pivoting, and why it is not optional
Gaussian elimination divides a row by its pivot at each step. If that pivot happens to be very small, the row is multiplied by a very large number and every rounding error already in it grows to match.
Partial pivoting swaps the largest available entry in the column into the pivot position before dividing, which keeps those multipliers no greater than one. It costs a row swap and it is the difference between an answer good to fifteen digits and one good to five — which is why every serious implementation does it and why this one does too.
Frequently asked questions
Why not use the cofactor method for the determinant?
What does a determinant of zero tell me?
Why does it warn about being close to singular?
Why does AB work but BA fail?
Related tools
Quadratic Equation Solver
Calculators
Solve ax² + bx + c = 0 with roots, discriminant, vertex and factored form.
Scientific Calculator
Calculators
A full scientific calculator with trigonometry, logarithms, powers and memory keys.
Standard Deviation Calculator
Calculators
Calculate sample or population standard deviation with the full working shown.