The inverse of a n × n matrix
Jackie Nicholas
Mathematics Learning Centre
University of Sydney
c 2010 University of Sydney
The n × n case
In the previous module we defined an inverse matrix and saw how
to find the inverse of a 2 × 2 matrix, if it existed.
We will now find the inverse of a n × n matrix (if it exists), using
Gaussian elimination.
We will illustrate this by finding the inverse of a 3 × 3 matrix.
First of all, we need to define what it means to say a matrix is in
reduced row echelon form.
A matrix in reduced row echelon form is a row reduced matrix
which has been simplified further by using the leading ones to
eliminate the non-zero entries above them as well as below them.
Reduced row echelon form
A matrix is in reduced row echelon form if
1. the first nonzero entries of rows are equal to 1
2. the first nonzero entries of consecutive rows appear
to the right
3. rows of zeros appear at the bottom
4. entries above and below leading entries are zero.
Here are some examples of matrices in reduced row echelon form.
1 0 0 1 4 0 7 1 0 0 1
0 1 0 0 0 1 3 0 1 0 3
0 0 1 0 0 0 0 0 0 1 −2
Using Gaussian elimination to find the inverse
3 4 −1
Consider the matrix B = 1 −1 1 .
−1 2 3
To find B −1 , if it exists, we augment B with the 3 × 3 identity
matrix:
3 4 −1 1 0 0
1 −1 1 0 1 0 ie [ B | I ].
−1 2 3 0 0 1
The strategy is to use Gaussian elimination to reduce [ B | I ] to
reduced row echelon form. If B reduces to I , then [ B | I ] reduces
to [ I | B −1 ].
B −1 appears on the right!
Reducing the matrix
Our first step is to get a 1 in the top left of the matrix by using an
elementary row operation:
1 −1 1 0 1 0
R1 ←→ R2 3 4 −1 1 0 0
−1 2 3 0 0 1
Next we use the leading 1 (in red), to eliminate the nonzero
entries below it:
1 −1 1 0 1 0
R2 − 3R1 0 7 −4 1 −3 0
−1 2 3 0 0 1
1 −1 1 0 1 0
R3 + R1 0
7 −4 1 −3 0 .
0 1 4 0 1 1
Reducing the matrix
We now move down and across the matrix to get a leading 1 in
the (2, 2) position (in red):
1 −1 1 0 1 0
0 7 −4 1 −3 0 .
0 1 4 0 1 1
1 −1 1 0 1 0
We can do this by R3 ←→ R2 0 1 4 0 1 1 .
0 7 −4 1 −3 0
Next, we use this leading 1 (in red) to eliminate all the nonzero
entries above and below it:
R1 + R2 1 0 5 0 2 1
0 1 4 0 1 1 .
R3 − 7R2 0 0 −32 1 −10 −7
Reducing the matrix
Finally, we move down and across to the (3, 3) position (in red):
1 0 5 0 2 1
0 1 4 0 1 1 .
0 0 −32 1 −10 −7
We make this entry into a leading 1 (in red) and use it to
eliminate the entries above it:
1 0 5 0 2 1
1
− 32 R3 0 1 4 0 1 1
0 0 1 − 32 10
1
32
7
32
5 14 3
R1 − 5R3 1 0 0 32 32 − 32
4 8 4
R2 − 4R3 0 1 0 32 − 32 32 .
1 10 7
0 0 1 − 32 32 32
We have found B −1
As [ B | I ] reduced to [ I | B −1 ]
−3
5 14
32 32 32 5 14 −3
4 8 4 = 1 4 −8
B −1 = 32 − 32 32 32
4 .
1 10 7
− 32 32 32 −1 10 7
We can check that this matrix is B −1 by verifying that
BB −1 = B −1 B = I .
5 14 −3 3 4 −1
1
B −1 B = 4 −8 4 1 −1 1
32
−1 10 7 −1 2 3
32 0 0 1 0 0
1
= 0 32 0 = 0 1 0
32
0 0 32 0 0 1
Verify BB −1 = I for yourself.