How do you find the inverse of a matrix?
- 1Choose the operation — determinant, inverse, A × B, RREF and so on.
- 2Set the number of rows and columns and type the numbers (fractions like 1/2 are fine; empty boxes are 0).
- 3Read the answer, as exact fractions or — with one tick — as decimals.
- 4Follow the step-by-step working: cofactors for small determinants, row operations for the rest.
Determinant, inverse and row reduction — the rules
- 012 × 2: det |a b; c d| = ad − bc, A⁻¹ = (1/det) |d −b; −c a|
- 023 × 3: det A = a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃ (cofactor expansion)
- 03Inverse: row-reduce [A | I] → [I | A⁻¹] (Gauss–Jordan)
- 04(AB)ᵢⱼ = row i of A · column j of B
- 05rank A = number of pivots (non-zero rows) in RREF(A)
Small determinants are found by cofactor expansion — the method taught in school: for a 3 × 3 matrix, each entry of the first row multiplies the 2 × 2 determinant left when its row and column are crossed out, with signs + − +. Larger determinants use row reduction: subtracting multiples of rows doesn't change the determinant, a row swap flips its sign, and the determinant of a triangular matrix is the product of its diagonal.
The inverse comes from Gauss–Jordan elimination: write A next to the identity matrix and use row operations (swap rows, multiply a row by a number, add a multiple of one row to another) until the left side becomes the identity — the right side is then A⁻¹. If a row of zeros appears, the determinant is 0 and there is no inverse. The same row operations give the reduced row echelon form, the rank, and the solution of Ax = b (one, none or infinitely many).
All arithmetic uses exact fractions with whole numbers of any size, so there is no rounding at any step — useful because matrices like the Hilbert matrix are famous for going wrong with ordinary decimals. Tick “show decimals” to see the same answers rounded to 8 significant digits.
Good to know
- Only square matrices have a determinant or an inverse.
- If det A = 0 the matrix has no inverse, and Ax = b has either no solution or infinitely many.
- A × B is usually not the same as B × A — the order matters.
- To check an inverse, multiply A by A⁻¹: you should get the identity matrix.
Matrices — questions students ask
How do you find the determinant of a 3 × 3 matrix?
Expand along the first row: a₁₁ times the 2 × 2 determinant left after crossing out its row and column, minus a₁₂ times its 2 × 2 determinant, plus a₁₃ times its 2 × 2 determinant. For |6 1 1; 4 −2 5; 2 8 7| that is 6(−54) − 1(18) + 1(36) = −306.
How do you find the inverse of a matrix?
For 2 × 2: swap a and d, change the signs of b and c, and divide by ad − bc. For bigger matrices, write [A | I] and use row operations until the left side is I; the right side is A⁻¹.
When does a matrix have no inverse?
When its determinant is 0. The matrix is then called singular: its rows (or columns) depend on each other, for example one row is a multiple of another.
How do you multiply two matrices?
Each entry of AB is a row of A times a column of B: multiply matching entries and add. It only works when A has as many columns as B has rows; a 2 × 3 times a 3 × 2 gives a 2 × 2.
What is the rank of a matrix?
The number of independent rows — in practice the number of non-zero rows (pivots) after row-reducing it. The 3 × 3 matrix 1 2 3 / 4 5 6 / 7 8 9 has rank 2.
What is reduced row echelon form (RREF)?
The form where each non-zero row starts with a 1 (the pivot), each pivot is to the right of the one above, and every other entry in a pivot's column is 0. It is what Gauss–Jordan elimination produces.
Sources
- Gaussian elimination and reduced row echelon form
- Laplace (cofactor) expansion of the determinant
- Khan Academy – Matrices
- Hilbert matrix (exact inverse used to test the calculator)
Formulas last reviewed: September 30, 2026 ·How we check our formulas