Matrix Calculator
Add, multiply and invert matrices, and find the determinant and rank, with exact fraction answers.
Separate numbers with spaces or commas. Fractions like 1/2 and decimals work.
How to use the Matrix Calculator
- Type your matricesWrite one row per line, with numbers separated by spaces or commas. Fractions such as 2/3 and decimals are fine.
- Choose an operationFind the determinant, inverse, transpose or rank of A, raise it to a power, multiply by a number, or add, subtract or multiply A and B.
- Use the resultAnswers are exact fractions (tick “Show decimals” to switch). Copy the result, or press “Use result as A” to keep calculating.
Example
For the sample A, det(A) = −11, so A has an inverse. Its first row is 9/11 −5/11 −7/11.
The sample A × B is [[−1, 4, 7], [−11, 3, 4], [5, 3, 3]], and A has rank 3 (full rank).
Frequently asked questions
When can two matrices be multiplied?
When the first has as many columns as the second has rows. A 2×3 matrix times a 3×4 matrix gives a 2×4 matrix. Order matters: A × B is usually different from B × A.
When does a matrix have an inverse?
Only when it is square and its determinant is not zero. The inverse is found here with Gauss–Jordan elimination using exact fractions, so there are no rounding errors.
What is the rank of a matrix?
The number of independent rows (or columns). A 3×3 matrix with rank 3 has full rank; a lower rank means some rows can be made from the others.