# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/matrix/matrix-inverse
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/matrix/matrix-inverse/en.mdx

Learn inverse formulas for order-two and order-three matrices through determinants, adjoints, and linear equation examples.

---

## Understanding Matrix Inverse

In the set of real numbers, every non-zero number $$a$$ has a reciprocal, which is the number $$a^{-1}$$, satisfying the property $$a \cdot a^{-1} = a^{-1} \cdot a = 1$$. A similar concept applies to matrices.

Visible text: In the set of real numbers, every non-zero number has a reciprocal, which is the number , satisfying the property . A similar concept applies to matrices.

If $$A$$ is a square matrix (e.g., of order $$n \times n$$) and $$I$$ is the identity matrix of the same order, then the inverse of matrix $$A$$, denoted as $$A^{-1}$$, is a matrix that satisfies the property:

Visible text: If is a square matrix (e.g., of order ) and is the identity matrix of the same order, then the inverse of matrix , denoted as , is a matrix that satisfies the property:

```math
A \cdot A^{-1} = A^{-1} \cdot A = I
```

The identity matrix $$I$$ is a square matrix where all main diagonal elements are $$1$$ and all other elements are $$0$$. For example, for a $$2 \times 2$$ order: $$I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$.

Visible text: The identity matrix is a square matrix where all main diagonal elements are and all other elements are . For example, for a order: .

## Nonsingular and Singular Matrices

Not all square matrices have an inverse. A matrix $$A$$ has an inverse if and only if the determinant of the matrix is not equal to zero ($$\det(A) \neq 0$$ or $$|A| \neq 0$$).

Visible text: Not all square matrices have an inverse. A matrix has an inverse if and only if the determinant of the matrix is not equal to zero ( or ).

- Matrix $$A$$ is called a **nonsingular matrix** if $$\det(A) \neq 0$$. A nonsingular matrix always has an inverse.
- Matrix $$A$$ is called a **singular matrix** if $$\det(A) = 0$$. A singular matrix does not have an inverse.

Visible text: - Matrix is called a **nonsingular matrix** if . A nonsingular matrix always has an inverse.
- Matrix is called a **singular matrix** if . A singular matrix does not have an inverse.

## Inverse of a Two-by-Two Matrix

For a $$2 \times 2$$ matrix $$A$$, let:

Visible text: For a matrix , let:

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

The inverse of matrix $$A$$ can be found using the following formula, provided that $$\det(A) \neq 0$$:

Visible text: The inverse of matrix can be found using the following formula, provided that :

```math
A^{-1} = \frac{1}{\det(A)} \text{Adj}(A)
```

Let's understand each component of this formula:

1.  **Determinant of Matrix $$A$$ ($$\det(A)$$ or $$|A|$$)**:

    Calculated as:

    
    
    ```math
    |A| = ad - bc
    ```

2.  **Adjoint of Matrix $$A$$ ($$\text{Adj}(A)$$)**:

    Obtained by swapping the main diagonal elements and changing the sign of the other diagonal elements:

    
    
    ```math
    \text{Adj}(A) = \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}
    ```

Visible text: 1. **Determinant of Matrix ( or )**:

 Calculated as:

 
 

2. **Adjoint of Matrix ()**:

 Obtained by swapping the main diagonal elements and changing the sign of the other diagonal elements:

So, the complete formula for the inverse of a $$2 \times 2$$ matrix is:

Visible text: So, the complete formula for the inverse of a matrix is:

```math
A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}
```

### Example of a Two-by-Two Matrix Inverse

Find the inverse of matrix $$P = \begin{bmatrix} 3 & -7 \\ -1 & 2 \end{bmatrix}$$.

Visible text: Find the inverse of matrix .

**Solution:**

Step $$1$$: Identify the elements of matrix $$P$$.

Visible text: Step : Identify the elements of matrix .

$$a=3, b=-7, c=-1, d=2$$

Step $$2$$: Calculate the determinant of matrix $$P$$.

Visible text: Step : Calculate the determinant of matrix .

```math
\det(P) = (3)(2) - (-7)(-1) = 6 - 7 = -1
```

Since $$\det(P) \neq 0$$, matrix $$P$$ has an inverse.

Visible text: Since , matrix has an inverse.

Step $$3$$: Determine the adjoint of matrix $$P$$.

Visible text: Step : Determine the adjoint of matrix .

```math
\text{Adj}(P) = \begin{bmatrix} 2 & -(-7) \\ -(-1) & 3 \end{bmatrix} = \begin{bmatrix} 2 & 7 \\ 1 & 3 \end{bmatrix}
```

Step $$4$$: Calculate the inverse of matrix $$P$$.

Visible text: Step : Calculate the inverse of matrix .

Component: MathContainer
Children:

```math
P^{-1} = \frac{1}{\det(P)} \text{Adj}(P)
```

```math
P^{-1} = \frac{1}{-1} \begin{bmatrix} 2 & 7 \\ 1 & 3 \end{bmatrix}
```

```math
P^{-1} = -1 \begin{bmatrix} 2 & 7 \\ 1 & 3 \end{bmatrix}
```

```math
P^{-1} = \begin{bmatrix} -2 & -7 \\ -1 & -3 \end{bmatrix}
```

Thus, the inverse of matrix $$P$$ is $$P^{-1} = \begin{bmatrix} -2 & -7 \\ -1 & -3 \end{bmatrix}$$.

Visible text: Thus, the inverse of matrix is .

## Inverse of a Three-by-Three Matrix

The basic concept for finding the inverse of a $$3 \times 3$$ matrix is the same as for a $$2 \times 2$$ matrix, i.e., using the formula:

Visible text: The basic concept for finding the inverse of a matrix is the same as for a matrix, i.e., using the formula:

```math
A^{-1} = \frac{1}{\det(A)} \text{Adj}(A)
```

However, the calculation of the determinant ($$\det(A)$$) and adjoint ($$\text{Adj}(A)$$) for a $$3 \times 3$$ matrix is more complex.

Visible text: However, the calculation of the determinant () and adjoint () for a matrix is more complex.

- **The determinant of a $$3 \times 3$$ matrix** can be calculated using Sarrus's rule or the cofactor expansion method.
- **The adjoint of a $$3 \times 3$$ matrix** is obtained from the transpose of its cofactor matrix.

Visible text: - **The determinant of a matrix** can be calculated using Sarrus's rule or the cofactor expansion method.
- **The adjoint of a matrix** is obtained from the transpose of its cofactor matrix.

A fuller discussion on how to calculate the determinant and adjoint of a $$3 \times 3$$ matrix will usually be studied separately because it involves more steps.

Visible text: A fuller discussion on how to calculate the determinant and adjoint of a matrix will usually be studied separately because it involves more steps.

## Properties of Matrix Inverse

One important use of the matrix inverse is to solve systems of linear equations. If a system of linear equations can be expressed in matrix multiplication form:

```math
AX = B
```

where $$A$$ is the coefficient matrix, $$X$$ is the variable matrix, and $$B$$ is the constant matrix. If matrix $$A$$ has an inverse ($$A^{-1}$$), then the solution for $$X$$ can be found by:

Visible text: where is the coefficient matrix, is the variable matrix, and is the constant matrix. If matrix has an inverse (), then the solution for can be found by:

```math
X = A^{-1}B
```

This is a very useful property in various mathematical and engineering applications.

## Exercises

Given matrices $$X = \begin{bmatrix} 1 & -3 \\ -1 & 4 \end{bmatrix}$$ and $$Y = \begin{bmatrix} -4 & 2 \\ 3 & -2 \end{bmatrix}$$.

Visible text: Given matrices and .

1. Determine matrices $$X^{-1}$$ and $$Y^{-1}$$.
2. Determine matrix $$X^{-1} + Y^{-1}$$.
3. Determine matrix $$(X+Y)^{-1}$$.
4. Is matrix $$X^{-1} + Y^{-1}$$ equal to matrix $$(X+Y)^{-1}$$? Explain your answer.

Visible text: 1. Determine matrices and .
2. Determine matrix .
3. Determine matrix .
4. Is matrix equal to matrix ? Explain your answer.

### Answer Key

1.  **Determining $$X^{-1}$$:**

    <MathContainer>
      
    
    ```math
    X = \begin{bmatrix} 1 & -3 \\ -1 & 4 \end{bmatrix}
    ```

      
    
    ```math
    \det(X) = (1)(4) - (-3)(-1) = 4 - 3 = 1
    ```

      
    
    ```math
    \text{Adj}(X) = \begin{bmatrix} 4 & 3 \\ 1 & 1 \end{bmatrix}
    ```

      
    
    ```math
    X^{-1} = \frac{1}{1} \begin{bmatrix} 4 & 3 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 4 & 3 \\ 1 & 1 \end{bmatrix}
    ```

    </MathContainer>

    **Determining $$Y^{-1}$$:**

    <MathContainer>
      
    
    ```math
    Y = \begin{bmatrix} -4 & 2 \\ 3 & -2 \end{bmatrix}
    ```

      
    
    ```math
    \det(Y) = (-4)(-2) - (2)(3) = 8 - 6 = 2
    ```

      
    
    ```math
    \text{Adj}(Y) = \begin{bmatrix} -2 & -2 \\ -3 & -4 \end{bmatrix}
    ```

      
    
    ```math
    Y^{-1} = \frac{1}{2} \begin{bmatrix} -2 & -2 \\ -3 & -4 \end{bmatrix} = \begin{bmatrix} -1 & -1 \\ -3/2 & -2 \end{bmatrix}
    ```

    </MathContainer>

2.  **Determining $$X^{-1} + Y^{-1}$$:**

    
    
    ```math
    X^{-1} + Y^{-1} = \begin{bmatrix} 4 & 3 \\ 1 & 1 \end{bmatrix} + \begin{bmatrix} -1 & -1 \\ -3/2 & -2 \end{bmatrix} = \begin{bmatrix} 4-1 & 3-1 \\ 1-3/2 & 1-2 \end{bmatrix} = \begin{bmatrix} 3 & 2 \\ -1/2 & -1 \end{bmatrix}
    ```

3.  **Determining $$(X+Y)^{-1}$$:**

    First, calculate $$X+Y$$:

    
    
    ```math
    X+Y = \begin{bmatrix} 1 & -3 \\ -1 & 4 \end{bmatrix} + \begin{bmatrix} -4 & 2 \\ 3 & -2 \end{bmatrix} = \begin{bmatrix} 1-4 & -3+2 \\ -1+3 & 4-2 \end{bmatrix} = \begin{bmatrix} -3 & -1 \\ 2 & 2 \end{bmatrix}
    ```

    Let $$Z = X+Y = \begin{bmatrix} -3 & -1 \\ 2 & 2 \end{bmatrix}$$. Now, calculate $$Z^{-1}$$:

    <MathContainer>
      
    
    ```math
    \det(Z) = (-3)(2) - (-1)(2) = -6 - (-2) = -6 + 2 = -4
    ```

      
    
    ```math
    \text{Adj}(Z) = \begin{bmatrix} 2 & 1 \\ -2 & -3 \end{bmatrix}
    ```

      
    
    ```math
    (X+Y)^{-1} = Z^{-1} = \frac{1}{-4} \begin{bmatrix} 2 & 1 \\ -2 & -3 \end{bmatrix} = \begin{bmatrix} -2/4 & -1/4 \\ 2/4 & 3/4 \end{bmatrix} = \begin{bmatrix} -1/2 & -1/4 \\ 1/2 & 3/4 \end{bmatrix}
    ```

    </MathContainer>

4.  **Comparison of $$X^{-1} + Y^{-1}$$ and $$(X+Y)^{-1}$$:**

    From the calculations:

    <MathContainer>
      
    
    ```math
    X^{-1} + Y^{-1} = \begin{bmatrix} 3 & 2 \\ -1/2 & -1 \end{bmatrix}
    ```

      
    
    ```math
    (X+Y)^{-1} = \begin{bmatrix} -1/2 & -1/4 \\ 1/2 & 3/4 \end{bmatrix}
    ```

    </MathContainer>

    Clearly, $$X^{-1} + Y^{-1} \neq (X+Y)^{-1}$$. This shows that the inverse of the sum of two matrices is generally not equal to the sum of their individual inverses.

    This property differs from some algebraic operations on real numbers.

Visible text: 1. **Determining :**

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 **Determining :**

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

2. **Determining :**

 
 

3. **Determining :**

 First, calculate :

 
 

 Let . Now, calculate :

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

4. **Comparison of and :**

 From the calculations:

 <MathContainer>
 
 

 
 

 </MathContainer>

 Clearly, . This shows that the inverse of the sum of two matrices is generally not equal to the sum of their individual inverses.

 This property differs from some algebraic operations on real numbers.