Matrix Calculator
A matrix calculator that works in exact fractions rather than decimals. That distinction matters more than it sounds: Gaussian elimination in floating point is where a determinant that should be exactly zero comes back as 1.2e-16, and an inverse gets computed for a matrix that does not have one. Here every entry is kept as a ratio of whole numbers, so a singular matrix is reported as singular and a matrix of integers gives an exact answer. Addition, subtraction, multiplication, scalar multiplication, transpose, determinant, inverse, rank, trace, integer powers and reduced row echelon form are all available, and shape mismatches are explained in terms of your actual dimensions instead of failing with a generic error.
How it works
Type one row of the matrix per line, with the values on a row separated by spaces, commas or tabs. Entries can be whole numbers, decimals or fractions like 1/3.
Everything is worked out in exact fractions rather than decimals, so a determinant of zero really is zero and a singular matrix is reported as having no inverse instead of returning a huge wrong one.
The columns of A must match the rows of B.
Result — A × B
2 -3 3 -5 5 0 8 -1 -1
Frequently asked questions
How do I type a matrix in?
One row per line, with the values separated by spaces, commas or tabs. Entries can be whole numbers, decimals or fractions like 1/3.
Why does it say my matrices cannot be multiplied?
Matrix multiplication needs the number of columns in A to equal the number of rows in B. The message names both shapes so you can see which one to change.
What does a determinant of zero mean?
The rows are linearly dependent, so the matrix collapses space onto a lower dimension and has no inverse. Because the arithmetic is exact, a zero here really is zero rather than a rounding artefact.
Can it invert any square matrix?
Only those with a non-zero determinant. Anything else is singular and is refused with an explanation rather than returned as a matrix of enormous meaningless numbers.
What is reduced row echelon form for?
It is the canonical form Gauss-Jordan elimination produces, and it is how you read off the rank of a matrix or the solution set of a linear system.
Why show fractions instead of decimals?
Because an inverse frequently contains thirds and sevenths. You can switch the display to decimals, but the calculation itself always stays exact.
Related tools
Quadratic Equation Solver
Solve ax² + bx + c = 0 with roots, discriminant, vertex, factored form and a graph of the parabola.
Scientific Calculator
Type a whole expression and watch it resolve as you go — powers, roots, logs, trigonometry and factorials.
Fraction Calculator
Add, subtract, multiply and divide fractions and mixed numbers exactly, with the working shown.