Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Inverse of a Matrix

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Inverse of a Matrix is required to solve complex problems using matrix operations. For any matrix A its inverse is denoted as A-1. Matrix is a rectangular array of numbers that is divided into rows and columns. It is a set of numbers that are organized in a defined number of rows and columns. The number of rows and columns in a matrix is referred to as its dimension or order. A matrix is illustrated by the array of numbers below. 

\begin{bmatrix} 1 & 2 & 3\\ 8 & 4 & 5 \\ 2 & 6 & 7 \\ 12 & 6 & 3 \end{bmatrix}

By convention, rows are listed first, followed by columns. Thus, the order of the matrix discussed above is 4 x 3, indicating that it contains 4 rows and 3 columns. Elements of the matrix are numbers that appear in the rows and columns of a matrix. The element in the first column of the first row in the above matrix is 1; the element in the second column of the first row is 2; and so on.

Inverse of a Matrix

The inverse of a matrix is another matrix that, when multiplied by the given matrix, yields the multiplicative identity. For matrix A and its inverse of A-1, the identity property holds true.

A.A-1 = A-1A = I

where I is the identity matrix.

Term Related to Inverse of a Matrix

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

  • Minor: The minor is defined for each matrix element. The determinant produced after removing the row and column containing this element is the minor of that element. For a matrix A=\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \\ 2 & 6 & 7 \\ \end{bmatrix}  , the minor of the first element 1 is, a_{11}=\begin{bmatrix}5&6\\6&7 \end{bmatrix}  .
  • Cofactor: The cofactor of an element is computed by multiplying the minor with -1 by the exponent of the sum of the row and column elements in the element’s order representation.

Cofactor of aij = (-1)i+j Mij 

where Mij is the minor of that element

  • Determinant: The matrix’s determinant is equal to the sum of the product of the elements and their cofactors of a specific row or column of the matrix.
  • Adjoint of Matrix: The adjoint of a matrix is the transpose of the cofactor matrix.

Inverse of a Matrix Formula

The inverse of matrix A, that is A-1 is calculated using the inverse of matrix formula, which involves dividing the adjoint of a matrix by its determinant. 

A^{-1}=\frac{\text{Adj A}}{|A|}

where,

adj A = adjoint of the matrix A
|A| = determinant of the matrix A

How to Find Inverse of a Matrix?

The inverse of a matrix A can be computed by following the steps below:

Step 1: Determine the minors of all A elements.

Step 2: Next, compute the cofactors of all elements and build the cofactor matrix by substituting the elements of A with their respective cofactors.

Step 3: Take the transpose of A’s cofactor matrix to find its adjoint (written as adj A).

Step 4: Multiply adj A by the reciprocal of the determinant of A.

Now, for any non-singular matrix A,

A-1 = 1 / |A| × Adj (A)

Example: Find the inverse of the matrix A=\left[\begin{array}{ccc}4 & 3 & 8\\6 & 2 & 5\\1 & 5 & 9\end{array}\right]   using the formula.

We have, A=\left[\begin{array}{ccc}4 & 3 & 8\\6 & 2 & 5\\1 & 5 & 9\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A = \left[\begin{array}{ccc}-7 & -49 & 28\\13 & 28 & -17\\-1 & 28 & -10\end{array}\right]

Find the value of determinant of the matrix.

|A| = 4(18–25) – 3(54–5) + 8(30–2)

= 49

So, the inverse of the matrix is,

A–1\frac{1}{49}\left[\begin{array}{ccc}-7 & -49 & 28\\13 & 28 & -17\\-1 & 28 & -10\end{array}\right]

\left[\begin{array}{ccc}- \frac{1}{7} & \frac{13}{49} & - \frac{1}{49}\\-1 & \frac{4}{7} & \frac{4}{7}\\\frac{4}{7} & - \frac{17}{49} & - \frac{10}{49}\end{array}\right]

Methods to Find Inverse of Matrix

The inverse of a matrix can be found using various methods. All the method yields the same result, some of the methods are discussed below in this article,

Method 1 (Determinant Method):

The most important method for finding the Inverse of the matrix is using a determinant this method is discussed below:

The inverse matrix is also found using the following equation:

A-1= adj(A) / det(A)

where,
adj(A) is the adjoint of a matrix A, 
det(A) is the determinant of a matrix A.

For finding the adjoint of a matrix A the cofactor matrix of A is required. Then adjoint (A) is transpose of the Cofactor matrix of A i.e. 

adj (A) = [Cij]T

For the cofactor of a matrix, Cij use the given formula:

Cij = (-1)i+j det (Mij)

where, Mij refers to the (i, j)th minor matrix when ith row and jth column is removed.

Method 2 (Elementary Transformation Method):

Inverse of any matrix can also be found using elementary operations. There are two elementary operations that are used for finding the Inverse of a Matrix. Let us take three matrices A, B, and X such as X = AB. For finding the inverse of the matrix we convert the given matrix into the Identity matrix.

For the inverse of matrix A, when A-1 exists then for determining A-1 using elementary operations use the following steps:

  • Write the given matrix as A = IA, where I is the identity matrix of the order same as A.
  • Use the sequence of either row operations or column operations till the identity matrix is achieved on the LHS also use similar elementary operations on the RHS such that we get I = BA. Thus, the matrix B on RHS is the inverse of matrix A.
  • Make sure we either use Row Operation or Column Operation while performing elementary operations.

Inverse of 2 × 2 Matrix

Inverse of the 2 × 2 matrix can also be calculated using the shortcut method apart from the method discussed above. Use the steps given below to get the determinant of the 2 × 2 Matrix.

For given matrix A = \begin{bmatrix}a & b\\ c & d\end{bmatrix}

|A| = (ad – bc)

adj A = \begin{bmatrix}d & -b\\ -c & a\end{bmatrix}

then A-1 =  (1 / |A|) × Adj A i.e.

A-1[1 / (ad - bc)] × \begin{bmatrix}d & -b\\ -c & a\end{bmatrix}

Thus, the inverse of the 2 × 2 matrix is calculated.

Inverse of 3 × 3 Matrix

Inverse of 3 × 3 Matrix is calculated using the methods discussed above. Take any 3 × 3 Matrix A = \begin{bmatrix}a & b & c\\ l & m & n\\ p & q & r\end{bmatrix}

Its inverse 3×3 matrix is calculated using the inverse matrix formula, 

A-1 = (1 / |A|) × Adj A

Determinant of Inverse Matrix

Determinant of the inverse of an invertible matrix is the reciprocal of the determinant of the original matrix. i.e., 

det(A-1) = 1 / det(A)

The proof of above statement is discussed below:

det(A × B) = det (A) × det(B)  (already know)

A × A-1 = I  (by Inverse matrix property)

det(A × A-1) = det(I)

det(A) × det(A-1) = det(I)     [ but, det(I) = 1]

det(A) × det(A-1) = 1

det(A-1) = 1 / det(A)

Proved.

Properties of Inverse of Matrix

The important properties of the Inverse of the matrix are discussed below

  • For any non-singular matrix A, (A-1)-1 = A
  • For any two non-singular matrices A and B, (AB)-1 = B-1A-1
  • Inverse of a non-singular matrix exists, for a singular matrix, the inverse does not exist.
  • For any nonsingular A, (AT)-1 = (A-1)T

Also, Check

Solved Example on Inverse of a Matrix

Example 1: Find the inverse of the matrix A=\left[\begin{array}{ccc}2 & 3 & 1\\1 & 1 & 2\\2 & 3 & 4\end{array}\right]   using the formula.

Solution:

We have,

A=\left[\begin{array}{ccc}2 & 3 & 1\\1 & 1 & 2\\2 & 3 & 4\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A = \left[\begin{array}{ccc}-2 & -9 & 5\\0 & 6 & -3\\1 & 0 & -1\end{array}\right]

Find the value of determinant of the matrix.

|A| = 2(4–6) – 3(4–4) + 1(3–2)

= –3

So, the inverse of the matrix is,

A–1\frac{1}{-3}\left[\begin{array}{ccc}-2 & -9 & 5\\0 & 6 & -3\\1 & 0 & -1\end{array}\right]

\left[\begin{array}{ccc}\frac{2}{3} & 3 & - \frac{5}{3}\\0 & -2 & 1\\- \frac{1}{3} & 0 & \frac{1}{3}\end{array}\right]

Example 2: Find the inverse of the matrix A=\left[\begin{array}{ccc}6 & 2 & 3\\0 & 0 & 4\\2 & 0 & 0\end{array}\right]   using the formula.

Solution:

We have,

A=\left[\begin{array}{ccc}6 & 2 & 3\\0 & 0 & 4\\2 & 0 & 0\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A = \left[\begin{array}{ccc}0 & 0 & 8\\8 & -6 & -24\\0 & 4 & 0\end{array}\right]

Find the value of determinant of the matrix.

|A| = 6(0–4) – 2(0–8) + 3(0–0)

= 16

So, the inverse of the matrix is,

A–1\frac{1}{16}\left[\begin{array}{ccc}0 & 0 & 8\\8 & -6 & -24\\0 & 4 & 0\end{array}\right]

\left[\begin{array}{ccc}0 & 0 & \frac{1}{2}\\\frac{1}{2} & - \frac{3}{8} & - \frac{3}{2}\\0 & \frac{1}{4} & 0\end{array}\right]

Example 3: Find the inverse of the matrix A=\left[\begin{array}{ccc}1 & 2 & 3\\0 & 1 & 4\\0 & 0 & 1\end{array}\right]   using the formula.

Solution:

We have,

A=\left[\begin{array}{ccc}1 & 2 & 3\\0 & 1 & 4\\0 & 0 & 1\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A = \left[\begin{array}{ccc}1 & -2 & 5\\0 & 1 & -4\\0 & 0 & 1\end{array}\right]

Find the value of determinant of the matrix.

|A| = 1(1–0) – 2(0–0) + 3(0–0)

= 1

So, the inverse of the matrix is,

A–1\frac{1}{1}\left[\begin{array}{ccc}1 & -2 & 5\\0 & 1 & -4\\0 & 0 & 1\end{array}\right]

\left[\begin{array}{ccc}1 & -2 & 5\\0 & 1 & -4\\0 & 0 & 1\end{array}\right]

Example 4: Find the inverse of the matrix A=\left[\begin{array}{ccc}1 & 2 & 3\\2 & 1 & 4\\3 & 4 & 1\end{array}\right]   using the formula.

Solution:

We have,

A=\left[\begin{array}{ccc}1 & 2 & 3\\2 & 1 & 4\\3 & 4 & 1\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A = \left[\begin{array}{ccc}-15 & 10 & 5\\10 & -8 & 2\\5 & 2 & -3\end{array}\right]

Find the value of determinant of the matrix.

|A| = 1(1–16) – 2(2–12) + 3(8–3)

= 20

So, the inverse of the matrix is,

A–1\frac{1}{20}\left[\begin{array}{ccc}-15 & 10 & 5\\10 & -8 & 2\\5 & 2 & -3\end{array}\right]

\left[\begin{array}{ccc}- \frac{3}{4} & \frac{1}{2} & \frac{1}{4}\\\frac{1}{2} & - \frac{2}{5} & \frac{1}{10}\\\frac{1}{4} & \frac{1}{10} & - \frac{3}{20}\end{array}\right]

Example 5: Find the inverse of the matrix A=\left[\begin{array}{ccc}2 & 3 & 4\\1 & 2 & 3\\1 & 1 & 0\end{array}\right]   using the formula.

Solution:

We have,

A=\left[\begin{array}{ccc}2 & 3 & 4\\1 & 2 & 3\\1 & 1 & 0\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A =\left[\begin{array}{ccc}-3 & 4 & 1\\3 & -4 & -2\\-1 & 1 & 1\end{array}\right]

Find the value of determinant of the matrix.

|A| = 2(0–3) – 3(0–3) + 4(1–2)

= –1

So, the inverse of the matrix is,

A–1\frac{1}{-1}\left[\begin{array}{ccc}-3 & 4 & 1\\3 & -4 & -2\\-1 & 1 & 1\end{array}\right]

\left[\begin{array}{ccc}3 & -4 & -1\\-3 & 4 & 2\\1 & -1 & -1\end{array}\right]

Example 6: Find the inverse of the matrix A=\left[\begin{array}{ccc}3 & 5 & 7\\5 & 7 & 9\\8 & 9 & 9\end{array}\right]   using the formula.

Solution:

We have,

A=\left[\begin{array}{ccc}3 & 5 & 7\\5 & 7 & 9\\8 & 9 & 9\end{array}\right]

Find the adjoint of matrix A by computing the cofactors of each element and then getting the cofactor matrix’s transpose.

adj A = \left[\begin{array}{ccc}-18 & 18 & -4\\27 & -29 & 8\\-11 & 13 & -4\end{array}\right]

Find the value of determinant of the matrix.

|A| = 3(63–81) – 5(45–72) + 7(45–56)

= 4

So, the inverse of the matrix is,

A–1\frac{1}{4}\left[\begin{array}{ccc}-18 & 18 & -4\\27 & -29 & 8\\-11 & 13 & -4\end{array}\right]

\left[\begin{array}{ccc}- \frac{9}{2} & \frac{9}{2} & -1\\\frac{27}{4} & - \frac{29}{4} & 2\\- \frac{11}{4} & \frac{13}{4} & -1\end{array}\right]

FAQs on the Inverse of a Matrix

Question 1: What is the inverse of a matrix?

Answer:

Reciprocal of a matrix is called the Inverse of a matrix. Only square matrices with non-zero determinants are invertible. Suppose for any square matrix A with inverse matrix B their product is always an identity matrix (I) of the same order.

[A]×[B] = [I]

Question 2: What is the inverse of a 3×3 matrix?

Answer:

The inverse of any square 3×3 matrix (say A) is the matrix of the same order denoted by A-1 such that their product is an Identity matrix of order 3×3.

[A]3×3 × [A-1]3×3 = [I]3×3

Question 3: Are the adjoint of a matrix and the inverse of a matrix the same?

Answer:

No, the adjoint of a matrix and the inverse of a matrix are not the same. 

Question 4: How to use the Inverse of the Matrix?

Answer:

The inverse of a matrix is used for solving algebraic expressions in matrix form. For example, to solve AX = B, where A is the coefficient matrix, X is the variable matrix and B is the constant matrix. Here the variable matrix is found using the inverse operation as,

X = A-1B

Question 5: What are invertible matrices?

Answer:

The matrices whose inverse exist are called invertible. Invertible matrices are matrices that have a non-zero determinant.


My Personal Notes arrow_drop_up
Last Updated : 13 Jan, 2023
Like Article
Save Article
Similar Reads
Related Tutorials