Later a formula is given for the inverse of a matirx. However, it is not a good way to find the inverse for a matrix. There is a much easier way and it is this which is presented here. It is also important to note that not all matrices have inverses.
Example 4.2.1 Let A =
One might think A would have an inverse because it does not equal zero. However,

and if A^{−1} existed, this could not happen because you could multiply on the left by the inverse A and conclude the vector
Suppose you want to find B such that AB = I. Let

Also the i^{th} column of I is

Thus, if AB = I, b_{i}, the i^{th} column of B must satisfy the equation Ab_{i} = e_{i}. The augmented matrix for finding b_{i} is

and the i^{th} column of B is b_{i}, the solution to Ab_{i} = e_{i}. Thus AB = I.
This is the reason for the following simple procedure for finding the inverse of a matrix. This procedure is called the Gauss Jordan procedure. It produces the inverse if the matrix has one. Actually, it produces the right inverse.
Procedure 4.2.2 Suppose A is an n × n matrix. To find A^{−1} if it exists, form the augmented n × 2n matrix,

and then do row operations until you obtain an n × 2n matrix of the form
 (4.14) 
if possible. When this has been done, B = A^{−1}. The matrix A has an inverse exactly when it is possible to do row operations and end up with one like 4.14.
Here is a fundamental theorem which describes when a matrix has an inverse.
Theorem 4.2.3 Let A be an n × n matrix. Then A^{−1} exists if and only if the columns of A are a linearly independent set. Also, if A has a right inverse, then it has an inverse which equals the right inverse.
Proof: ⇒ If A^{−1} exists, then A^{−1}A = I and so Ax = 0 if and only if x = 0. Why? But this says that the columns of A are linearly independent.
⇐ Say the columns are linearly independent. Then there exists b_{i} ∈ F^{n} such that

where e_{i} is the column vector with 1 in the i^{th} position and zeros elsewhere. Then from the way we multiply matrices,

Thus A has a right inverse. Now letting B ≡

and so AB = BC = BA = I. Thus the inverse exists.
Finally, if AB = I, then Bx = 0 if and only if x = 0 and so the columns of B are a linearly independent set in F^{n}. Therefore, it has a right inverse C which by a repeat of the above argument is A. Thus AB = BA = I. ■
Similarly, if A has a left inverse then it has an inverse which is the same as the left inverse.
The theorem gives a condition for the existence of the inverse and the above procedure gives a method for finding it.
Example 4.2.4 Let A =
Form the augmented matrix

Now do row operations in ℤ_{3} until the n × n matrix on the left becomes the identity matrix. This yields after some computations,

and so the inverse of A is the matrix on the right,

Checking the answer is easy. Just multiply the matrices and see if it works.

All arithmetic is done in ℤ_{3}. Always check your answer because if you are like some of us, you will usually have made a mistake.
Example 4.2.5 Let A =
Set up the augmented matrix

Now find row reduced echelon form

Thus the inverse is

Example 4.2.6 Let A =
This time there is no inverse because the columns are not linearly independent. This can be seen by solving the equation

and finding that there is a nonzero solution which is equivalent to the columns being a dependent set. Thus, by Theorem 4.2.3, there is no inverse.
Example 4.2.7 Consider the matrix

Find its inverse in arithmetic of ℚ and then find its inverse in ℤ_{5}.
It has an inverse in ℚ.

However, in ℤ_{5} it has no inverse because 5 = 0 in ℤ_{5} and so in ℤ_{5}^{3}, the columns are dependent.
Example 4.2.8 Here is a matrix.

Find its inverse in the arithmetic of ℚ and then in ℤ_{3}.
It has an inverse in the arithmetic of ℚ

However, there is no inverse in the arithmetic of ℤ_{3}. Indeed, the row reduced echelon form of

computed in ℤ_{3} is

and so
The field of residue classes is not of major importance in this book, but it is included to emphasize that these considerations are completely algebraic in nature, depending only on field axioms. There is no geometry or analysis involved here.