Contents  |  ‹ Previous  |  Next ›  |  Download EPUB  |  PDF

Appendix C
Matrices

C.1 Matrix Arithmetic

Learning Outcomes

A.
Perform the matrix operations of matrix addition, scalar multiplication, transposition and matrix multiplication. Identify when these operations are not defined. Represent these operations in terms of the entries of a matrix.
B.
Prove algebraic properties for matrix addition, scalar multiplication, transposition, and matrix multiplication. Apply these properties to manipulate an algebraic expression involving matrices.
C.
Compute the inverse of a matrix using row operations, and prove identities involving matrix inverses.
E.
Solve a linear system using matrix algebra.
F.
Use multiplication by an elementary matrix to apply row operations.
G.
Write a matrix as a product of elementary matrices.

You have now solved systems of equations by writing them in terms of an augmented matrix and then doing row operations on this augmented matrix. It turns out that matrices are important not only for systems of equations but also in many applications.

Recall that a matrix is a rectangular array of numbers. Several of them are referred to as matrices. For example, here is a matrix.

[ 1 2 3 4 5 2 8 7 6 − 9 1 2 ](C.1)

Recall that the size or dimension of a matrix is defined as m × n where m is the number of rows and n is the number of columns. The above matrix is a 3 × 4 matrix because there are three rows and four columns. You can remember the columns are like columns in a Greek temple. They stand upright while the rows lay flat like rows made by a tractor in a plowed field.

When specifying the size of a matrix, you always list the number of rows before the number of columns.You might remember that you always list the rows before the columns by using the phrase Rowman Catholic.

Consider the following definition.

Definition C.1: Square Matrix

A matrix A which has size n × n is called a square matrix . In other words, A is a square matrix if it has the same number of rows and columns.

There is some notation specific to matrices which we now introduce. We denote the columns of a matrix A by Aj as follows

A = [ A1 A2 An ]

Therefore, Aj is the jth column of A, when counted from left to right.

The individual elements of the matrix are called entries or components of A. Elements of the matrix are identified according to their position. The (i,j)-entry of a matrix is the entry in the ith row and jth column. For example, in the matrix C.1 above, 8 is in position (2,3) (and is called the (2,3)-entry) because it is in the second row and the third column.

In order to remember which matrix we are speaking of, we will denote the entry in the ith row and the jth column of matrix A by aij. Then, we can write A in terms of its entries, as A = [aij]. Using this notation on the matrix in C.1, a23 = 8,a32 = 9,a12 = 2, etc.

There are various operations which are done on matrices of appropriate sizes. Matrices can be added to and subtracted from other matrices, multiplied by a scalar, and multiplied by other matrices. We will never divide a matrix by another matrix, but we will see later how matrix inverses play a similar role.

In doing arithmetic with matrices, we often define the action by what happens in terms of the entries (or components) of the matrices. Before looking at these operations in depth, consider a few general definitions.

Definition C.2: The Zero Matrix

The m × n zero matrix is the m × n matrix having every entry equal to zero. It is denoted by 0.

One possible zero matrix is shown in the following example.

Example C.3: The Zero Matrix

The 2 × 3 zero matrix is 0 = [ 0 0 0 0 0 0 ].

Note there is a 2 × 3 zero matrix, a 3 × 4 zero matrix, etc. In fact there is a zero matrix for every size!

Definition C.4: Equality of Matrices

Let A and B be two m × n matrices. Then A = B means that for A = [aij] and B = [bij] , aij = bij for all 1 i m and 1 j n.

In other words, two matrices are equal exactly when they are the same size and the corresponding entries are identical. Thus

[ 0 0 0 0 0 0 ] [ 0 0 0 0 ]

because they are different sizes. Also,

[ 0 1 3 2 ] [ 1 0 2 3 ]

because, although they are the same size, their corresponding entries are not identical.

In the following section, we explore addition of matrices.

C.1.1 Addition of Matrices

When adding matrices, all matrices in the sum need have the same size. For example,

[ 1 2 3 4 5 2 ]

and

[ 1 4 8 2 8 5 ]

cannot be added, as one has size 3 × 2 while the other has size 2 × 3.

However, the addition

[ 4 6 3 5 0 4 11 2 3 ]+ [ 0 5 0 4 4 14 1 2 6 ]

is possible.

The formal definition is as follows.

Definition C.5: Addition of Matrices

Let A = [aij] and B = [bij] be two m × n matrices. Then A + B = C where C is the m × n matrix C = [cij] defined by

cij = aij + bij

This definition tells us that when adding matrices, we simply add corresponding entries of the matrices. This is demonstrated in the next example.

Example C.6: Addition of Matrices of Same Size

Add the following matrices, if possible.

A = [ 1 2 3 1 0 4 ],B = [ 5 2 3 6 2 1 ]

Solution

Notice that both A and B are of size 2 × 3. Since A and B are of the same size, the addition is possible. Using Definition C.5, the addition is done as follows.

A+B = [ 1 2 3 1 0 4 ]+ [ 5 2 3 6 2 1 ] = [ 1 + 5 2 + 2 3 + 3 1 + 6 0 + 2 4 + 1 ] = [ 6 4 6 5 2 5 ]

Addition of matrices obeys very much the same properties as normal addition with numbers. Note that when we write for example A + B then we assume that both matrices are of equal size so that the operation is indeed possible.

Proposition C.1. Properties of Matrix Addition Let A,B and C be matrices. Then, the following properties hold.

We call the zero matrix in C.4 the additive identity. Similarly, we call the matrix A in C.5 the additive inverse. A is defined to equal (1)A = [aij]. In other words, every entry of A is multiplied by 1. In the next section we will study scalar multiplication in more depth to understand what is meant by (1)A.

C.1.2 Scalar Multiplication of Matrices

Recall that we use the word scalar when referring to numbers. Therefore, scalar multiplication of a matrix is the multiplication of a matrix by a number. To illustrate this concept, consider the following example in which a matrix is multiplied by the scalar 3.

3 [ 1 2 3 4 5 2 8 7 6 9 1 2 ] = [ 3 6 9 12 15 6 24 21 18 27 3 6 ]

The new matrix is obtained by multiplying every entry of the original matrix by the given scalar.

The formal definition of scalar multiplication is as follows.

Definition C.7: Scalar Multiplication of Matrices

If A = [aij] and k is a scalar, then kA = [kaij] .

Consider the following example.

Example C.8: Effect of Multiplication by a Scalar

Find the result of multiplying the following matrix A by 7.

A = [ 2 0 1 4 ]

Solution

By Definition C.7, we multiply each element of A by 7. Therefore,

7A = 7 [ 2 0 1 4 ] = [ 7(2) 7(0) 7(1) 7(4) ] = [ 14 0 7 28 ]

Similarly to addition of matrices, there are several properties of scalar multiplication which hold.

Proposition C.2. Properties of Scalar Multiplication Let A,B be matrices, and k,p be scalars. Then, the following properties hold.

The proof of this proposition is similar to the proof of Proposition C.1 and is left an exercise to the reader.

C.1.3 Multiplication of Matrices

The next important matrix operation we will explore is multiplication of matrices. The operation of matrix multiplication is one of the most important and useful of the matrix operations. Throughout this section, we will also demonstrate how matrix multiplication relates to linear systems of equations.

First, we provide a formal definition of row and column vectors.

Definition C.9: Row and Column Vectors

Matrices of size n × 1 or 1 × n are called vectors. If x is such a matrix, then we write xi to denote the entry of x in the ith row of a column matrix, or the ith column of a row matrix.

The n × 1 matrix

x = [ x1 x n ]

is called a column vector. The 1 × n matrix

x = [ x1 xn ]

is called a row vector.

We may simply use the term vector throughout this text to refer to either a column or row vector. If we do so, the context will make it clear which we are referring to.

In this chapter, we will again use the notion of linear combination of vectors as in Definition D.7. In this context, a linear combination is a sum consisting of vectors multiplied by scalars. For example,

[ 50 122 ] = 7 [ 1 4 ]+8 [ 2 5 ]+9 [ 3 6 ]

is a linear combination of three vectors.

It turns out that we can express any system of linear equations as a linear combination of vectors. In fact, the vectors that we will use are just the columns of the corresponding augmented matrix!

Definition C.10: The Vector Form of a System of Linear Equations

Suppose we have a system of equations given by

a11x1 + + a1nxn = b1 a m1x1 + + amnxn = bm

We can express this system in vector form which is as follows:

x1 [ a11 a21 a m1 ]+x2 [ a12 a22 a m2 ]++xn [ a1n a2n a mn ] = [ b1 b2 b m ]

Notice that each vector used here is one column from the corresponding augmented matrix. There is one vector for each variable in the system, along with the constant vector.

The first important form of matrix multiplication is multiplying a matrix by a vector. Consider the product given by

[ 1 2 3 4 5 6 ] [ 7 8 9 ]

We will soon see that this equals

7 [ 1 4 ]+8 [ 2 5 ]+9 [ 3 6 ] = [ 50 122 ]

In general terms,

[ a11 a12 a13 a21 a22 a23 ] [ x1 x2 x3 ] = x1 [ a11 a21 ] + x2 [ a12 a22 ] + x3 [ a13 a23 ] = [ a11x1 + a12x2 + a13x3 a21x1 + a22x2 + a23x3 ]

Thus you take x1 times the first column, add to x2 times the second column, and finally x3 times the third column. The above sum is a linear combination of the columns of the matrix. When you multiply a matrix on the left by a vector on the right, the numbers making up the vector are just the scalars to be used in the linear combination of the columns as illustrated above.

Here is the formal definition of how to multiply an m × n matrix by an n × 1 column vector.

Definition C.11: Multiplication of Vector by Matrix

Let A = [aij] be an m × n matrix and let x be an n × 1 matrix given by

A = [A1An] ,x = [ x1 x n ]

Then the product Ax is the m × 1 column vector which equals the following linear combination of the columns of A:

x1A1 + x2A2 + + xnAn = j=1nx jAj

If we write the columns of A in terms of their entries, they are of the form

Aj = [ a1j a2j a mj ]

Then, we can write the product Ax as

Ax = x1 [ a11 a21 a m1 ]+x2 [ a12 a22 a m2 ]++xn [ a1n a2n a mn ]

Note that multiplication of an m × n matrix and an n × 1 vector produces an m × 1 vector.

Here is an example.

Example C.12: A Vector Multiplied by a Matrix

Compute the product Ax for

A = [ 1 2 1 3 0 2 1 2 2 1 4 1 ],x = [ 1 2 0 1 ]

Solution

We will use Definition C.11 to compute the product. Therefore, we compute the product Ax as follows.

1 [ 1 0 2 ] + 2 [ 2 2 1 ] + 0 [ 1 1 4 ] + 1 [ 3 2 1 ] = [ 1 0 2 ] + [ 4 4 2 ] + [ 0 0 0 ] + [ 3 2 1 ] = [ 8 2 5 ]

Using the above operation, we can also write a system of linear equations in matrix form. In this form, we express the system as a matrix multiplied by a vector. Consider the following definition.

Definition C.13: The Matrix Form of a System of Linear Equations

Suppose we have a system of equations given by

a11x1 + + a1nxn = b1 a21x1 + + a2nxn = b2 a m1x1 + + amnxn = bm

Then we can express this system in matrix form as follows.

[ a11 a12 a1n a21 a22 a2n a m1 am2 amn ] [ x1 x2 x n ] = [ b1 b2 b m ]

The expression Ax = B is also known as the Matrix Form of the corresponding system of linear equations. The matrix A is simply the coefficient matrix of the system, the vector x is the column vector constructed from the variables of the system, and finally the vector B is the column vector constructed from the constants of the system. It is important to note that any system of linear equations can be written in this form.

Notice that if we write a homogeneous system of equations in matrix form, it would have the form Ax = 0, for the zero vector 0.

You can see from this definition that a vector

x = [ x1 x2 x n ]

will satisfy the equation Ax = B only when the entries x1,x2,,xn of the vector x are solutions to the original system.

Now that we have examined how to multiply a matrix by a vector, we wish to consider the case where we multiply two matrices of more general sizes, although these sizes still need to be appropriate as we will see. For example, in Example C.12, we multiplied a 3 × 4 matrix by a 4 × 1 vector. We want to investigate how to multiply other sizes of matrices.

We have not yet given any conditions on when matrix multiplication is possible! For matrices A and B, in order to form the product AB, the number of columns of A must equal the number of rows of B. Consider a product AB where A has size m × n and B has size n × p. Then, the product in terms of size of matrices is given by

(m ×n)(n^ × pthese must match!) = m × p

Note the two outside numbers give the size of the product. One of the most important rules regarding matrix multiplication is the following. If the two middle numbers don’t match, you can’t multiply the matrices!

When the number of columns of A equals the number of rows of B the two matrices are said to be conformable and the product AB is obtained as follows.

Definition C.14: Multiplication of Two Matrices

Let A be an m × n matrix and let B be an n × p matrix of the form

B = [B1Bp]

where B1,...,Bp are the n × 1 columns of B. Then the m × p matrix AB is defined as follows:

AB = A [B1Bp] = [(AB)1(AB)p]

where (AB)k is an m × 1 matrix or column vector which gives the kth column of AB.

Consider the following example.

Example C.15: Multiplying Two Matrices

Find AB if possible.

A = [ 1 2 1 0 2 1 ],B = [ 1 2 0 0 3 1 2 1 1 ]

Solution

The first thing you need to verify when calculating a product is whether the multiplication is possible. The first matrix has size 2 × 3 and the second matrix has size 3 × 3. The inside numbers are equal, so A and B are conformable matrices. According to the above discussion AB will be a 2 × 3 matrix. Definition C.14 gives us a way to calculate each column of AB, as follows.

[ [ 1 2 1 0 2 1 ] [ 1 0 2 ]First column, [ 1 2 1 0 2 1 ] [ 2 3 1 ]Second column, [ 1 2 1 0 2 1 ] [ 0 1 1 ]Third column]

You know how to multiply a matrix times a vector, using Definition C.11 for each of the three columns. Thus

[ 1 2 1 0 2 1 ] [ 1 2 0 0 3 1 2 1 1 ] = [ 1 9 3 2 7 3 ]

Since vectors are simply n × 1 or 1 × m matrices, we can also multiply a vector by another vector.

Example C.16: Vector Times Vector Multiplication

Multiply if possible [ 1 2 1 ] [ 1 2 1 0 ].

Solution

In this case we are multiplying a matrix of size 3 × 1 by a matrix of size 1 × 4. The inside numbers match so the product is defined. Note that the product will be a matrix of size 3 × 4. Using Definition C.14, we can compute this product as follows

[ 1 2 1 ] [ 1 2 1 0 ] = [ [ 1 2 1 ] [ 1 ]First column, [ 1 2 1 ] [ 2 ]Second column, [ 1 2 1 ] [ 1 ]Third column, [ 1 2 1 ] [ 0 ]Fourth column]

You can use Definition C.11 to verify that this product is

[ 1 2 1 0 2 4 2 0 1 2 1 0 ]

Example C.17: A Multiplication Which is Not Defined

Find BA if possible.

B = [ 1 2 0 0 3 1 2 1 1 ],A = [ 1 2 1 0 2 1 ]

Solution

First check if it is possible. This product is of the form (3 × 3) (2 × 3). The inside numbers do not match and so you can’t do this multiplication.

In this case, we say that the multiplication is not defined. Notice that these are the same matrices which we used in Example C.15. In this example, we tried to calculate BA instead of AB. This demonstrates another property of matrix multiplication. While the product AB maybe be defined, we cannot assume that the product BA will be possible. Therefore, it is important to always check that the product is defined before carrying out any calculations.

Earlier, we defined the zero matrix 0 to be the matrix (of appropriate size) containing zeros in all entries. Consider the following example for multiplication by the zero matrix.

Example C.18: Multiplication by the Zero Matrix

Compute the product A0 for the matrix

A = [ 1 2 3 4 ]

and the 2 × 2 zero matrix given by

0 = [ 0 0 0 0 ]

Solution

In this product, we compute

[ 1 2 3 4 ] [ 0 0 0 0 ] = [ 0 0 0 0 ]

Hence, A0 = 0.

Notice that we could also multiply A by the 2 × 1 zero vector given by [ 0 0 ].The result would be the 2 × 1 zero vector. Therefore, it is always the case that A0 = 0, for an appropriately sized zero matrix or vector.

C.1.4 The ijth Entry of a Product

In previous sections, we used the entries of a matrix to describe the action of matrix addition and scalar multiplication. We can also study matrix multiplication using the entries of matrices.

What is the ijth entry of AB? It is the entry in the ith row and the jth column of the product AB.

Now if A is m × n and B is n × p, then we know that the product AB has the form

[ a11 a12 a1n a21 a22 a2n a m1 am2 amn ] [ b11 b12 b1j b1p b21 b22 b2j b2p b n1 bn2 bnj bnp ]

The jth column of AB is of the form

[ a11 a12 a1n a21 a22 a2n a m1 am2 amn ] [ b1j b2j b nj ]

which is an m × 1 column vector. It is calculated by

b1j [ a11 a21 a m1 ]+b2j [ a12 a22 a m2 ]++bnj [ a1n a2n a mn ]

Therefore, the ijth entry is the entry in row i of this vector. This is computed by

ai1b1j + ai2b2j + + ainbnj = k=1na ikbkj

The following is the formal definition for the ijth entry of a product of matrices.

Definition C.19: The ijth Entry of a Product

Let A = [aij] be an m × n matrix and let B = [bij] be an n × p matrix. Then AB is an m × p matrix and the (i,j)-entry of AB is defined as

(AB)ij = k=1na ikbkj

Another way to write this is

(AB)ij = [ ai1 ai2 ain ] [ b1j b2j b nj ] = ai1b1j+ai2b2j++ainbnj

In other words, to find the (i,j)-entry of the product AB, or (AB)ij, you multiply the ith row of A, on the left by the jth column of B. To express AB in terms of its entries, we write AB = [(AB)ij].

Consider the following example.

Example C.20: The Entries of a Product

Compute AB if possible. If it is, find the (3,2)-entry of AB using Definition C.19.

A = [ 1 2 3 1 2 6 ],B = [ 2 3 1 7 6 2 ]

Solution

First check if the product is possible. It is of the form (3 × 2) (2 × 3) and since the inside numbers match, it is possible to do the multiplication. The result should be a 3 × 3 matrix. We can first compute AB:

[ [ 1 2 3 1 2 6 ] [ 2 7 ], [ 1 2 3 1 2 6 ] [ 3 6 ], [ 1 2 3 1 2 6 ] [ 1 2 ]]

where the commas separate the columns in the resulting product. Thus the above product equals

[ 16 15 5 13 15 5 46 42 14 ]

which is a 3 × 3 matrix as desired. Thus, the (3,2)-entry equals 42.

Now using Definition C.19, we can find that the (3,2)-entry equals

k=12a 3kbk2 = a31b12 + a32b22 = 2 × 3 + 6 × 6 = 42

Consulting our result for AB above, this is correct!

You may wish to use this method to verify that the rest of the entries in AB are correct.

Here is another example.

Example C.21: Finding the Entries of a Product

Determine if the product AB is defined. If it is, find the (2,1)-entry of the product.

A = [ 2 3 1 7 6 2 0 0 0 ],B = [ 1 2 3 1 2 6 ]

Solution

This product is of the form (3 × 3) (3 × 2). The middle numbers match so the matrices are conformable and it is possible to compute the product.

We want to find the (2,1)-entry of AB, that is, the entry in the second row and first column of the product. We will use Definition C.19, which states

(AB)ij = k=1na ikbkj

In this case, n = 3, i = 2 and j = 1. Hence the (2,1)-entry is found by computing

(AB)21 = k=13a 2kbk1 = [ a21 a22 a23 ] [ b11 b21 b31 ]

Substituting in the appropriate values, this product becomes

[ a21 a22 a23 ] [ b11 b21 b31 ] = [ 7 6 2 ] [ 1 3 2 ] = 1×7+3×6+2×2 = 29

Hence, (AB)21 = 29.

You should take a moment to find a few other entries of AB. You can multiply the matrices to check that your answers are correct. The product AB is given by

AB = [ 13 13 29 32 0 0 ]

C.1.5 Properties of Matrix Multiplication

As pointed out above, it is sometimes possible to multiply matrices in one order but not in the other order. However, even if both AB and BA are defined, they may not be equal.

Example C.22: Matrix Multiplication is Not Commutative

Compare the products AB and BA, for matrices A = [ 1 2 3 4 ],B = [ 0 1 1 0 ]

Solution

First, notice that A and B are both of size 2 × 2. Therefore, both products AB and BA are defined. The first product, AB is

AB = [ 1 2 3 4 ] [ 0 1 1 0 ] = [ 2 1 4 3 ]

The second product, BA is

[ 0 1 1 0 ] [ 1 2 3 4 ] = [ 3 4 1 2 ]

Therefore, ABBA.

This example illustrates that you cannot assume AB = BA even when multiplication is defined in both orders. If for some matrices A and B it is true that AB = BA, then we say that A and B commute. This is one important property of matrix multiplication.

The following are other important properties of matrix multiplication. Notice that these properties hold only when the size of matrices are such that the products are defined.

Proposition C.3. Properties of Matrix Multiplication The following hold for matrices A,B, and C and for scalars r and s,

A (rB + sC) = r (AB) + s (AC) (C.6)
(B + C)A = BA + CA (C.7)
A (BC) = (AB)C (C.8)

C.1.6 The Transpose

Another important operation on matrices is that of taking the transpose. For a matrix A, we denote the transpose of A by AT. Before formally defining the transpose, we explore this operation on the following matrix.

[ 1 4 3 1 2 6 ]T = [ 1 3 2 4 1 6 ]

What happened? The first column became the first row and the second column became the second row. Thus the 3 × 2 matrix became a 2 × 3 matrix. The number 4 was in the first row and the second column and it ended up in the second row and first column.

The definition of the transpose is as follows.

Definition C.23: The Transpose of a Matrix

Let A be an m × n matrix. Then AT, the transpose of A, denotes the n × m matrix given by

AT = [a ij] T = [a ji]

The (i,j)-entry of A becomes the (j,i)-entry of AT.

Consider the following example.

Example C.24: The Transpose of a Matrix

Calculate AT for the following matrix

A = [ 1 2 6 3 5 4 ]

Solution

By Definition C.23, we know that for A = [aij], AT = [aji]. In other words, we switch the row and column location of each entry. The (1,2)-entry becomes the (2,1)-entry.

Thus,

AT = [ 1 3 2 5 6 4 ]

Notice that A is a 2 × 3 matrix, while AT is a 3 × 2 matrix.

The transpose of a matrix has the following important properties .

Lemma C.1. Properties of the Transpose of a Matrix Let A be an m × n matrix, B an n × p matrix, and r and s scalars. Then

1.
(AT) T = A
2.
(AB)T = BTAT
3.
(rA + sB)T = rAT + sBT

The transpose of a matrix is related to other important topics. Consider the following definition.

Definition C.25: Symmetric and Skew Symmetric Matrices

An n × n matrix A is said to be symmetric if A = AT. It is said to be skew symmetric if A = AT.

We will explore these definitions in the following examples.

Example C.26: Symmetric Matrices

Let

A = [ 2 1 3 1 5 3 3 3 7 ]

Use Definition C.25 to show that A is symmetric.

Solution

By Definition C.25, we need to show that A = AT. Now, using Definition C.23,

AT = [ 2 1 3 1 5 3 3 3 7 ]

Hence, A = AT, so A is symmetric.

Example C.27: A Skew Symmetric Matrix

Let

A = [ 0 1 3 1 0 2 3 2 0 ]

Show that A is skew symmetric.

Solution

By Definition C.25,

AT = [ 0 1 3 1 0 2 3 2 0 ]

You can see that each entry of AT is equal to 1 times the same entry of A. Hence, AT = A and so by Definition C.25, A is skew symmetric.

C.1.7 The Identity and Inverses

There is a special matrix, denoted I, which is called to as the identity matrix. The identity matrix is always a square matrix, and it has the property that there are ones down the main diagonal and zeroes elsewhere. Here are some identity matrices of various sizes.

[1], [ 1 0 0 1 ], [ 1 0 0 0 1 0 0 0 1 ], [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ]

The first is the 1 × 1 identity matrix, the second is the 2 × 2 identity matrix, and so on. By extension, you can likely see what the n × n identity matrix would be. When it is necessary to distinguish which size of identity matrix is being discussed, we will use the notation In for the n × n identity matrix.

The identity matrix is so important that there is a special symbol to denote the ijth entry of the identity matrix. This symbol is given by Iij = δij where δij is the Kronecker symbol defined by

δij = { 1 if i = j 0 if  i j

In is called the identity matrix because it is a multiplicative identity in the following sense.

Lemma C.2. Multiplication by the Identity Matrix Suppose A is an m × n matrix and In is the n × n identity matrix. Then AIn = A. If Im is the m × m identity matrix, it also follows that ImA = A.

We now define the matrix operation which in some ways plays the role of division.

Definition C.28: The Inverse of a Matrix

A square n × n matrix A is said to have an inverse A1 if and only if

AA1 = A1A = I n

In this case, the matrix A is called invertible.

Such a matrix A1 will have the same size as the matrix A. It is very important to observe that the inverse of a matrix, if it exists, is unique. Another way to think of this is that if it acts like the inverse, then it is the inverse.

Theorem C.29: Uniqueness of Inverse

Suppose A is an n ×n matrix such that an inverse A1 exists. Then there is only one such inverse matrix. That is, given any matrix B such that AB = BA = I, B = A1.

The next example demonstrates how to check the inverse of a matrix.

Example C.30: Verifying the Inverse of a Matrix

Let A = [ 1 1 1 2 ]. Show [ 2 1 1 1 ]is the inverse of A.

Solution

To check this, multiply

[ 1 1 1 2 ] [ 2 1 1 1 ] = [ 1 0 0 1 ] = I

and

[ 2 1 1 1 ] [ 1 1 1 2 ] = [ 1 0 0 1 ] = I

showing that this matrix is indeed the inverse of A.

Unlike ordinary multiplication of numbers, it can happen that A0 but A may fail to have an inverse. This is illustrated in the following example.

Example C.31: A Nonzero Matrix With No Inverse

Let A = [ 1 1 1 1 ]. Show that A does not have an inverse.

Solution

One might think A would have an inverse because it does not equal zero. However, note that

[ 1 1 1 1 ] [ 1 1 ] = [ 0 0 ]

If A1 existed, we would have the following

[ 0 0 ] = A1 ( [ 0 0 ]) = A1 (A [ 1 1 ]) = (A1A) [ 1 1 ] = I [ 1 1 ] = [ 1 1 ]

This says that

[ 0 0 ] = [ 1 1 ]

which is impossible! Therefore, A does not have an inverse.

In the next section, we will explore how to find the inverse of a matrix, if it exists.

C.1.8 Finding the Inverse of a Matrix

In Example C.30, we were given A1 and asked to verify that this matrix was in fact the inverse of A. In this section, we explore how to find A1.

Let

A = [ 1 1 1 2 ]

as in Example C.30. In order to find A1, we need to find a matrix [ x z y w ] such that

[ 1 1 1 2 ] [ x z y w ] = [ 1 0 0 1 ]

We can multiply these two matrices, and see that in order for this equation to be true, we must find the solution to the systems of equations,

x + y = 1 x + 2y = 0

and

z + w = 0 z + 2w = 1

Writing the augmented matrix for these two systems gives

[ 1 1 1 1 2 0 ]

for the first system and

[ 1 1 0 1 2 1 ](C.9)

for the second.

Let’s solve the first system. Take 1 times the first row and add to the second to get

[ 1 1 1 0 1 1 ]

Now take 1 times the second row and add to the first to get

[ 1 0 2 0 1 1 ]

Writing in terms of variables, this says x = 2 and y = 1.

Now solve the second system, C.9 to find z and w. You will find that z = 1 and w = 1.

If we take the values found for x,y,z, and w and put them into our inverse matrix, we see that the inverse is

A1 = [ x z y w ] = [ 2 1 1 1 ]

After taking the time to solve the second system, you may have noticed that exactly the same row operations were used to solve both systems. In each case, the end result was something of the form [I|X ] where I is the identity and X gave a column of the inverse. In the above,

[ x y ]

the first column of the inverse was obtained by solving the first system and then the second column

[ z w ]

To simplify this procedure, we could have solved both systems at once! To do so, we could have written

[ 1 1 1 0 1 2 0 1 ]

and row reduced until we obtained

[ 1 0 2 1 0 1 1 1 ]

and read off the inverse as the 2 × 2 matrix on the right side.

This exploration motivates the following important algorithm.

Matrix Inverse Algorithmmatrixinversionalgorithm Suppose A is an n × n matrix. To find A1 if it exists, form the augmented n × 2n matrix

[A|I ]

If possible do row operations until you obtain an n × 2n matrix of the form

[I|B]

When this has been done, B = A1. In this case, we say that A is invertible. If it is impossible to row reduce to a matrix of the form [I|B], then A has no inverse.

This algorithm shows how to find the inverse if it exists. It will also tell you if A does not have an inverse.

Consider the following example.

Example C.32: Finding the Inverse

Let A = [ 1 2 2 1 0 2 3 1 1 ]. Find A1 if it exists.

Solution

Set up the augmented matrix

[A|I ] = [ 1 2 2 1 0 0 1 0 2 0 1 0 3 1 1 0 0 1 ]

Now we row reduce, with the goal of obtaining the 3 × 3 identity matrix on the left hand side. First, take 1 times the first row and add to the second followed by 3 times the first row added to the third row. This yields

[ 1 2 2 1 0 0 0 2 0 1 1 0 0 5 7 3 0 1 ]

Then take 5 times the second row and add to -2 times the third row.

[ 1 2 2 1 0 0 0 10 0 5 5 0 0 0 14 1 5 2 ]

Next take the third row and add to 7 times the first row. This yields

[ 7 14 0 6 5 2 0 10 0 5 5 0 0 0 14 1 5 2 ]

Now take 7 5 times the second row and add to the first row.

[ 7 0 0 1 2 2 0 10 0 5 5 0 0 0 14 1 5 2 ]

Finally divide the first row by -7, the second row by -10 and the third row by 14 which yields

[ 1 0 0 1 7 2 7 2 7 0 1 0 1 2 1 2 0 0 0 1 1 14 5 14 1 7 ]

Notice that the left hand side of this matrix is now the 3 × 3 identity matrix I3. Therefore, the inverse is the 3 × 3 matrix on the right hand side, given by

[ 1 7 2 7 2 7 1 2 1 2 0 1 14 5 14 1 7 ]

It may happen that through this algorithm, you discover that the left hand side cannot be row reduced to the identity matrix. Consider the following example of this situation.

Example C.33: A Matrix Which Has No Inverse

Let A = [ 1 2 2 1 0 2 2 2 4 ]. Find A1 if it exists.

Solution

Write the augmented matrix [A|I ]

[ 1 2 2 1 0 0 1 0 2 0 1 0 2 2 4 0 0 1 ]

and proceed to do row operations attempting to obtain [I|A1] . Take 1 times the first row and add to the second. Then take 2 times the first row and add to the third row.

[ 1 2 2 1 0 0 0 2 0 1 1 0 0 2 0 2 0 1 ]

Next add 1 times the second row to the third row.

[ 1 2 2 1 0 0 0 2 0 1 1 0 0 0 0 1 1 1 ]

At this point, you can see there will be no way to obtain I on the left side of this augmented matrix. Hence, there is no way to complete this algorithm, and therefore the inverse of A does not exist. In this case, we say that A is not invertible.

If the algorithm provides an inverse for the original matrix, it is always possible to check your answer. To do so, use the method demonstrated in Example C.30. Check that the products AA1 and A1A both equal the identity matrix. Through this method, you can always be sure that you have calculated A1 properly!

One way in which the inverse of a matrix is useful is to find the solution of a system of linear equations. Recall from Definition C.13 that we can write a system of equations in matrix form, which is of the form AX = B. Suppose you find the inverse of the matrix A1. Then you could multiply both sides of this equation on the left by A1 and simplify to obtain

(A1) AX = A1B (A1A)X = A1B IX = A1B X = A1B

Therefore we can find X, the solution to the system, by computing X = A1B. Note that once you have found A1, you can easily get the solution for different right hand sides (different B). It is always just A1B.

We will explore this method of finding the solution to a system in the following example.

Example C.34: Using the Inverse to Solve a System of Equations

Consider the following system of equations. Use the inverse of a suitable matrix to give the solutions to this system.

x + z = 1 x y + z = 3 x + y z = 2

Solution

First, we can write the system of equations in matrix form

AX = [ 1 0 1 1 1 1 1 1 1 ] [ x y z ] = [ 1 3 2 ] = B (C.10)

The inverse of the matrix

A = [ 1 0 1 1 1 1 1 1 1 ]

is

A1 = [ 0 1 2 1 2 1 1 0 1 1 2 1 2 ]

Verifying this inverse is left as an exercise.

From here, the solution to the given system C.10 is found by

[ x y z ] = A1B = [ 0 1 2 1 2 1 1 0 1 1 2 1 2 ] [ 1 3 2 ] = [ 5 2 2 3 2 ]

What if the right side, B, of C.10 had been [ 0 1 3 ]? In other words, what would be the solution to

[ 1 0 1 1 1 1 1 1 1 ] [ x y z ] = [ 0 1 3 ]?

By the above discussion, the solution is given by

[ x y z ] = A1B = [ 0 1 2 1 2 1 1 0 1 1 2 1 2 ] [ 0 1 3 ] = [ 2 1 2 ]

This illustrates that for a system AX = B where A1 exists, it is easy to find the solution when the vector B is changed.

Theorem C.35: Inverses of Transposes and Products

1.
2.
3.

Theorem C.36: Properties of the Inverse

1.
2.
3.
4.
© 2026 Robert Hildebrand and contributors · Licensed CC BY-SA 4.0 · Sources and attribution · Book home