How to use Matrix Calculator
- Choose the matrix size and the operation.
- Enter each matrix as rows of numbers separated by spaces, one row per line.
- Read the result with the working shown.
- Multiplication requires the first matrix’s column count to equal the second’s row count.
- Only square matrices have a determinant or an inverse.
- A determinant of zero means the matrix is singular and cannot be inverted.
Matrix multiplication is not commutative, and the dimensions have to agree
AB and BA are generally different matrices, and frequently one of them is not even defined. To multiply, the number of columns in the first must equal the number of rows in the second, and the result takes the rows of the first and the columns of the second. This non-commutativity is not a quirk — it is the whole point. Matrices represent transformations, and rotating then scaling genuinely is not the same as scaling then rotating.
What the determinant tells you
Geometrically it is the factor by which the transformation scales area in two dimensions or volume in three. A determinant of 2 doubles areas; a determinant of −1 reflects without changing size. A determinant of zero means the transformation collapses space onto a lower dimension — a plane onto a line — and that is irreversible, which is exactly why a matrix with determinant zero has no inverse. Checking the determinant first tells you whether an inverse exists before you try to compute one.
Inverses, and why numerical code avoids them
The inverse undoes the transformation, and AA⁻¹ is the identity. It is the natural way to write the solution of a linear system as x = A⁻¹b — and it is not how numerical software actually solves one. Computing an explicit inverse is slower and less accurate than factorising and substituting, and for a matrix that is nearly singular the inverse contains enormous values that amplify rounding error. Useful for understanding and for small exact work; avoid it in code.
Where matrices show up
Computer graphics, where every rotation, scale and translation is a matrix and a pipeline composes them by multiplication. Solving systems of linear equations. Markov chains, where the matrix holds transition probabilities. Neural networks, which are largely matrix multiplications with a nonlinearity between them — the reason GPUs, built for graphics matrices, turned out to be the right hardware for machine learning.
Frequently asked questions
What matrix sizes are supported?
What is the determinant used for?
How is the inverse found?
Why can I not multiply these two matrices?
What does a determinant of zero mean?
Is AB the same as BA?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.