Finding the inverse matrix with Gauss–Jordan elimination
You find the inverse with Gauss–Jordan elimination: write the identity matrix next to A and keep applying row operations until the identity is on the left. A⁻¹ is then on the right.
How to do it
- 1
Write (A | I): the matrix on the left, the identity on the right.
- 2
Create zeros below the diagonal as in Gaussian elimination.
- 3
Then create zeros above the diagonal, from the bottom up.
- 4
Divide each row by its diagonal entry so that the left side has ones on the diagonal.
- 5
The right side is now A⁻¹. Check: A · A⁻¹ = I.
Example with worked solution
Worked solution
Starting matrix
2 3 1 0 1 1 0 1 1. I ↔ II
1 1 0 1 2 3 1 0 2. II − 2·I
1 1 0 1 0 1 1 −2 3. I − II
1 0 −1 3 0 1 1 −2
The identity matrix is on the left, done! The inverse is on the right.
Your turn
Enter the row operations, e.g. II − 3·I. If you get stuck, "Hint: next step" helps.
Find the inverse.
Keep going until the identity matrix is on the left. The inverse is then on the right.
| −2 | −1 | 5 | 1 | 0 | 0 |
| −1 | 0 | 2 | 0 | 1 | 0 |
| −1 | 1 | 2 | 0 | 0 | 1 |
Typical mistakes
- Transforming only the left side: every row operation applies to the whole row, including the right half.
- Using column operations: Gauss–Jordan only allows row operations.
- Carrying on with a zero row on the left: A is then not invertible (det A = 0).
Frequently asked questions
When is there no inverse?
When the determinant is 0. A zero row then appears on the left during elimination.
Is there a formula for 2×2 matrices?
Yes: for A = (a b; c d), A⁻¹ = 1/(ad − bc) · (d −b; −c a). From 3×3 on Gauss–Jordan is usually faster than the adjugate formula.
What is the inverse used for?
It solves Ax = b as x = A⁻¹b, even for many right-hand sides at once.
