Matrix Calculator
Multiply, add and invert matrices, and find the determinant, rank, transpose and row echelon form, with exact fractions.
Runs in your browser. Nothing is uploaded.
Result
–
How to use the Matrix Calculator
- Choose an operation, such as inverse, determinant or A × B.
- Type matrix A one row per line, with values separated by spaces or commas.
- For A + B, A − B or A × B, type matrix B too.
- The result appears below as exact fractions. Tick Show decimals to see decimals instead.
Matrix operations with exact answers
Matrices are at the heart of linear algebra, computer graphics, statistics and engineering. This calculator carries out the common operations on matrices up to 10 × 10, using exact fractions so that results such as an inverse come out exactly, with no rounding.
Operations
- Determinant: a single number that says whether the matrix is invertible and how it scales area or volume.
- Inverse: the matrix A⁻¹ with A × A⁻¹ = I, found by Gauss–Jordan elimination.
- Transpose: rows become columns.
- Rank: the number of independent rows.
- Row echelon form (RREF): the reduced form used to solve systems of equations.
- Trace: the sum of the diagonal entries.
- Power: A multiplied by itself n times. Negative powers use the inverse.
- Scalar multiple: every entry multiplied by a number.
- A + B, A − B and A × B: with a clear message if the sizes don’t fit.
Entering matrices
Type one row per line and separate the values with spaces, commas or tabs. You can paste a block of cells from a spreadsheet, or use bracket notation like [[1, 2], [3, 4]]. Entries can be whole numbers, decimals or fractions.
Why exact fractions matter
Inverting even a small matrix with decimals produces long repeating values, and the rounding errors grow with each step. Exact fractions avoid that: the inverse of [[4, 7], [2, 6]] is shown as [[3/5, −7/10], [−1/5, 2/5]], which is precisely right. Switch on decimals when you need approximate values.
Private
Everything is calculated in your browser.
Frequently asked questions
What size of matrix can I use?
Up to 10 × 10. Operations that need a square matrix, such as the inverse, say so if A isn't square.
Why does it say my matrix has no inverse?
A matrix can be inverted only when its determinant isn't zero. A determinant of zero means its rows (or columns) depend on each other, so some information is lost and can't be undone.
Can I enter fractions?
Yes. Type 1/3 or 0.25; results stay exact. That avoids the rounding errors common in decimal matrix calculations.
When can two matrices be multiplied?
A × B needs the number of columns of A to equal the number of rows of B. A 2 × 3 matrix times a 3 × 4 matrix gives a 2 × 4 matrix.
Is anything uploaded?
No. All calculations run in your browser.
Tutorials
How to find the inverse of a 3×3 matrix
Check a 3×3 matrix can be inverted, find its inverse with exact fractions and confirm the result by multiplying back.