How to use the Matrix Calculator
- Choose an operation, such as determinant, inverse, RREF, A × B or Solve Ax = b.
- Set the size of matrix A (and B if needed) with the rows × columns menus, up to 6×6.
- Type the entries. Integers, decimals and fractions like -3/4 all work, and the result updates as you type.
- Read the result in exact fractions or switch to Decimals, then open the step-by-step working to follow every row operation.
What this matrix calculator does
This calculator handles every matrix operation in a typical Class 12 or first-year university course, for matrices up to 6×6. It works in exact fractions, so 1/3 stays 1/3 instead of 0.333333. Determinants, inverses and row-reduced forms come out exactly as you would write them by hand. The decimal toggle only changes how answers are displayed.
- Arithmetic: A + B, A − B, A × B, scalar multiple kA, transpose Aᵀ and integer powers Aⁿ (negative powers use the inverse).
- Determinant by row reduction, plus the cofactor formula for 2×2 and 3×3.
- Inverse by Gauss–Jordan elimination on [A | I].
- Rank and RREF (reduced row echelon form) with every row operation listed.
- Linear systems Ax = b: unique solution, no solution or a parametric family.
Determinant by row reduction
Elementary row operations change the determinant in predictable ways. Swapping two rows flips its sign, adding a multiple of one row to another leaves it unchanged, and scaling a row scales it by the same factor. So the calculator reduces A to an upper-triangular matrix using only swaps and row additions. The determinant is then the product of the diagonal, with the sign flipped once for each swap.
Worked example for the default matrix A = [[4, 7, 2], [3, 6, 1], [2, 5, 3]]. Cofactor expansion along row 1 gives 4(6·3 − 1·5) − 7(3·3 − 1·2) + 2(3·5 − 6·2) = 4·13 − 7·7 + 2·3 = 52 − 49 + 6 = 9. Row reduction gives the same value: the diagonal becomes 4, 3/4 and 3, and 4 × 3/4 × 3 = 9.
For a 2×2 matrix the familiar shortcut applies:
Inverse by Gauss–Jordan elimination
Write A next to the identity matrix, [A | I], and apply row operations until the left half becomes I. The same operations turn the right half into A⁻¹. If you cannot get a pivot in some column, A is singular: its determinant is 0 and no inverse exists. The calculator says so clearly instead of showing division-by-zero errors.
For the example above, A⁻¹ = (1/9) × [[13, −11, −5], [−7, 8, 2], [3, −6, 3]]. The calculator shows it entry by entry as exact fractions such as 13/9 and −11/9. A quick check is that A × A⁻¹ = I. Use “Use result as A” followed by A × B with B = A to verify it yourself.
RREF, rank and solving Ax = b
A matrix is in reduced row echelon form when each non-zero row starts with a leading 1 (the pivot), each pivot is to the right of the one above it, and every other entry in a pivot column is 0. The rank is the number of pivots. It tells you how many rows (or columns) are truly independent.
To solve a system, the calculator reduces the augmented matrix [A | b]:
| What the RREF shows | Meaning |
|---|---|
| A row 0 0 … 0 | c with c ≠ 0 | No solution (inconsistent) |
| A pivot in every column of A | Exactly one solution |
| Some columns without a pivot | Infinitely many solutions. Free variables become parameters t₁, t₂, … |
This matches the textbook rule from the Rouché–Capelli theorem. The system is consistent exactly when rank(A) = rank([A | b]), and the solution is unique only when that rank equals the number of unknowns.
Common mistakes
- Matrix multiplication is not commutative. In general A × B ≠ B × A, and A × B needs the columns of A to equal the rows of B.
- (AB)⁻¹ = B⁻¹A⁻¹, in reverse order. The same applies to transposes: (AB)ᵀ = BᵀAᵀ.
- det(kA) = kⁿ det(A) for an n×n matrix, not k·det(A).
- Do not trust a determinant computed from rounded decimals. A tiny rounding error can make a singular matrix look invertible. That is why exact fractions are the default here.
Related tools: plot the equations of a 2-variable system on the graphing calculator to see where the lines meet, or simplify fractions in the fraction calculator.
Frequently asked questions
How do I find the inverse of a 3×3 matrix?
Why does my matrix have no inverse?
Can it show answers as fractions?
How do I solve a system of linear equations with this?
What is the difference between row echelon form and RREF?
What is the largest matrix size supported?
Last reviewed November 2026. Results are estimates for information only — see our disclaimer.