The Wayback Machine - https://web.archive.org/web/20231006072036/https://www.geeksforgeeks.org/inverse-of-a-matrix/
Open In App
Related Articles

Inverse of a Matrix

Improve Article
Improve
Save Article
Save
Like Article
Like

Inverse of a Matrix is a matrix that on multiplying with the original matrix result in the identity matrix. It 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 are 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.

Inverse of 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.

Learn more about, Minors and Cofactors

Singular and Non-Singular Matrix

The meaning of Singular and Non-Singular Matrix is,

Singular Matrix

A matrix whose value of the determinant is zero is called a singular matrix, i.e. any matrix A is called a singular matrix if |A| = 0. Inverse of a singular matrix does not exist.

Non-Singular Matrix

A matrix whose value of the determinant is non-zero is called a non-singular matrix, i.e. any matrix A is called a non-singular matrix if |A| ≠ 0. Inverse of a non-singular matrix exists.

Identity Matrix

A square matrix in which all the elements are zero except for the principal diagonal elements is called the identity matrix. It is represented using I. It is the identity element of the matrix as for any matrix A,

A×I = A

An example of an Identity matrix is,

I3×3 = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & 1 \\\end{bmatrix}

This is an identity matrix of order 3×3.

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, and 
  • |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)

⇒ |A| = 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]

⇒ A–1 = \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, and
  • 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 the transpose of the Cofactor matrix of A i.e., adj (A) = [Cij]T

And for the cofactor of a matrix i.e., Cij, we can use the following 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.

We can easily find the inverse of the 2 × 2 Matrix using the elementary operation. Now let’s see the example for the same.

Example: Find the inverse of the 2 × 2, A =       using the elementary operation.

Solution:

Given:

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

We know that,

A = IA

\begin{bmatrix}2 & 1\\ 1 & 2\end{bmatrix}~=~\begin{bmatrix}1 & 0\\ 0 & 1\end{bmatrix}~×~\begin{bmatrix}2 & 1\\ 1 & 2\end{bmatrix}

Now, R1 ⇢ R1/2

\begin{bmatrix}1 & 1/2\\ 1 & 2\end{bmatrix}~=~\begin{bmatrix}1/2 & 0\\ 0 & 1\end{bmatrix}~×~A

R2 ⇢ R2 – R1

\begin{bmatrix}1 & 1/2\\ 0 & 3/2\end{bmatrix}~=~\begin{bmatrix}1/2 & 0\\ -1/2 & 1\end{bmatrix}~×~A

R2 ⇢ R2 × 2/3

\begin{bmatrix}1 & 1/2\\ 0 & 1\end{bmatrix}~=~\begin{bmatrix}1/2 & 0\\-1/3 & 2/3\end{bmatrix}~×~A

R1 ⇢ R1 – R2/2

\begin{bmatrix}1 & 0\\ 0 & 1\end{bmatrix}~=~\begin{bmatrix}2/3 & -1/6\\ -1/3 & 2/3\end{bmatrix}~×~A

Thus, the inverse of the matrix A =  \begin{bmatrix}2 & 1\\ 1 & 2\end{bmatrix}   is

A-1 = \begin{bmatrix}2/3 & -1/6\\ -1/3 & 2/3\end{bmatrix}

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. Let’s consider an example to understand the shortcut method to calculate the inverse of 2 × 2 Matrix.

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

We know, |A| = (ad – bc)

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

then using the formula for inverse

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

⇒ 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 the 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)

[Hence 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 \bold{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=\bold{ using the formula.}\left[\begin{array}{ccc}6 & 2 & 3\\0 & 0 & 4\\2 & 0 & 0\end{array}\right]

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=\bold{\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=\bold{\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=\bold{\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=\bold{\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

Q1: 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]

Q2: 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

Q3: 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. 

Q4: 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

Q5: What are Invertible Matrices?

Answer:

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

Q6: Why does the Inverse of the 2 × 3 Matrix does not exist?

Answer:

The inverse of only a square matrix exists. As the 2 × 3 matrix is not a square matrix but rather a rectangular matrix thus, its inverse does not exist.

Inverse of the 2 × 1 Matrix

Similarly, the 2 × 1 matrix is also not a square matrix but rather a rectangular matrix thus, its inverse does not exist.

Q7: How to Inverse of a Matrix 3×3?

Answer:

For any matrix A or order 3×3 its inverse is found using the formula,

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


Last Updated : 16 Jun, 2023
Like Article
Save Article
Similar Reads
Related Tutorials