Lesson Explainer: Inverse of a Matrix: Row Operations | Nagwa Lesson Explainer: Inverse of a Matrix: Row Operations | Nagwa

Lesson Explainer: Inverse of a Matrix: Row Operations Mathematics

In this explainer, we will learn how to use elementary row operations to find the inverse of a matrix, if possible.

In linear algebra, one of the most persistently useful and versatile concepts is that of the (multiplicative) inverse of a square matrix. Being similar to the concept of division in conventional algebra, the inverse of a matrix in some senses provides a complete algebraic structure to linear algebra. Irrespective of the specific use that we might have in mind, it is often very helpful to know the inverse of a matrix, especially when understood in tandem with the algebraic properties of a matrix inverse.

In conventional algebra, if we were to multiply a number 𝑎 by the reciprocal 𝑎, then we would find 𝑎𝑎=1=𝑎𝑎, providing that 𝑎0. We can think of the reciprocal 𝑎 as the “inverse” of 𝑎 and we should reasonably expect that the inverse of a matrix would obey similar properties. This is actually a very accurate assumption, as the inverse of a matrix follows nearly identical algebraic properties to the analogous operation in conventional algebra. There are several caveats to this statement. Firstly, the matrix inverse only exists for square matrices. Secondly, just as we cannot take the inverse 𝑎 when 𝑎=0, there is a similar condition for the calculation of a matrix inverse 𝐴. Specifically, it is not possible to find 𝐴 for a matrix if it has a determinant of value zero, which means that the matrix is “singular.” With these two restrictions in mind, we now formally define the matrix inverse.

Definition: The Inverse of a Square Matrix

For a square matrix 𝐴 of order 𝑛×𝑛, the “multiplicative inverse” (if it exists) is a square matrix 𝐴 such that 𝐴𝐴=𝐼=𝐴𝐴, where 𝐼 is the 𝑛×𝑛 identity matrix.

Necessarily, the matrix 𝐴 would also be a square matrix of order 𝑛×𝑛. The existence of an inverse matrix is certainly not guaranteed, only existing if the matrix in question is nonsingular. There are several methods for finding whether a matrix is singular or nonsingular, either by use of the determinant or alternatively by suitable row operations to calculate the rank of the matrix. In this explainer, we will demonstrate how the question can be answered as an inherent part of the method for calculating the inverse of a matrix, known as Gauss–Jordan elimination. It is also possible to use the adjoint matrix method to calculate the inverse and this will be covered in other explainers.

Before moving on to 3×3 matrices, we will first demonstrate the concept for 2×2 matrices. Suppose that we had the matrix 𝐴=1322 and that we were told that the inverse matrix 𝐴 exists and has the form 𝐴=12341214.

Then, by the definition above, we could check that this is true by calculating 𝐴𝐴=132212341214=1001=𝐼.

Since the result is the 2×2 identity matrix, we have confirmed that 𝐴 is the multiplicative inverse of 𝐴. Equally, we could confirm that 𝐴𝐴=𝐼. There is a well-known method for calculating the inverse of a 2×2 matrix that is easy to remember and make use of. However, often this method is produced without an understanding of how it is derived and it does not generalize in any simple way to inverses of square matrices which have a larger order. In contrast, there is a well-known method for calculating the inverse of a square matrix having any order, simply by using elementary row operations. We will provide one example of this method for the 2×2 matrix that is given above, for which the inverse is known. After this demonstration, we will apply the same method to matrices having order 3×3, bearing in mind how the technique will generalize to matrices with even larger orders.

Theorem: Calculating the Multiplicative Inverse of a Square Matrix

Suppose that the matrix 𝐴 has order 𝑛×𝑛 and that an inverse 𝐴 does exist. Then, this inverse can be calculated by creating the joined matrix 𝐴𝐼 and using elementary row operations to manipulate this larger matrix into the form 𝐼𝐴, where 𝐼 is the 𝑛×𝑛 identity matrix.

As we will see later, if the matrix 𝐴 is not invertible, then it will not be possible to complete these calculations. To describe the above method, we will now reconsider the matrix 𝐴=1322.

Following the method above, we use the identity matrix 𝐼=1001 and then write this next to the original matrix to give 𝐴𝐼=13102201.

We have included a separating line between the two matrices so that we can avoid confusion when trying to identify which entries should be removed next. It is generally useful to highlight the first nonzero elements in each row, which are known as the “pivots”: 13102201.

We then complete the process of Gauss–Jordan elimination and reduce the matrix to the desired form. The process that we are about to complete is equivalent to finding the reduced echelon form of the matrix above.

We already have a 1 in the top-left entry and we should try to leave this entry unchanged if possible, as the 2×2 identity matrix 𝐼 has a 1 in the top-lefty entry, as well as every diagonal entry. We consequently aim to remove the 2 pivot entry in the second row. This can be achieved with the elementary row operation 𝑟𝑟+2𝑟, which gives the matrix 13100421.

We now have a zero entry in the bottom-left, meaning that the first column is equal to that of the 2×2 identity matrix. We can move further towards the desired form by focusing on the pivot entry in the second row. To make the left-hand side most similar to that of the 2×2 identity matrix, we should make this entry equal to 1. We can scale the whole second row by a constant using the row operation 𝑟14𝑟, giving 1310011214.

The left-hand side is now identical to the 2×2 identity matrix except for the second entry of the first row. In order to make this entry equal to zero, we use the row operation 𝑟𝑟+3𝑟: 101234011214.

Now the left-hand side is equal to 𝐼 and we have reached the expression 𝐼𝐴=101234011214.

We have therefore found that 𝐴=12341214, which is identical to the form given above. We have already checked that this is indeed the correct inverse for 𝐴, so there is no need to do so now, although generally it is wise to check that the inverse is correct, especially for matrices of a higher order.

We will now apply the technique above to a 3×3 matrix. Rather than start with matrices that are populated with many nonzero entries, we will begin with matrices for which the inverse is less vexing to calculate. We should also bear in mind that it may not be possible to calculate the inverse of a matrix, meaning that at some point the above method would not be possible to use. In plainer terms, if we are not able to obtain the relevant identity matrix on the left side of the joined matrix, then the given matrix will not have an inverse.

Example 1: Finding the Inverse of a 3 × 3 Matrix

Find the multiplicative inverse of the following matrix: 1470010001.

Answer

Labeling the above matrix as 𝐴, we can see already that it is similar to the identity matrix 𝐼: 𝐴=1470010001,𝐼=100010001.

This indicates that there should be comparatively little effort required to maneuver the matrix 𝐴𝐼 into the form 𝐼𝐴 , if it is possible at all. We create the joined matrix 𝐴𝐼=1470100010010001001.

The pivot entries have all been highlighted, reiterating the similarity of the left-hand side to the 3×3 identity matrix: 1470100010010001001.

We only need to remove the entry in the first row and second column, which is completed by the row operation 𝑟𝑟47𝑟: 1001470010010001001.

We have already obtained the 3×3 identity matrix on the left-hand side, which means that the expression on the right-hand side is the inverse matrix 𝐴=1470010001.

Although it is unlikely in the above example, it is always possible that we made an error of calculation when finding the inverse of a matrix. To confirm that we have the correct result for 𝐴, we would need to check that 𝐴𝐴=14700100011470010001=100010001=𝐼.

Example 2: Finding the Inverse of a 3 × 3 Matrix

Find the multiplicative inverse of the following matrix: 100710801.

Answer

If the above matrix is denoted 𝐴, then we have 𝐴=100710801,𝐼=100010001 and it is clear that the two matrices are fairly similar. We write the joined matrix 𝐴𝐼=100100710010801001.

We highlight the pivot entries of each row. We should leave the top-left entry unchanged, as this entry is shared with the 3×3 identity matrix: 100100710010801001.

The pivot entries in the second and third rows need to be made into zeros by using elementary row operations. We can change the pivot entry in the second row by using the first row with the operation 𝑟𝑟7𝑟. This gives the resultant matrix 100100010710801001, which is more similar to the 3×3 identity matrix. The pivot entry in the third row should be changed with the row operation 𝑟𝑟8𝑟, leaving 100100010710001801.

We have successfully obtained the correct form on the left-hand side of the matrix, meaning that the right-hand side is in fact the identity matrix 𝐴=100710801.

It is poor form to finish such a question without checking that 𝐴 is the correct multiplicative inverse of 𝐴. Although it is unlikely that we made a mistake in the above question due to the simplicity of 𝐴, we recommend that this be completed as a matter of routine. For more complicated matrices (such as those in the questions below), it would be depressingly easy to make an arithmetic error which proliferates through the resulting calculations, producing a matrix which is most definitely not the multiplicative inverse.

Example 3: Finding the Inverse of a Matrix with Elementary Row Operations

Using elementary row operations, find 𝐴 for the matrix 𝐴=5012311103.

Answer

We begin by joining together the matrix 𝐴 with the 3×3 identity matrix 𝐼=100010001.

We join together these two matrices as 𝐴𝐼=5012100311010103001, with the aim of using elementary row operations to transform this matrix into the form 𝐼𝐴. To this end, we highlight the pivot entries as shown: 5012100311010103001.

It will be convenient to swap rows 1 and 3 so that there is a 1 in the top-left entry. We use the row operation 𝑟𝑟 to give 1030013110105012100.

The pivot in the second row can be turned into a zero entry by use of the row operation 𝑟𝑟3𝑟, giving 10300101100135012100.

A similar row operation can be applied to the pivot in the third row. The row operation 𝑟𝑟+5𝑟 thus obtains a leftmost column which is identical to that of the 3×3 identity matrix: 1030010110013003105.

At this point, we choose to change the new pivot in the third row, so that it is equal to 1. We use the row operation 𝑟13𝑟 to find 103001011001300113053.

To obtain the identity matrix on the left side, we need to remove the two nonzero entries which are above the pivot in the third row. The row operations 𝑟𝑟+10𝑟 and 𝑟𝑟3𝑟 give 100104010103141300113053.

We have obtained precisely the form that we were looking for, which means that the right side of the joined matrix is the inverse 𝐴=104103141313053.

It can be confirmed that this is the correct identity matrix by showing that 𝐴𝐴=𝐼 or that 𝐴𝐴=𝐼.

So far, every square matrix that we have seen has been invertible, meaning that we were able to use elementary row operations to transform the matrix 𝐴𝐼 into the matrix 𝐼𝐴. We repeatedly specified that this is not always possible, although we gave no indication as to how we might recognize or even predict this property when calculating the inverse of a matrix. To this end, we give the following theorem that will specify the conditions that will allow us to determine whether we can complete the Gauss–Jordan process to find the matrix inverse.

Theorem: Pivot Entries and the Matrix Inverse

Consider a square matrix 𝐴 with order 𝑛×𝑛 and the joined matrix 𝐴𝐼, where 𝐼 is the 𝑛×𝑛 identity matrix. If it is possible to perform elementary row operations on 𝐴𝐼 such that a pivot entry appears in the right-hand side, then the matrix 𝐴 cannot be inverted.

Example 4: Using Elementary Row Operations to Find the Inverse of a Matrix

Using elementary row operations, find 𝐴 for the matrix 𝐴=303112330.

Answer

We begin with the two matrices 𝐴=303112330,𝐼=100010001.

The two matrices are not overtly similar and therefore we expect that we will have to complete several row operations at least to find the inverse (if it exists). We create the joined matrix 𝐴𝐼=303100112010330001.

We highlight the pivot entries, which are the first nonzero elements in each row: 303100112010330001.

Given that we hope to use row operations to obtain the form 𝐼𝐴, it will be useful if we can immediately adjust the matrix to better resemble the identity matrix 𝐼 on the left-hand side. If we were to swap row 1 with row 2, then we would have a 1 in the top-left entry, which is also true of the 3×3 identity matrix 𝐼. We should then perform the row operation 𝑟𝑟, giving 112010303100330001.

The pivot entry in the second row is nonzero, which is a situation that we should change. A simple row operation to achieve this uses the first row: 𝑟𝑟3𝑟, which returns the matrix 112010033130330001.

Now we focus on the pivot entry in the third row, which is also nonzero. This can be rectified with the row operation 𝑟𝑟+3𝑟. The resulting matrix then has a first column that is identical to that of the 3×3 identity matrix: 112010033130066031.

The nonzero pivot entry of the third row is now in the second entry. We can make this entry zero by completing 𝑟𝑟+2𝑟. This gives the matrix 112010033130000231.

We are now in the situation where the pivot entry of one of the rows is on the right side of the matrix. This means that the matrix 𝐴 is not invertible. In other words, there is no matrix 𝐴 such that 𝐴𝐴=𝐼=𝐴𝐴.

No matter what further row operations we tried in the above question, we would never have been able to achieve the form 𝐼𝐴 from the joined matrix. There was little way of knowing this prior to beginning the Gauss–Jordan elimination process, unless we had happened to notice that the third row could be constructed from the first and second rows using the row operations given. Usually this will be hard to notice, so there is no disadvantage to starting the Gauss–Jordan method, even if we eventually find that it is not possible to calculate the inverse.

We will now move towards the calculation of the inverse for a 4×4 matrix. As we will see, there is little difference from the method that we applied to the previous problems. Although it is likely that there will be a greater number of row operations (and hence a greater chance of making an error), the method is no more difficult in principle.

Example 5: Finding the Inverse of a 4 × 4 Matrix

Find 𝐴, given that 𝐴=1202112021321212.

Answer

We begin by taking the 4×4 identity matrix 𝐼=1000010000100001 and then we join this with 𝐴 to give 𝐴𝐼=12021000112001002132001012120001. and then we join this with 𝐴 to give 𝐴𝐼=12021000112001002132001012120001.

We will use row operations to manipulate this matrix into the form 𝐼𝐴, if this is possible. The pivots are first highlighted: 12021000112001002132001012120001.

To begin moving towards the desired form, we must eliminate all pivot entries that appear below the pivot in the first row. This can be achieved by applying the row operations 𝑟𝑟𝑟, 𝑟𝑟2𝑟, and 𝑟𝑟𝑟, giving 12021000012211000332201000101001.

The pivot in the third row can also be turned into a zero entry, using the row operation 𝑟𝑟3𝑟 to give 12021000012211000094131000101001.

To delay introducing fractions into our calculations, we scale the fourth row with the row operation 𝑟9𝑟: 12021000012211000094131000909009.

Now it is simple to remove the pivot entry in the fourth row with the row operation 𝑟𝑟+𝑟, leaving 12021000012211000094131000048319.

Our focus must now be on removing all nonzero entries that appear above the pivot in the fourth row. This can be achieved in many ways, but we will choose to first scale the fourth row as 𝑟12𝑟: 12021000012211000094131000024321292.

Now all of the entries above the pivot in the fourth row can be removed with the row operations 𝑟𝑟2𝑟, 𝑟𝑟+𝑟, and 𝑟𝑟𝑟. The result is 12005321292012051212920090900900024321292.

Since we now have many entries which are fractions, we might as well rescale the second, third, and fourth rows so that the pivot entries are all equal to 1. We use the row operations 𝑟𝑟, 𝑟19𝑟, and 𝑟12𝑟 to give 12005321292012051212920010100100012341494.

We have nearly completed the process and now only need the row operation 𝑟𝑟+2𝑟: 12005321292010031212520010100100012341494, followed by the row operation 𝑟𝑟2𝑟: 10001121212010031212520010100100012341494,

As the left side is now equal to the 4×4 identity matrix, the matrix on the right side is therefore the inverse matrix 𝐴=1121212312125210012341494.

Key Points

  • For a square matrix 𝐴 of order 𝑛×𝑛, the inverse matrix 𝐴 is also of order 𝑛×𝑛 and has the property 𝐴𝐴=𝐼=𝐴𝐴, where 𝐼 is the 𝑛×𝑛 identity matrix.
  • We find the inverse of 𝐴 (if it exists) by taking the joined matrix 𝐴𝐼 and using elementary row operations to move this into the form 𝐼𝐴.
  • When performing this process, if a pivot entry appears in the right half of the matrix, then the inverse does not exist.

Download the Nagwa Classes App

Attend sessions, chat with your teacher and class, and access class-specific questions. Download the Nagwa Classes app today!

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy