So with the help and assistance of we have been able to determine a solution to the system represented by through judicious use of matrix multiplication. We know by Theorem NMUS that since the coefficient matrix in this example is nonsingular, there would be a unique solution, no matter what the choice of The derivation above amplifies this result, since we were forced to conclude that and the solution could not be anything else. You should notice that this argument would hold for any particular choice of
Section MISLE Matrix Inverses and Systems of Linear Equations
The inverse of a square matrix, and solutions to linear systems with square coefficient matrices, are intimately connected.
Subsection SI Solutions and Inverses
We begin with a familiar example, performed in a novel way.
Example SABMI. Solutions to Archetype B with a matrix inverse.
The matrix of the previous example is called the inverse of When and are combined via matrix multiplication, the result is the identity matrix, which can be inserted “in front” of as the first step in finding the solution. This is entirely analogous to how we might solve a single linear equation like
Here we have obtained a solution by employing the “multiplicative inverse” of This works fine for any scalar multiple of except for zero, since zero does not have a multiplicative inverse. Consider separately the two linear equations
The first has no solutions, while the second has infinitely many solutions. For matrices, it is all just a little more complicated. Some matrices have inverses, some do not. And when a matrix does have an inverse, just how would we compute it? In other words, just where did that matrix in the last example come from? Are there other matrices that might have worked just as well?
Subsection IM Inverse of a Matrix
Definition MI. Matrix Inverse.
Suppose and are square matrices of size such that and Then is invertible and is the inverse of In this situation, we write
Notice that if is the inverse of then we can just as easily say is the inverse of or and are inverses of each other.
Not every square matrix has an inverse. In Example SABMI the matrix is the inverse of the coefficient matrix of Archetype B. To see this it only remains to check that What about Archetype A? It is an example of a square matrix without an inverse.
Example MWIAA. A matrix without an inverse, Archetype A.
We will show that is a matrix with no inverse, with a proof by contradiction. To this end, suppose that is invertible, and call its inverse the matrix Choose the vector of constants
and consider the system of equations We could now proceed exactly as we did in Example SABMI, and employ the matrix to determine a unique solution to this vector equation. Namely, the solution would be In other words, the system is consistent.
However, we will now show the system has no solutions. In other words, this system is inconsistent. Form the augmented matrix and row-reduce to
which allows us to recognize the inconsistency by Theorem RCLS.
So the assumption of ’s inverse leads to a logical inconsistency as the system cannot be both consistent and inconsistent. So our assumption of an inverse is false, and is a matrix with no inverse (provably). So we say is not invertible.
It is possible this example is less than satisfying. Just where did that particular choice of the vector come from anyway? Stay tuned for an application of the future Theorem CSCS in Example CSAA.
Let us look at one more matrix inverse before we embark on a more systematic study.
Example MI. Matrix inverse.
We will now concern ourselves less with whether or not an inverse of a matrix exists, but instead with how you can find one when it does exist. In Section MINM we will have some theorems that allow us to more quickly and easily determine just when a matrix is invertible.
Subsection CIM Computing the Inverse of a Matrix
We have just seen inverses of matrices in Example SABMI and Example MI, but these inverse matrices have just dropped from the sky. How would we compute an inverse? And just when is a matrix invertible, and when is it not? Writing a putative inverse with unknowns and solving the resulting equations is one approach. Applying this approach to matrices can get us somewhere, so just for fun, let us do it.
Theorem TTMI. Two-by-Two Matrix Inverse.
Proof.
(⇐)
Assume that We will use the definition of the inverse of a matrix to establish that has an inverse (Definition MI). Note that if then the displayed formula for is legitimate since we are not dividing by zero). Using this proposed formula for the inverse of we simply compute
and
By Definition MI this is sufficient to establish that is invertible, and that the expression for is correct.
(⇒)
Assume that is invertible, and proceed with a proof by contradiction (Proof Technique CD), by assuming also that This translates to Let
be a putative inverse of
Working on the matrices on the two ends of this equation, we will multiply the top row by and the bottom row by
We are assuming that so we can replace two occurrences of by in the bottom row of the right matrix.
The matrix on the right now has two rows that are identical, and therefore the same must be true of the matrix on the left. Identical rows for the matrix on the left implies that and
So and thus are all nonzero. But then and (the “other corners”) must also be nonzero, so this is (finally) a contradiction. So our assumption was false and we see that whenever has an inverse.
There are several ways one could try to prove this theorem, but there is a continual temptation to divide by one of the eight entries involved ( through ), but we can never be sure if these numbers are zero or not. This could lead to an analysis by cases, which is messy, messy, messy. Note how the above proof never divides, but always multiplies, and how zero/nonzero considerations are handled. Pay attention to the expression as we will see it again in a while (Chapter D).
This theorem is cute, and it is nice to have a formula for the inverse, and a condition that tells us when we can use it. However, this approach becomes impractical for larger matrices, even though it is possible to demonstrate that, in theory, there is a general formula. (Think for a minute about extending this result to just matrices. For starters, we need 18 letters!) Instead, we will work column-by-column. Let us first work an example that will motivate the main theorem and remove some of the previous mystery.
Example CMI. Computing a matrix inverse.
For its inverse, we desire a matrix so that Emphasizing the structure of the columns and employing the definition of matrix multiplication (Definition MM), we have
Since the matrix is what we are trying to compute, we can view each column, as a column vector of unknowns in a linear system of equations. Then we have five systems of equations to solve, each with 5 equations in 5 variables. Notice that all 5 of these systems have the same coefficient matrix. We will now solve each system in turn.
Row-reduce the augmented matrix of the linear system
Row-reduce the augmented matrix of the linear system
Row-reduce the augmented matrix of the linear system
Row-reduce the augmented matrix of the linear system
Row-reduce the augmented matrix of the linear system
We can now collect our 5 solution vectors into the matrix
Notice how the five systems of equations in the preceding example were all solved by exactly the same sequence of row operations. Would it not be nice to avoid this obvious duplication of effort? Our main theorem for this section follows, and it mimics this previous example, while also avoiding all the overhead.
Theorem CINM. Computing the Inverse of a Nonsingular Matrix.
Suppose is a nonsingular square matrix of size Create the matrix by placing the identity matrix to the right of the matrix Let be a matrix that is row-equivalent to and in reduced row-echelon form. Finally, let be the matrix formed from the final columns of Then
Proof.
If we consider the systems of linear equations, we see that the aforementioned sequence of row operations will also bring the augmented matrix of each of these systems into reduced row-echelon form. Furthermore, the unique solution to appears in column of the row-reduced augmented matrix of the system and is identical to column of Let denote the columns of So we find,
as desired.
We have to be just a bit careful here about both what this theorem says and what it does not say. If is a nonsingular matrix, then we are guaranteed a matrix such that and the proof gives us a process for constructing However, the definition of the inverse of a matrix (Definition MI) requires that also. So at this juncture we must compute the matrix product in the “opposite” order before we claim as the inverse of However, we will soon see that this is always the case, in Theorem OSIS, so the title of this theorem is not inaccurate.
What if is singular? At this point we only know that Theorem CINM cannot be applied. The question of ’s inverse is still open. (But see Theorem NI in the next section.)
We will finish by computing the inverse for the coefficient matrix of Archetype B, the one we just pulled from a hat in Example SABMI. There are more examples in the Archetypes (Appendix A) to practice with, though notice that it is silly to ask for the inverse of a rectangular matrix (the sizes are not right) and not every square matrix has an inverse (remember Example MWIAA?).
Example CMIAB. Computing a matrix inverse, Archetype B.
Archetype B has a coefficient matrix given as
once we check that (the product in the opposite order is a consequence of the theorem).
Sage MISLE. Matrix Inverse, Systems of Equations.
We can use the computational method described in this section in hopes of finding a matrix inverse, as Theorem CINM gets us halfway there. We will continue with the matrix from Example MI. First we check that the matrix is nonsingular so we can apply the theorem, then we get “half” an inverse, and verify that it also behaves as a “full” inverse by meeting the full definition of a matrix inverse (Definition MI).
xxxxxxxxxx
A = matrix(QQ, [[ 1, 2, 1, 2, 1],
[-2, -3, 0, -5, -1],
[ 1, 1, 0, 2, 1],
[-2, -3, -1, -3, -2],
[-1, -3, -1, -3, 1]])
A.is_singular()
xxxxxxxxxx
I5 = identity_matrix(5)
M = A.augment(I5); M
xxxxxxxxxx
N = M.rref(); N
xxxxxxxxxx
J = N.matrix_from_columns(range(5,10)); J
xxxxxxxxxx
A*J == I5
xxxxxxxxxx
J*A == I5
Note that the matrix
J
is constructed by taking the last 5 columns of N
(numbered 5 through 9) and using them in the matrix_from_columns()
matrix method. What happens if you apply the procedure above to a singular matrix? That would be an instructive experiment to conduct.
With an inverse of a coefficient matrix in hand, we can easily solve systems of equations, in the style of Example SABMI. We will recycle the matrices
A
and its inverse, J
, from above, so be sure to run those compute cells first if you are playing along. We consider a system with A
as a coefficient matrix and solve a linear system twice, once the old way and once the new way. Recall that with a nonsingular coefficient matrix, the solution will be unique for any choice of const
, so you can experiment by changing the vector of constants and re-executing the code.
xxxxxxxxxx
const = vector(QQ, [3, -4, 2, 1, 1])
A.solve_right(const)
xxxxxxxxxx
J*const
xxxxxxxxxx
A.solve_right(const) == J*const
Subsection PMI Properties of Matrix Inverses
The inverse of a matrix enjoys some nice properties. We collect a few here. First, a matrix can have but one inverse.
Theorem MIU. Matrix Inverse is Unique.
Proof.
As described in Proof Technique U, we will assume that has two inverses. The hypothesis tells there is at least one. Suppose then that and are both inverses for so we know by Definition MI that and Then we have
So we conclude that and are the same, and cannot be different. So any matrix that acts like an inverse, must be the inverse.
When most of us dress in the morning, we put on our socks first, followed by our shoes. In the evening we must then first remove our shoes, followed by our socks. Try to connect the conclusion of the following theorem with this everyday example.
Theorem SS. Socks and Shoes.
Proof.
At the risk of carrying our everyday analogies too far, the proof of this theorem is quite easy when we compare it to the workings of a dating service. We have a statement about the inverse of the matrix which for all we know right now might not even exist. Suppose was to sign up for a dating service with two requirements for a compatible date. Upon multiplication on the left, and on the right, the result should be the identity matrix. In other words, ’s ideal date would be its inverse.
Now along comes the matrix (which we know exists because our hypothesis says both and are invertible and we can form the product of these two matrices), also looking for a date. Let us see if is a good match for First they meet at a noncommittal neutral location, say a coffee shop, for quiet conversation,
The first date having gone smoothly, a second, more serious, date is arranged, say dinner and a show,
So the matrix has met all of the requirements to be ’s inverse (date) and with the ensuing marriage proposal we can announce that
Theorem MIMI. Matrix Inverse of a Matrix Inverse.
Proof.
As with the proof of Theorem SS, we examine if is a suitable inverse for (by definition, the opposite is true).
and
The matrix has met all the requirements to be the inverse of and so is invertible and we can write
Theorem MIT. Matrix Inverse of a Transpose.
Proof.
and
The matrix has met all the requirements to be the inverse of and so is invertible and we can write
Theorem MISM. Matrix Inverse of a Scalar Multiple.
Proof.
Notice that there are some likely theorems that are missing here. For example, it would be tempting to think that but this is false. Can you find a counterexample? (See Exercise MISLE.T10.)
Reading Questions MISLE Reading Questions
1. Calculate inverse of a matrix.
2. Calculate inverse of a matrix.
3. Title of Theorem SS.
Explain why Theorem SS has the title it does. (Do not just state the theorem, explain the choice of the title making reference to the theorem itself.)
Exercises MISLE Exercises
C16.
C17.
If it exists, find the inverse of and check your answer.
Solution.
The procedure we have for finding a matrix inverse fails for this matrix since does not row-reduce to We suspect in this case that is not invertible, although we do not yet know that concretely. (Stay tuned for upcoming revelations in Section MINM!)
C18.
If it exists, find the inverse of and check your answer.
C19.
If it exists, find the inverse of and check your answer.
C21.
Solution.
C22.
Employ the matrix to solve the two linear systems and
Solution.
Represent each of the two systems by a vector equality, and Then in the spirit of Example SABMI, solutions are given by
Notice how we could solve many more systems having as the coefficient matrix, and how each such system has a unique solution. You might check your work by substituting the solutions back into the systems of equations, or forming the linear combinations of the columns of suggested by Theorem SLSLC.
C23.
C24.
C25.
C26.
Let
Compute the inverse of by forming the matrix and row-reducing (Theorem CINM). Then use a calculator to compute directly.
C27.
Let
Compute the inverse of by forming the matrix and row-reducing (Theorem CINM). Then use a calculator to compute directly.
Solution.
The matrix has no inverse, though we do not yet have a theorem that allows us to reach this conclusion. However, when row-reducing the matrix the first 5 columns will not row-reduce to the identity matrix, so we are at a loss on how we might compute the inverse. When requesting that your calculator compute it should give some indication that does not have an inverse.
C28.
Let
Compute the inverse of by forming the matrix and row-reducing (Theorem CINM). Then use a calculator to compute directly.
Solution.
Employ Theorem CINM,
And therefore we see that is nonsingular ( row-reduces to the identity matrix, Theorem NMRRI) and by Theorem CINM,
C40.
Find all solutions to the system of equations below, making use of the matrix inverse found in Exercise MISLE.C28.
Solution.
View this system as where is the matrix from Exercise MISLE.C28 and Since was seen to be nonsingular in Exercise MISLE.C28 Theorem SNCM says the solution, which is unique by Theorem NMUS, is given by
Notice that this solution can be easily checked in the original system of equations.
C41.
Solution.
The coefficient matrix of this system of equations is
and the vector of constants is So by Theorem SLEMM we can convert the system to the form Row-reducing this matrix yields the identity matrix so by Theorem NMRRI we know is nonsingular. This allows us to apply Theorem SNCM to find the unique solution as
Remember, you can check this solution easily by evaluating the matrix-vector product (Definition MVP).
C42.
Solution.
We can reformulate the linear system as a vector equality with a matrix-vector product via Theorem SLEMM. The system is then represented by where
According to Theorem SNCM, if is nonsingular then the (unique) solution will be given by We attempt the computation of through Theorem CINM, or with our favorite computational device and obtain,
So by Theorem NI, we know is nonsingular, and so the unique solution is
T10.
Solution.
For a large collection of small examples, let be any matrix that has an inverse (Theorem TTMI can help you construct such a matrix, is a simple choice). Set and While and both exist, what is
For a large collection of examples of any size, consider Can the proposed statement be salvaged to become a theorem?
You have attempted 1 of 4 activities on this page.