How to Find the Inverse of a Matrix
Finding the Inverse of a 2x2 MatrixFinding the Inverse of a Matrix Larger than 2x2
Edited by Zareen, Hailey Girges
Matrix algebra is the foundation of modern computer graphics and engineering. In the same way that ordinary algebra deals with real numbers, matrix algebra provides tools and methods for manipulating matrix and vector equations. A matrix is an array of numbers, formatted in columns and rows. You can think of the inverse of a matrix (also called the “multiplicative inverse”) as similar to the reciprocal of a number.
Steps
Method 1 of 2: Finding the Inverse of a 2x2 Matrix
-
1Make sure your matrix is square. A matrix can have an inverse matrix only if its number of columns is equal to its number of rows. If your matrix is not square, there is no inverse.Ad
-
2Check whether your matrix is 2x2. If your matrix has 2 rows and 2 columns, you can find its inverse directly with this method. If your matrix has 3 or more rows and 3 or more columns, use Method 2.
-
3Know your formula. To find the multiplicative inverse of a 2x2 matrix, use the above formula.
-
4Calculate cofactors. Let arc be the element in the matrix at the rth row and the cth column. Its cofactor Arc will then be (-1)r+c det (arc), where det (arc) is the determinant of 2x2 matrix formed by skipping the rth row and the cth column, in which element arc lies. The determinant of a general 2x2 matrix looks like this:
-
5Find the determinant of the matrix. A determinant is a particular number that can be calculated from any square matrix. It is typically denoted with vertical bars, just like an absolute value. Add the cofactors of the elements in the first row of the matrix to find the determinant.
-
6Check whether the determinant is 0. If the determinant is 0, there is no inverse matrix.
-
7Find your inverse matrix. The inverse of a 2x2 matrix is simple, as you can see above: simply switch the positions of a and d, place negatives in front of b and c, and divide all by the determinant.
- To see how this works in a more complicated example, see Method 2.
Method 2 of 2: Finding the Inverse of a Matrix Larger than 2x2
-
1Make sure your matrix is square. A matrix can have an inverse matrix only if its number of columns is equal to its number of rows. If your matrix is not square, there is no inverse.
-
2Check whether your matrix is 2x2. If your matrix has 2 rows and 2 columns, you can find its inverse directly with the method above. If your matrix has 3 or more rows and 3 or more columns, use this method.
- For example, take this matrix:
This matrix, A, is square with 3 rows and 3 columns, so you should use this second method.
- For example, take this matrix:
-
3Calculate all the cofactors of your matrix. Let arc be the element in the matrix at the rth row and the cth column. Its cofactor Arc will then be (-1)r+c det (arc), where det (arc) is the determinant of a matrix formed by skipping the rth row and the cth column, in which element arc lies.
- In the example above, all the cofactors are:
A11 =5 , A12 =-1 ,A13 =-7 ,A21 =-1 ,A22 =-7 ,A23 =-5 ,A31 =-7 ,A32 =5 ,A33 =-1
- In the example above, all the cofactors are:
-
4Find the determinant of the matrix. A determinant is a particular number that can be calculated from any square matrix. It is typically denoted with vertical bars, just like an absolute value. Add all the cofactors of all the elements in the first row of the matrix to find the determinant.
- In the example above, you would calculate the determinant as follows:
A11 + A12 + A13 = 5-1-7=-3
- In the example above, you would calculate the determinant as follows:
-
5Check whether the determinant is 0. If the determinant is 0, there is no inverse matrix.
- In the example above, the determinant is not 0 (it’s 3), so you would continue.
-
6Construct the cofactor matrix. If the determinant is not 0, then construct a matrix with your cofactors.
- In the example above, your cofactor matrix would look like this:
- In the example above, your cofactor matrix would look like this:
-
7Transpose your rows and columns. Once you’ve made a cofactor matrix, you’ll want to exchange rows with columns and columns with rows to take a transpose of the cofactor matrix.
- In the example above, your transposed cofactor matrix would look like this:
- In the example above, your transposed cofactor matrix would look like this:
-
8Divide the transposed matrix by the determinant. After calculating your transposed matrix, divide each of its elements by the determinant. The resulting matrix will be the multiplicative inverse of your original matrix.
- In the example above, your inverse matrix will look like this:
Ad - In the example above, your inverse matrix will look like this:
Tips
- Remember that the inverse of a general 2x2 matrix only exists if ab – cd is not equal to 0.
- The validity of an inverse matrix can be verified by the relation between the matrix and its inverse AxA-1, where 1 is the identity matrix.
- A nxn identity matrix is one which has all the elements equal to 0 except the diagonal elements, which are equal to 1.
Article Info
Thanks to all authors for creating a page that has been read 12 times.