Home » Math Theory » Algebra » Inverse Matrix

Inverse Matrix

The inverse of a matrix

We have learned that the number 1 plays a special role in multiplication as any number multiplied by 1 results in the same number (1x=x). We also learned that the multiplicative inverse of a number, say x,  is a number that, when multiplied by x, will yield a product equal to 1. In linear algebra, a matrix, say matrix B, is said to be the inverse of another matrix, say matrix A, if when they are multiplied together, A⋅B or B⋅A, gives the identity matrix.

So, two matrices are inverses of each other if their product will result in an identity matrix. For a matrix A, its inverse is denoted by A-1, and AA-1 = I. 

The inverse of a matrix exists only if it is a square matrix, and its determinant is a nonzero value. A matrix with a nonzero value determinant is called a nonsingular matrix, and a matrix that has an inverse is called an invertible matrix.

What are the important terms in matrix inversion?

The terms listed below can help you understand the inverse of a matrix more clearly and easily.

  • Minor. The minor is a matrix defined by an entry in the matrix. It is obtained after deleting the row and column of the matrix in which a particular entry is positioned. We denote the minor of the entry aij as Mij. For example, given matrix A, the minor of a11 is the part of the matrix excluding the entries in the first row and the second column of the matrix.

A = [a11 a12 a13 a21 a22 a23 a31 a32 a33]

Below are some of the minor matrices of matrix A for all of its entries

M12= [a21 a23 a31 a33]

M22= [a11 a13 a31 a33]

M31= [a12 a13 a22 a23]

  • Cofactor. The cofactor of an entry is computed by multiplying the entry in minor with -1 raised to the power of the sum of the row and column entry in order representation of that element.

Cij=( -1 )i+j Mij

The matrix formed with the cofactors of the elements of the matrix is called the cofactor matrix.

  • Determinant. The determinant represents a matrix in a single unique value. It is computed with reference to any column or row of the given matrix. The determinant is the summation of the product of the entries and their cofactors of a particular column or row of the given matrix.
  • Singular Matrix. A singular matrix is a matrix with a determinant value of zero. The inverse of a singular matrix does not exist.
  • Nonsingular matrix. A nonsingular matrix is a matrix with a nonzero value determinant. The inverse of the nonsingular matrix exists and is called an invertible matrix.
  • Adjoint of a matrix. The adjoint of a matrix can be obtained by transposing the cofactor matrix of a given matrix.

How to find the inverse of 2 × 2 matrices?

Given the matrix  A = [a b c d], its inverse can be determined using the formula A-1=$\frac{1}{detdet A}$ [d -b -ca] where det A is determinant of matrix A.

Notice that entries a and d from matrix A are interchanged in the formula.  On the other hand, the position of entries b and c from matrix A remain the same, but their signs are reversed. Moreover, we need to take note that since det A is a number, then $\frac{1}{detdet A}$ is also a number that will serve as the scalar multiplier to [d -b -ca].

Let us recall how to find the determinant of a 2 × 2 matrix.

Let matrix A be  A = [a b c d] . Then the determinant can be obtained by detdet A =ad-bc

Example #1

Find the inverse of matrix A if it exists.

A = [35 -1 -2]

Solution

Step 1: Identify the elements to be used.

a = 3 , b=5, c= -1, d= -2

Step 2: Determine that determinant of matrix A. 

detdet A =ad – bc

detdet A =(3)(-2) – (5)(-1)

detdet A = – 6 + 5

detdet A = – 1

Step 3: Substitute the value of det A = – 1 and the elements into the formula.

A-1=$\frac{1}{detdet A}$ [d – b – c a]

A-1=$\frac{1}{- 1}$[- 2 -5 – (- 1) 3]

Step 4: Simplify the scalar multiplier and the elements in the matrix, if applicable.

A-1=-1 [- 2 -5 1 3]

Step 5: Perform scalar multiplication.

A-1=[2 5 – 1 – 3]

To check if our inverse matrix is correct, let us find AA-1 and A-1A and see if we will get the identity matrix as our product.

First, let us calculate AA-1

AA-1 = [3 5 -1 -2] × [2 5 – 1 – 3]

AA-1 = [(3)(2) + (5) (-1)(3)(5) + (5)(-3)(-1)(2) + (-2) (-1) (-1) (5) + (-2) (-3)]

AA-1 =[ 6 -5 15 – 15 – 2 + 2 – 5 + 6]

AA-1 = [1 0 0 1]

Now, let us determine A-1A

A-1A= [2 5 – 1 – 3] × [3 5 -1 -2]

A-1A= [(2) (3) + (5) (-1) (2) (5) + (5)(-2) (-1) (3) + (-3) (-1) (-1) (5) + (-3) (-2)]

A-1A= [6 -5 10-10 – 3 + 3 – 5 + 6]

A-1A= [1 0 0 1]  

Multiplying both ways generate the identity matrix, so the inverse matrix that we obtained is correct.

Example #2

Find the inverse of matrix A if it exists.

A = [4 6 2 3]

Solution 

Step 1: Identify the elements to be used.

a = 4 , b=6, c= -2, d= 3

Step 2: Determine that determinant of matrix A. 

detdet A =ad – bc

detdet A =(4)(3) – (6)(2)

detdet A = 12 – 12

detdet A = 0

Step 3: Since the det A = 0, then the inverse of Matrix A does not exist.

Example 2 shows that not all 2 × 2 matrices have an inverse. That is why it is crucial to determine the determinant of a matrix first. Notice that if det A = 0, the fraction in our formula will become undefined because 1 divided by zero is undefined.

What are the methods of finding the inverse of a matrix?

We can use two methods to find the inverse of matrices:  by using matrix row operations and by creating the adjugate matrix.

Creating the adjugate matrix

We can compute for the inverse of a matrix using the inverse of matrix formula by multiplying the adjoint of a matrix by the reciprocal of its determinant. The following are the steps in solving for the inverse of a matrix.

Step 1: Check the determinant of the matrix

Step 2: Transpose the original matrix

Step 3: Find the determinant of each of the 2 x 2 minor matrices

Step 4: Create the matrix of cofactors

Step 5: Multiply the reciprocal of the determinant on the adjugate matrix

Example

Find the inverse of C = [1 3 3 1 4 3 1 3 4]

Step 1: Determine the determinant of the matrix

detdet C =  1 (16 – 9) – 3 (4  -3) + 3 (3 – 4)

detdet C =  1 (7) –  3 (1)+3(- 1)

detdet C =  7 – 3 – 3

detdet C =  1

Knowing the determinant of the matrix must always be the first step because it will verify if the matrix that we are working on is invertible. If the determinant is 0, then we’re done solving because the matrix has no inverse.

Step 2: Transpose the original matrix

CT = [1 1 1 3 4 3 3 3 4] .

Step 3: Find the determinant of each of the 2 x 2 minor matrices

Every entry of the transposed matrix is associated with a corresponding 2×2 “minor” matrix. To help you determine the minor matrix for each entry, you may highlight the entire row and column of the entry you begin with. The highlighted column and row will include five entries of the matrix. The remaining four entries will be the entries of the minor matrix.

detdet [4 3 3 4] = 7   detdet [3 3 3 4] = 3   detdet [3 4 3 3] = – 3  

detdet [1 1 3 4] = 1   detdet [1 1 3 4] = 1   detdet [1 1 3 3] = 0  

detdet [11 4 3] = – 1   detdet [1 1 3 3] = 0   detdet [1 1 3 4] = 1

Step 4: Create the matrix of cofactors.

The determinants that we calculated from the minor matrices will be the entries of the new matrix of cofactors, just as shown below. 

[7 3 – 3 1 1 0 – 1 0 1] → [+ – + – + – + – +]

Then we must reverse the sign of alternating entries of the new matrix, following the sign pattern shown above

Adj (C) = [7 – 3 – 3 – 1 1 0 – 1 0 1]

Step 5: Multiply the reciprocal of the determinant on the adjugate matrix.

Doing this will give us the inverse of the original matrix.

C-1 =$\frac{1}{detdet C}$ [7 – 3 – 3 – 1 1 0 – 1 0 1]

C-1 =(1)[7 – 3 – 3 – 1 1 0 – 1 0 1]

C-1 =[7 – 3 – 3 – 1 1 0 – 1 0 1]

To check if C-1 = [7 – 3 – 3 – 1 1 0 – 1 0 1] is the inverse of C = [1 3 3 1 4 3 1 3 4] . Multiply the two matrices and see if the product will yield an identity matrix.

Using matrix row operations 

This method for inverting matrices is quite clever. For a given matrix A and its inverse A-1, we know we have AA-1=I. We will use the identity matrix to find the inverse of a matrix.

Example 1

Find the inverse of C = [1 3 3 1 4 3 1 3 4]

Step 1: Adjoin the identity matrix to the original matrix.

Write down the entries the matrix A in a double-wide matrix as shown below.

[1 3 3 1 4 3 1 3 4 |                  ]

In the other half of the double-wide matrix, write down the identity matrix

[1 3 3 1 4 3 1 3 4 | 1 0 0 0 1 0 0 0 1]

Step 2: Perform matrix row operations.

There is no specific step in doing this, but we need to keep in mind that our goal is to come up with the identity matrix on the left side of our newly augmented matrix. As we perform matrix operations on the left side, we also need to perform the same operations on the right side of the augmented matrix.

[1 3 3 1 4 3 1 3 4 | 1 0 0 0 1 0 0 0 1]R2 = – R1 + R2→ [1 3 3 0 1 0 1 3 4 | 1 0 0 – 1 1 0 0 0 1]

Step 3: Continue until you form the identity matrix.

Keep performing the matrix row operations until the left side of the augmented matrix displays the identity matrix. When you get to this point, the displayed matrix on the right side of the augmented matrix is the inverse of the original matrix.

[1 3 3 0 1 0 1 3 4 | 1 0 0 – 1 1 0 0 0 1]R3 =-R1 + R3→[1 3 3 0 1 0 0 0 1 | 1 0 0 – 1 1 0 – 1 0 1]

[1 3 3 0 1 0 0 0 1 | 1 0 0 – 1 1 0 – 1 0 1]R1 =-3R2 + R1→[1 0 3 0 1 0 0 0 1 | 4 – 3 0 – 1 1 0 – 1 0 1]

[1 0 3 0 1 0 0 0 1 | 4 – 3 0 – 1 1 0 – 1 0 1]R1=-3R3 + R1→[1 0 0 0 1 0 0 0 1 | 7 – 3 – 3 – 1 1 0 – 1 0 1]

Step 4: Write the identity matrix.

Now that the left-hand side of the augmented matrix contains the identity matrix, the right-hand side contains the inverse. 

Therefore, C-1 = [7 – 3 – 3 – 1 1 0 – 1 0 1]

To check if C-1 = [7 – 3 – 3 – 1 1 0 – 1 0 1] is the inverse of C = [1 3 3 1 4 3 1 3 4 ]. Multiply the two matrices and see if the product will yield an identity matrix.

Notice that we arrive at the same result using both methods.

The methods that we discussed can also be used in finding the inverse of larger matrices, such as 4 × 4 or 5 × 5 matrices. However, there will be a lot of calculations involved. Imagine working on a 4 × 4 matrix in which we have to calculate 16 determinants of 3 × 3 matrices. Instead of doing it manually, we can also use calculators or computers to make our job done efficiently.

Some important properties of the inverse of a matrix

If A and B are the nonsingular square matrices, then their inverse matrix has the following properties:

  • The inverse is unique
  • AB-1= B-1A-1
  • Matrix A and B cannot have a determinant value of 0
  • If AB = I, and BA = I,  then A and B are inverses of each other.

Solved problems involving matrix inversion

Problem #1

Determine the inverse of the following matrices if they exist.

  1. M=[- 2 1 -1 2]
  1. N=[2 8 1 4]

Solution (a)

Step 1: Compute the determinant of matrix M.

det M =(- 2) (2)-(1)(- 1)

det M =- 4+ 1

det M =- 3

Step 2: Use the formula M-1=$\frac{1}{detdet M}$ [d -b -c a]

M-1 =-$\frac{1}{3}$ [2 -1 1 -2]

M-1 =[-$\frac{2}{3} \frac{1}{3} – \frac{1}{3} \frac{2}{3}$]

Therefore the inverse of matrix M is M-1 = [$-\frac{2}{3} \frac{1}{3} – \frac{1}{3} \frac{2}{3}$]

Solution (b)

Step 1: Compute the determinant of matrix N.

detdet N =(2) (4)-(8)(1)

detdet N =8- 8

detdet N =0

Step 2: Since the det N =0, matrix N is not invertible

Therefore the inverse of matrix N does not exist.

Problem #2

The prices of three commodities X, Y, and Z are a, b, and c per unit, respectively. Pia purchases four two of Y and sells one unit of X and one unit of Z .  Queenie purchases one unit of Z and sells two units of X and one unit of Y . Rica purchases one unit of X and sells one unit of Y and one unit of Z . If Pia earns \$300 and both Queenie and Rica earn \$200, what is the prices per unit of X, Y, and Z? 

Solution

We will use matrix inversion to solve this problem.

Step 1: Express the problem using system of equations.

x – 2y + z = 300

2x + y – z = 200

– x +y + z = 200

Step 2: Create the 3 x 3 matrix A using the numerical coefficients in the equations as entries of matrix A and the 3 x 1 matrix B using the values on the right-hand side of the equations as entries of matrix B.

A= [1 – 2 1 2 1 -1 – 1 1 1] B= [300 200 200]

Step 3: Determine the determinant of matrix A.

detdet C =  1 (1 -(-1)) -(-2) (2  -1) + 1 (2 -(-1))

detdet C =  1 (2) – (- 2) (1) + 1 (3)

detdet C =  2 – (- 2) + 3

detdet C =  7

Step 4: Find the transpose the original matrix.


AT= [1 2 – 1 – 2 1 1 1 – 1 1]

Step 5: Find the determinant of each of the 2 x 2 minor matrices

detdet [1 1 –  1 1] = 2 detdet [-2 1 1 1] =- 3   detdet – [2 1 1 – 1] = 1  

detdet [2 – 1 – 1 1] = 1   detdet [1 – 1 1 1] = 2   detdet [1 2 1 – 1] = – 3  

detdet [2 – 1 1 1] = 3   detdet [1 – 1 – 2 1] = – 1   detdet [1 2 – 2 1] = 5

Step 6: Create the matrix of cofactors.

Adj (A) = [- 2 3 1 1 2 3 3 1 5]

Step 7: Multiply the reciprocal of the determinant on the adjugate matrix.

A-1=$\frac{1}{detdet A}$ [- 2 3 1 1 2 3 3 1 5]

A-1=$\frac{1}{7}$ [- 2 3 1 1 2 3 3 1 5]

Step 8: Multiply A-1 to matrix B

[X Y Z] = $\frac{1}{7}$ [- 2 3 1 1 2 3 3 1 5] × [300 200 200]

[X Y Z] = $\frac{1}{7}$ [ 2 (300) + 3 (200) + 1 (200) – 1 (300) + 2 (200) + 3 (200) 3 (300) + 1 (200) + 5 (200)]

[X Y Z] = $\frac{1}{7}$ [600 + 600 + 200 – 300 + 400 + 600 900 + 200 + 1000]

[X Y Z] = $\frac{1}{7}$ [1400 700 2100]

[X Y Z] = [200 100 300]

Therefore the price of commodities X, Y, and Z is \$200, \$100, and \$300, respectively.

What is the importance of the inverse of a matrix?

The concept of matrix inversion is one of the most useful skills not just in Mathematics but also in other applied sciences. It is used to solve linear equations as many fields of applied science require the solution of simultaneous linear equations. For example, the numerical simulation of fluid flows on a computer in physics and engineering necessitates the solution of simultaneous linear equations. Also, it is used in quantitative finance to do calculations that are required for certain types of option pricing.

In addition, inverting a matrix is frequently utilized in encrypting or decrypting message codes. It is also used in the study of optics, electrical circuits, and quantum mechanics. Inverse matrices play a significant role in measuring battery power outputs and when a resistor is used to convert electrical energy into another useable energy. It is a critical method in statistics and machine learning, most famously used to solve the Ordinary Least Squares estimate for linear regression.