Inverse of a Matrix
using Elementary Row Operations

Also called the Gauss-Jordan method

This is a fun way to find the Inverse of a Matrix:

Play around with the rows (adding, multiplying or swapping) until we make Matrix A into the Identity Matrix I
Augmented matrix transformation from [A | I] to [I | A⁻¹]
And by ALSO doing the changes to an Identity Matrix it magically turns into the Inverse!

The "Elementary Row Operations" are simple things like adding rows, multiplying and swapping ... let's see with an example:

Warm Up: A 2×2 Example

Let's see how it works on a small 2×2 matrix first:

A =
1234

First we join matrix A and the Identity Matrix side-by-side. This combined grid is called an augmented matrix [A | I]:

1210 3401

Now we try to make the left side the Identity Matrix.

Subtract 3 × Row 1 from Row 2:

1210 0−2−31

Divide Row 2 by −2:

1210 011.5−0.5

Subtract 2 × Row 2 from Row 1:

10−21 011.5−0.5

The left side is now the Identity Matrix ... and the right side now has our inverse:

A−1 =
−21 1.5−0.5

Bigger Example: find the Inverse of "A":

3 by 3 matrix A

We start with the matrix A, and write it down with an Identity Matrix I next to it:

Augmented matrix [A | I] with 3 by 3 matrix A and 3 by 3 identity matrix
(This is called the "Augmented Matrix")

Identity Matrix

The "Identity Matrix" is the matrix equivalent of the number "1":


I =
100 010 001

A 3x3 Identity Matrix

  • It is "square" (has same number of rows as columns),
  • It has 1s on the diagonal and 0s everywhere else
  • Its symbol is the capital letter I

Now we do our best to turn "A" (the Matrix on the left) into an Identity Matrix. The goal is to make Matrix A have 1s on the diagonal and 0s elsewhere (an Identity Matrix) ... and the right hand side comes along for the ride, with every operation being done on it as well.

But we can only do these "Elementary Row Operations":

And we must do it to the whole row, like in this example:

Six-step Gauss-Jordan row reduction on augmented matrix [A | I]

Start with A next to I

Let's add row 2 to row 1,

Then divide row 1 by 5

Then take 2 times the first row, and subtract it from the second row,

Multiply second row by -1/2,

Swap the second and third row,

Last, subtract the third row from the second row,

And we are done!

And matrix A has been made into an Identity Matrix ...

... and at the same time an Identity Matrix got made into A-1

A−1 =
0.20.20 −0.20.31 0.2−0.30

DONE! Like magic, and just as fun as solving any puzzle.

(Compare this to Inverse of a Matrix using Minors, Cofactors and Adjugate. Is the answer the same? Which method do you prefer?)

A Systematic Way

There's no "right way" to do this!

We can just keep playing around until we get that final correct answer.

But it can be helpful to follow a plan:

Larger Matrices

We can do this with larger matrices, for example, try this 4x4 matrix:

4 by 4 matrix B

Start Like this:

Augmented 4 by 4 matrix [B | I]

See if you can do it yourself (I would begin by dividing the first row by 4, but you do it your way).

You can check your answer using the Matrix Calculator (use the "inv(A)" button).

Why it Works

Analogy showing [8 | 1] transformed by row operation into [1 | 1/8]

I like to think of it this way:

And "1/8" is the (multiplicative) inverse of 8

Or, more technically:

Multiplication of [A | I] by A⁻¹ yielding [I | A⁻¹]

The total effect of all the row operations is the same as multiplying by A-1

So A becomes I (because A-1A = I)
And I becomes A-1 (because A-1I = A-1)

What if it Doesn't Work?

We can end up with a row of all zeros on the left-hand side (the A side).

That means we can't turn it into the Identity Matrix, as the matrix is Singular and has no inverse! Yes, it can happen.

2613, 2614, 8494, 8495, 8496, 2615, 2616, 8497, 8498, 8499