In this explainer, we will learn how to find the inverse of matrices using the adjoint method.
When working with a square matrix , we are often interested in finding the multiplicative inverse, , if it exists at all. A typical method used to achieve this is to use row operations to find the reduced echelon form of the matrix when written together with the relevant identity matrix in a particular way. This method has the advantage of being simple to understand once the technique of Gauss-Jordan elimination has been well understood. The disadvantage of this method is that it can often be difficult to complete the calculations without introducing fractions, and it can also be very easy to make mistakes as a natural part of the calculations.
It is usually interesting in mathematics to understand what alternative methods are available for solving a problem. In this sense, linear algebra is an excellent playground for understanding deep theorems and results in multiple ways. For this explainer, we will show how the inverse of a matrix can be calculated using the adjoint matrix method. Many people consider the adjoint matrix method to be simpler than the Gauss-Jordan method. Although the adjoint matrix method is principally quite an easy process for calculating the inverse of a square matrix, it requires several concepts to be revised and understood before it can be completed.
Definition: Matrix Minors
Consider a matrix with order . Then, the matrix โminorโ is the initial matrix after having removed the row and the column. This means that is a matrix with order .
We will demonstrate this concept by defining the matrix
Suppose then that we wanted to create the matrix minor , which would involve removing the second row and the third column of . We highlight these entries as shown: and then we give the resulting matrix minor
If we now wanted to create the matrix minor , then we would be removing the third row and the first column: which would give the matrix minor
For most of the remainder of this explainer, we will focus on calculating the multiplicative inverse of matrices which, as we will see, will require us to understand the determinant of a general matrix.
Definition: Determinant of a 2 ร 2 Matrix
For a matrix the โdeterminantโ of is denoted and is given by the formula
We can demonstrate this definition with a simple example. Take the matrix
The determinant can be calculated, using the formula in the definition above, as
With this understanding, we are now ready to define the central idea that will be used repeatedly throughout the rest of this explainer. Although we will choose to focus on matrices with order , the concepts that we are about to describe can be extended to square matrices of any dimension. For the final exercise in this explainer, we will give one example of the method being applied to a matrix and discuss the relative advantages of the adjoint matrix method in this situation.
Definition: Cofactor Matrix
Consider a square matrix with order and with matrix minors denoted as . Then, the cofactor matrix is generated by the determinants of all of the matrix minors of in the following way:
In other words, the entries of are generated by the formula
We will demonstrate how to calculate the cofactor matrix using the matrix
The first step is calculating all of the matrix minors of the matrix . This is not the most exciting activity, although it is, at least, a fairly simple one. We find that
The definition of the cofactor matrix above has a parity term in front of each entry, which we must remember to incorporate. Bearing this in mind, using the formula for the determinant of a matrix gives
The cofactor matrix is then formed by writing all of the outputted numbers into a matrix in exactly the format shown:
At this stage, it is probably not at all apparent as to why we have constructed the cofactor matrix of the matrix . The explanation for this is revealed in the definition and theorem below, which links the cofactor matrix to the inverse of a matrix via the adjoint matrix.
Definition: Adjoint Matrix
The โadjointโ matrix is the transpose of the cofactor matrix . In other words, .
Theorem: Inverse of a Square Matrix Using the Adjoint Matrix Method
For a square matrix where the inverse exists, we have where represents the determinant of .
Note how is only well defined so long as , which we could not allow as this would entail trying to divide by zero. Before attempting to calculate the inverse of a square matrix using the adjoint matrix method, we will need to first calculate the determinant. If the determinant is zero, then the matrix inverse will not exist and therefore we will not be able to use the adjoint matrix method (nor any method) to find it.
It is well known that for a matrix the inverse can be written as
We can use this result to check that the adjoint matrix method will produce the correct inverse of a general matrix. The matrix minors of a matrix will be matrices with order , which are more commonly referred to as โnumbers.โ Nonetheless, we write these in matrix notation as
Although technically correct, it is slightly unnecessary to write the determinants of these matrix minors, since taking the determinant of a matrix will just return the only number in that matrix. For the sake of consistency, we write these numbers in terms of determinants. Including the parity term gives
The cofactor matrix is also a matrix and is populated by the entries above, in order. The cofactor matrix is
To find the adjoint matrix of , we must take the transpose of the cofactor matrix. We find that
We know that, for the matrix , the formula for the determinant is that . Combining this with the theorem above, which relates the inverse matrix of to the determinant and adjoint matrix of , we have
This agrees perfectly with the known formula for the inverse of a matrix, which is an encouraging sign that the method works as we described. In the following example, we demonstrate how the adjoint matrix can be used to find the inverse of a matrix, providing an alternative to the Gauss-Jordan method.
Example 1: Finding the Inverse of a 3 ร 3 Matrix
Consider the matrix
Determine whether the matrix has an inverse by finding whether the determinant is nonzero. If the determinant is nonzero, find the inverse using the formula for the inverse which involves the cofactor matrix.
Answer
We first label the above matrix as and then calculate the determinant using Sarrusโ rule. We find that
The determinant is nonzero and hence the matrix is invertible. We may, therefore, continue to calculate using the adjoint matrix method. We begin by first calculating all of the matrix minors
These matrix minors are populated with many zero entries from the original matrix , which makes it easier to calculate their determinants. Using the formula for the determinant of a matrix and recalling that each determinant must be multiplied by the correct parity term, we find
The cofactor matrix is then created out of all of the 9 determinants that we calculated in the working above. This gives
We then take the transpose of the cofactor matrix to get the adjoint matrix
Now we have every component needed to calculate the inverse matrix by virtue of the following result:
It should be checked that and are indeed inverses of each other by showing that or that , where is the identity matrix.
Ordinarily, when calculating the inverse of a square matrix using the Gauss-Jordan method, there is a risk of fractions being introduced when the determinant is not equal to . As we have seen with the adjoint matrix method, it is possible to calculate the inverse of a matrix; we only have to include a fractional term at the very end. It is a matter of personal preference as to which method is used to calculate the inverse of a square matrix, although many people prefer the adjoint matrix method for precisely this reason. We will give two more examples of using this method to calculate the inverse of a matrix, and then we will apply the same method to a matrix.
Example 2: Finding the Inverse of a 3 ร 3 Matrix
Determine whether the matrix has an inverse by finding whether the determinant is nonzero. If the determinant is nonzero, find the inverse using the inverse formula involving the cofactor matrix.
Answer
The matrix above is assigned to the variable , whose determinant we calculate using Sarrusโ rule. This gives
Given that , the inverse of does exist and can be calculated by first finding all of the matrix minors of , as shown:
The cofactor matrix is populated by the determinants of these matrix minors, with a parity term included as shown below. Using this and the formula for the determinant of a matrix gives
The cofactor matrix is then created by transcribing these elements, in the same order, into a new matrix which is transposed to give the adjoint matrix of :
Now, the inverse of can be written simply in terms of the determinant of and the adjoint matrix of . This gives
As ever, it should be checked that the given matrix inverse is correct. Namely, it should be the case that and , where is the identity matrix.
Example 3: Finding the Inverse of a Matrix
Find, if it exists, the inverse of the matrix
Answer
The adjoint method for creating a matrix involves finding all of the matrix minors of and then using their determinants to create the cofactor matrix, from which we find the adjoint matrix. However, there would be little point in completing all of these calculations if the matrix was itself invertible. We must therefore check that this is the case by inspecting the determinant of , which we calculate by Sarrusโ rule as follows:
Since the determinant is nonzero, the matrix is invertible and we can proceed to the construction of by the adjoint matrix method. We first produce all of the matrix minors
Remembering to include the parity term, we then take the determinants of all of these matrix minors:
The cofactor matrix is then created by writing each of the above determinant values in order, into a new matrix
The adjoint matrix is defined as the transpose of the cofactor matrix, meaning that . By taking the transpose of , we find
Finally, we are now able to calculate by expressing this in terms of and as follows:
By reviewing the two examples above, we can make some reasonable assumptions about what we might expect if we were to try and use the adjoint matrix method to calculate the inverse of a matrix or any square matrix with an order larger than . We can assume that the overall method will change very little but that the number of calculations involved will be much larger. For example, for a , matrix we will need to calculate the determinants for 16 matrix minors of order , which is not exactly an attractive task. Nonetheless, it is certainly possible to do this and it is the type of calculation that computer algebra would complete very quickly, even for square matrices with a very large order.
Example 4: Using the Adjoint Matrix to Find the Inverse of a 4 ร 4 Matrix
Use the adjoint matrix method to find the inverse of the matrix
Answer
To check that it is actually possible to calculate the inverse of , we will first calculate the determinant. To do this, we will expand along the top row using the relevant matrix minors. This gives
The determinants of these matrix minors can be calculated using Sarrusโ rule or any other preferred method. This will give
Given that , we know that the inverse of must exist, meaning that we can proceed with the adjoint matrix method for calculating . We initially provide all of the matrix minors of :
Before creating the cofactor matrix, we will need to calculate the determinant of all of the matrix minors while making sure that we always include the correct parity term:
At this point, we should definitely note how painful this exercise would have been if we had invested all of the time in calculating the above determinants only to find out that the inverse does not exist. This is a stark reminder as to why calculating the determinant of should always be completed before any other steps are taken, as otherwise there might be an awful lot of wasted effort! Given that we know that exists and that we have all of the calculated determinants above, we populate the cofactor matrix with these entries:
The transpose of this matrix is taken to give the adjoint matrix:
The inverse can then finally be calculated using the formula
Depending on the order of the square matrix and the entries involved, there is normally a โbetterโ choice as to which method is most suitable for calculating the inverse of a matrix. The adjoint matrix method that we have shown can be most useful in situations where the determinant is large, meaning that fractional terms with large denominators will probably be introduced early on if we were to instead use the Gauss-Jordan method. It helps to have a strong understanding of both the Gauss-Jordan method and the adjoint matrix method and to be able to decide which method is likely to be the most appropriate for calculating the inverse of a matrix. Many mathematics students prefer the adjoint matrix method, especially for matrices, although there is no real flexibility in terms of which steps are needed for this approach. In contrast, the Gauss-Jordan method allows us to make choices about which row operations are used to find the matrix inverse, often allowing the steps to be selected to make the calculations simpler.
Key Points
- For any matrix of order , the matrix minor is identical to after having removed the row and column, meaning that has order .
- For a square matrix of order , the cofactor matrix is also a square matrix of order . The entries of this matrix are generated by the determinants of the matrix minors of , where .
- The adjoint matrix is the transpose of the cofactor matrix. In other words, .
- If , then the inverse of can be written as .
- It is essential to check that before beginning to construct the cofactor matrix, as the inverse will not exist if .