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 transforming from A on left and I on right to I on left and A inverse on right
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:

Example: find the Inverse of "A":

3 by 3 matrix A with elements 3, 0, 2 in the first row

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

Augmented matrix showing matrix A and the Identity matrix I side-by-side
(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
  • It's 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:

Sequence of six elementary row operations transforming the augmented matrix to find the inverse

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 is 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 for practice

Start Like this:

matrix B augmented

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

8|1 becomes 1|(1/8)

I like to think of it this way:

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

Or, more technically:

matrix A | I becomes I | A inverse

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 cannot 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