Matrix Calculator
Add, subtract, multiply, transpose, invert, or find the determinant of a matrix — with the working shown, not just the answer.
Last updated
Matrix A
Matrix B
Operation
How to use the matrix calculator
- Set the size of matrix A and matrix B, from 2×2 up to 6×6, and enter the values.
- Click an operation: add, subtract, multiply, transpose, determinant or inverse.
- Read the result and the working underneath.
About this tool
Enter values into Matrix A and/or Matrix B (resize either one from 2×2 up to 6×6 using the row/column selectors), then pick an operation. Addition, subtraction, and multiplication use both matrices; transpose, determinant, and inverse each act on whichever single matrix you choose. The identity-fill button is a quick way to set a matrix to the identity matrix — useful as a starting point or for checking A × A⁻¹ = I.
Determinant and inverse are both computed with row reduction (Gaussian / Gauss-Jordan elimination with partial pivoting), and every row operation performed along the way is shown underneath the result — the same method taught in most linear algebra courses, rather than just a black-box answer. Dimension mismatches, non-square matrices, and singular (non-invertible) matrices are all caught and explained rather than silently failing.
Everything runs as JavaScript in your browser tab — nothing you enter is sent anywhere.
Questions about matrices
When can two matrices be multiplied?
When the number of columns in A equals the number of rows in B. A 2×3 matrix times a 3×4 matrix gives a 2×4 result.
How do I find the determinant of a 2×2 matrix?
For [[a, b], [c, d]], it’s ad − bc. Larger determinants are worked out here by row reduction, with every step shown.
When does a matrix have no inverse?
When its determinant is 0. Such a matrix is called singular, and the tool tells you.
Does it show the working?
Yes. Every row operation used for determinants and inverses is listed, as taught in linear algebra courses.