Learning Outcomes
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.
| (C.1) |
Recall that the size or dimension of a matrix is defined as where is the number of rows and is the number of columns. The above matrix is a 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 which has size is called a square matrix . In other words, 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 by as follows
Therefore, is the column of , when counted from left to right.
The individual elements of the matrix are called entries or components of . Elements of the matrix are identified according to their position. The -entry of a matrix is the entry in the row and column. For example, in the matrix C.1 above, is in position (and is called the -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 row and the column of matrix by . Then, we can write in terms of its entries, as . Using this notation on the matrix in C.1, 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 zero matrix is the matrix having every entry equal to zero. It is denoted by
One possible zero matrix is shown in the following example.
Example C.3: The Zero Matrix
The zero matrix is .
Note there is a zero matrix, a zero matrix, etc. In fact there is a zero matrix for every size!
Definition C.4: Equality of Matrices
Let and be two matrices. Then means that for and for all and
In other words, two matrices are equal exactly when they are the same size and the corresponding entries are identical. Thus
because they are different sizes. Also,
because, although they are the same size, their corresponding entries are not identical.
In the following section, we explore addition of matrices.
When adding matrices, all matrices in the sum need have the same size. For example,
and
cannot be added, as one has size while the other has size .
However, the addition
is possible.
The formal definition is as follows.
Definition C.5: Addition of Matrices
Let and be two matrices. Then where is the matrix defined by
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.
Solution
Notice that both and are of size . Since and are of the same size, the addition is possible. Using Definition C.5, the addition is done as follows.
Addition of matrices obeys very much the same properties as normal addition with numbers. Note that when we write for example 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 and be matrices. Then, the following properties hold.
Commutative Law of Addition
| (C.2) |
Associative Law of Addition
| (C.3) |
Existence of an Additive Identity
| (C.4) |
Existence of an Additive Inverse
| (C.5) |
We call the zero matrix in C.4 the additive identity. Similarly, we call the matrix in C.5 the additive inverse. is defined to equal In other words, every entry of is multiplied by . In the next section we will study scalar multiplication in more depth to understand what is meant by
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 .
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 and is a scalar, then
Consider the following example.
Example C.8: Effect of Multiplication by a Scalar
Find the result of multiplying the following matrix by .
Solution
By Definition C.7, we multiply each element of by . Therefore,
Similarly to addition of matrices, there are several properties of scalar multiplication which hold.
Proposition C.2. Properties of Scalar Multiplication Let be matrices, and be scalars. Then, the following properties hold.
Distributive Law over Matrix Addition
Distributive Law over Scalar Addition
Associative Law for Scalar Multiplication
Rule for Multiplication by
The proof of this proposition is similar to the proof of Proposition C.1 and is left an exercise to the reader.
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 or are called vectors. If is such a matrix, then we write to denote the entry of in the row of a column matrix, or the column of a row matrix.
The matrix
is called a column vector. The matrix
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,
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
We can express this system in vector form which is as follows:
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
We will soon see that this equals
In general terms,
Thus you take times the first column, add to times the second column, and finally 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 matrix by an column vector.
Definition C.11: Multiplication of Vector by Matrix
Let be an matrix and let be an matrix given by
Then the product is the column vector which equals the following linear combination of the columns of :
If we write the columns of in terms of their entries, they are of the form
Then, we can write the product as
Note that multiplication of an matrix and an vector produces an vector.
Example C.12: A Vector Multiplied by a Matrix
Compute the product for
Solution
We will use Definition C.11 to compute the product. Therefore, we compute the product as follows.
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
Then we can express this system in matrix form as follows.
The expression is also known as the Matrix Form of the corresponding system of linear equations. The matrix is simply the coefficient matrix of the system, the vector is the column vector constructed from the variables of the system, and finally the vector 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 , for the zero vector .
You can see from this definition that a vector
will satisfy the equation only when the entries of the vector 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 matrix by a 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 and , in order to form the product , the number of columns of must equal the number of rows of Consider a product where has size and has size . Then, the product in terms of size of matrices is given by
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 equals the number of rows of the two matrices are said to be conformable and the product is obtained as follows.
Definition C.14: Multiplication of Two Matrices
Let be an matrix and let be an matrix of the form
where are the columns of . Then the matrix is defined as follows:
where is an matrix or column vector which gives the column of .
Consider the following example.
Example C.15: Multiplying Two Matrices
Find if possible.
Solution
The first thing you need to verify when calculating a product is whether the multiplication is possible. The first matrix has size and the second matrix has size . The inside numbers are equal, so and are conformable matrices. According to the above discussion will be a matrix. Definition C.14 gives us a way to calculate each column of , as follows.
You know how to multiply a matrix times a vector, using Definition C.11 for each of the three columns. Thus
Since vectors are simply or matrices, we can also multiply a vector by another vector.
Example C.16: Vector Times Vector Multiplication
Multiply if possible
Solution
In this case we are multiplying a matrix of size by a matrix of size The inside numbers match so the product is defined. Note that the product will be a matrix of size . Using Definition C.14, we can compute this product as follows
You can use Definition C.11 to verify that this product is
Example C.17: A Multiplication Which is Not Defined
Find if possible.
Solution
First check if it is possible. This product is of the form 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 instead of . This demonstrates another property of matrix multiplication. While the product maybe be defined, we cannot assume that the product 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 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 for the matrix
and the zero matrix given by
Solution
In this product, we compute
Hence, .
Notice that we could also multiply by the zero vector given by .The result would be the zero vector. Therefore, it is always the case that , for an appropriately sized zero matrix or vector.
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 entry of It is the entry in the row and the column of the product .
Now if is and is , then we know that the product has the form
The column of is of the form
which is an column vector. It is calculated by
Therefore, the entry is the entry in row of this vector. This is computed by
The following is the formal definition for the entry of a product of matrices.
Definition C.19: The Entry of a Product
Let be an matrix and let be an matrix. Then is an matrix and the -entry of is defined as
Another way to write this is
In other words, to find the -entry of the product , or , you multiply the row of on the left by the column of . To express in terms of its entries, we write .
Consider the following example.
Example C.20: The Entries of a Product
Compute if possible. If it is, find the -entry of using Definition C.19.
Solution
First check if the product is possible. It is of the form and since the inside numbers match, it is possible to do the multiplication. The result should be a matrix. We can first compute :
where the commas separate the columns in the resulting product. Thus the above product equals
which is a matrix as desired. Thus, the -entry equals 42.
Now using Definition C.19, we can find that the -entry equals
Consulting our result for above, this is correct!
You may wish to use this method to verify that the rest of the entries in are correct.
Example C.21: Finding the Entries of a Product
Determine if the product is defined. If it is, find the -entry of the product.
Solution
This product is of the form . The middle numbers match so the matrices are conformable and it is possible to compute the product.
We want to find the -entry of , that is, the entry in the second row and first column of the product. We will use Definition C.19, which states
In this case, , and . Hence the -entry is found by computing
Substituting in the appropriate values, this product becomes
Hence, .
You should take a moment to find a few other entries of . You can multiply the matrices to check that your answers are correct. The product is given by
As pointed out above, it is sometimes possible to multiply matrices in one order but not in the other order. However, even if both and are defined, they may not be equal.
Example C.22: Matrix Multiplication is Not Commutative
Compare the products and , for matrices
Solution
First, notice that and are both of size . Therefore, both products and are defined. The first product, is
The second product, is
Therefore, .
This example illustrates that you cannot assume even when multiplication is defined in both orders. If for some matrices and it is true that , then we say that and 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 and and for scalars and ,
| (C.6) |
| (C.7) |
| (C.8) |
Another important operation on matrices is that of taking the transpose. For a matrix , we denote the transpose of by . Before formally defining the transpose, we explore this operation on the following matrix.
What happened? The first column became the first row and the second column became the second row. Thus the matrix became a matrix. The number 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 be an matrix. Then , the transpose of , denotes the matrix given by
The -entry of becomes the -entry of .
Consider the following example.
Example C.24: The Transpose of a Matrix
Calculate for the following matrix
Solution
By Definition C.23, we know that for , . In other words, we switch the row and column location of each entry. The -entry becomes the -entry.
Thus,
Notice that is a matrix, while is a matrix.
The transpose of a matrix has the following important properties .
Lemma C.1. Properties of the Transpose of a Matrix Let be an matrix, an matrix, and and scalars. Then
The transpose of a matrix is related to other important topics. Consider the following definition.
Definition C.25: Symmetric and Skew Symmetric Matrices
An matrix is said to be symmetric if It is said to be skew symmetric if
We will explore these definitions in the following examples.
Example C.26: Symmetric Matrices
Let
Use Definition C.25 to show that is symmetric.
Solution
By Definition C.25, we need to show that . Now, using Definition C.23,
Example C.27: A Skew Symmetric Matrix
Let
Show that is skew symmetric.
Solution
By Definition C.25,
You can see that each entry of is equal to times the same entry of . Hence, and so by Definition C.25, is skew symmetric.
There is a special matrix, denoted , 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.
The first is the identity matrix, the second is the identity matrix, and so on. By extension, you can likely see what the identity matrix would be. When it is necessary to distinguish which size of identity matrix is being discussed, we will use the notation for the identity matrix.
The identity matrix is so important that there is a special symbol to denote the entry of the identity matrix. This symbol is given by where is the Kronecker symbol defined by
is called the identity matrix because it is a multiplicative identity in the following sense.
Lemma C.2. Multiplication by the Identity Matrix Suppose is an matrix and is the identity matrix. Then If is the identity matrix, it also follows that
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 matrix is said to have an inverse if and only if
In this case, the matrix is called invertible.
Such a matrix will have the same size as the matrix . 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 the inverse.
Theorem C.29: Uniqueness of Inverse
Suppose is an matrix such that an inverse exists. Then there is only one such inverse matrix. That is, given any matrix such that , .
The next example demonstrates how to check the inverse of a matrix.
Example C.30: Verifying the Inverse of a Matrix
Let Showis the inverse of
Solution
To check this, multiply
and
showing that this matrix is indeed the inverse of
Unlike ordinary multiplication of numbers, it can happen that but may fail to have an inverse. This is illustrated in the following example.
Example C.31: A Nonzero Matrix With No Inverse
Let Show that does not have an inverse.
Solution
One might think would have an inverse because it does not equal zero. However, note that
If existed, we would have the following
This says that
which is impossible! Therefore, does not have an inverse.
In the next section, we will explore how to find the inverse of a matrix, if it exists.
In Example C.30, we were given and asked to verify that this matrix was in fact the inverse of . In this section, we explore how to find .
Let
as in Example C.30. In order to find , we need to find a matrix such that
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,
and
Writing the augmented matrix for these two systems gives
for the first system and
| (C.9) |
for the second.
Let’s solve the first system. Take times the first row and add to the second to get
Now take times the second row and add to the first to get
Writing in terms of variables, this says and
Now solve the second system, C.9 to find and You will find that and .
If we take the values found for and and put them into our inverse matrix, we see that the inverse is
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 where is the identity and gave a column of the inverse. In the above,
the first column of the inverse was obtained by solving the first system and then the second column
To simplify this procedure, we could have solved both systems at once! To do so, we could have written
and row reduced until we obtained
and read off the inverse as the matrix on the right side.
This exploration motivates the following important algorithm.
Matrix Inverse Algorithmmatrixinversionalgorithm Suppose is an matrix. To find if it exists, form the augmented matrix
If possible do row operations until you obtain an matrix of the form
When this has been done, In this case, we say that is invertible. If it is impossible to row reduce to a matrix of the form then has no inverse.
This algorithm shows how to find the inverse if it exists. It will also tell you if does not have an inverse.
Consider the following example.
Example C.32: Finding the Inverse
Let . Find if it exists.
Solution
Set up the augmented matrix
Now we row reduce, with the goal of obtaining the identity matrix on the left hand side. First, take times the first row and add to the second followed by times the first row added to the third row. This yields
Then take 5 times the second row and add to -2 times the third row.
Next take the third row and add to times the first row. This yields
Now take times the second row and add to the first row.
Finally divide the first row by -7, the second row by -10 and the third row by 14 which yields
Notice that the left hand side of this matrix is now the identity matrix . Therefore, the inverse is the matrix on the right hand side, given by
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 . Find if it exists.
Solution
Write the augmented matrix
and proceed to do row operations attempting to obtain Take times the first row and add to the second. Then take times the first row and add to the third row.
Next add times the second row to the third row.
At this point, you can see there will be no way to obtain on the left side of this augmented matrix. Hence, there is no way to complete this algorithm, and therefore the inverse of does not exist. In this case, we say that 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 and both equal the identity matrix. Through this method, you can always be sure that you have calculated 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 . Suppose you find the inverse of the matrix . Then you could multiply both sides of this equation on the left by and simplify to obtain
Therefore we can find , the solution to the system, by computing . Note that once you have found , you can easily get the solution for different right hand sides (different ). It is always just .
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.
Solution
First, we can write the system of equations in matrix form
| (C.10) |
The inverse of the matrix
is
Verifying this inverse is left as an exercise.
From here, the solution to the given system C.10 is found by
What if the right side, , of C.10 had been In other words, what would be the solution to
By the above discussion, the solution is given by
This illustrates that for a system where exists, it is easy to find the solution when the vector is changed.
Theorem C.35: Inverses of Transposes and Products
Theorem C.36: Properties of the Inverse