watch: LA - 高山 12 | How to find the inverse matrix?

Table of contents

Source video: 【俗说矩阵】初等变换求逆矩阵原来是这个原理!数学老师看后大赞!

𝐀 can perform 9 elementary row operations to reach the identity matrix 𝐈.

$$ 𝐀 = [^{\_{1\ 3\ 5}} \_{^{2\ 4\ 6} \_{1\ 4\ 9}}] ➔ [^{\_{1\ 3\ 5}} \_{^{1\ 2\ 3} \_{1\ 4\ 9}}] ➔ [^{\_{1\ 2\ 3}} \_{^{1\ 3\ 5} \_{1\ 4\ 9}}] ➔ [^{\_{1\ 2\ 3}} \_{^{0\ 1\ 2} \_{1\ 4\ 9}}] ➔ [^{\_{1\ 2\ 3}} \_{^{0\ 1\ 2} \_{0\ 2\ 6}}] ➔ [^{\_{1\ 2\ 3}} \_{^{0\ 1\ 2} \_{0\ 0\ 2}}] ➔ [^{\_{1\ 2\ 3}} \_{^{0\ 1\ 2} \_{0\ 0\ 1}}] ➔ [^{\_{1\ 2\ 3}} \_{^{0\ 1\ 0} \_{0\ 0\ 1}}] ➔ [^{\_{1\ 2\ 0}} \_{^{0\ 1\ 0} \_{0\ 0\ 1}}] ➔ [^{\_{1\ 0\ 0}} \_{^{0\ 1\ 0} \_{0\ 0\ 1}}] = 𝐈 $$

𝐀 is multiplied with 9 elementary matrix on the left: 𝐈 = 𝐅₉𝐅₈…𝐅₁𝐀

The product of these 9 elementary matrix is called 𝐀⁻¹, the inverse of 𝐀. So 𝐀⁻¹𝐀 = 𝐈, and 𝐀⁻¹ = 𝐅₉𝐅₈…𝐅₁.

𝐀⁻¹ will not change if it’s multiplied with 𝐈: 𝐀⁻¹ = 𝐅₉𝐅₈…𝐅₁𝐈

This equation indicates that an identity matrix 𝐈 ($[^{\_{1\ 0\ 0}}\_{^{0\ 1\ 0}\_{0\ 0\ 1}}]$) can perform exactly the same 9 elementary row operations to reach the inverse matrix 𝐀⁻¹ = $[^{\_{-3\  7/4\  1/2}} \_{^{ 3\  -1\  -1}\_{-1\  1/4\  1/2}}]$.

$$ \begin{array}{c} 𝐀 = \begin{bmatrix} 1 & 3 & 5 \\\ 2 & 4 & 6 \\\ 1 & 4 & 9 \end{bmatrix} \rm \overset{\text{9 elementary row}}{operations→} 𝐈 = \begin{bmatrix} 1 & 0 & 0 \\\ 0 & 1 & 0 \\\ 0 & 0 & 1 \end{bmatrix} \\\ 𝐈 = \begin{bmatrix} 1 & 0 & 0 \\\ 0 & 1 & 0 \\\ 0 & 0 & 1 \end{bmatrix} \rm \overset{\text{9 elementary row}}{operations→} 𝐀⁻¹ = \begin{bmatrix} -3 & 7/4 & 1/2 \\\ 3 & -1 & -1 \\\ -1 & 1/4 & 1/2 \end{bmatrix} \end{array} $$

If an matrix 𝐀 can perform multiple elementary row operations to become an identity matrix 𝐈, then 𝐈 can perform the same 9 elementary row operations simultaneously to reach the inverse matrix 𝐀⁻¹.

In another word, the transformation from 𝐈 to 𝐀⁻¹ replicates the 9 elementary row opertations from 𝐀 to 𝐈.

Augmented matrix performs elementary row operations

To keep the sequence of operations the same, the augmented matrix 𝐀|𝐈 is leveraged.

$$ 𝐀|𝐈 = \begin{bmatrix} 1 & 3 & 5 & | 1 & 0 & 0 \\\ 2 & 4 & 6 & | 0 & 1 & 0 \\\ 1 & 4 & 9 & | 0 & 0 & 1 \end{bmatrix} $$

This augmented matrix 𝐀|𝐈 can perform 9 elementary matrix to make the left part of the vertical line become a identity matrix. Such that the right part of the vertical line becomes the inverse matrix 𝐀⁻¹.

$$ 𝐀|𝐈 = 𝐈|𝐀⁻¹ $$

This method is applicable to the matrix that its elements are given.

Example

Given a matrix 𝐀 = $[^{\_{1\ 1\ 2}} \_{^{1\ 2\ 3} \_{2\ 4\ 5}}]$, solve the inverse 𝐀⁻¹.

  1. Construct the augmented matrix:

    $$ 𝐀|𝐈 = \begin{bmatrix} 1 & 1 & 2 & | 1 & 0 & 0 \\\ 1 & 2 & 3 & | 0 & 1 & 0 \\\ 2 & 4 & 5 & | 0 & 0 & 1 \end{bmatrix} $$
  2. Perform elementary row operations on this augmented matrix to make the left part become 𝐈

    $$ \begin{bmatrix} 1 & 1 & 2 & | 1 & 0 & 0 \\\ 1 & 2 & 3 & | 0 & 1 & 0 \\\ 2 & 4 & 5 & | 0 & 0 & 1 \end{bmatrix} →^{\text{row echelon}}\_{form}: \begin{bmatrix} 1 & 1 & 2 & | 1 & 0 & 0 \\\ 0 & 1 & 1 & | -1 & 1 & 0 \\\ 0 & 0 & 1 & | 0 & 2 & -1 \end{bmatrix} →^{\text{clear top-}}\_{\text{right part}}: \begin{bmatrix} 1 & 0 & 0 & | 2 & -3 & 1 \\\ 0 & 1 & 0 & | -1 & -1 & 1 \\\ 0 & 0 & 1 & | 0 & 2 & -1 \end{bmatrix} $$
    • Row echelon form: Clear the values on the lower left side of the main diagonal from top to bottom
    • Clear the values on the top right side of the main diagonal from bottom to top
  3. The right-hand side of the vertical line individually is the inverse matrix 𝐀⁻¹.

    $$ \begin{bmatrix} 1 & 0 & 0 & | 2 & -3 & 1 \\\ 0 & 1 & 0 & | -1 & -1 & 1 \\\ 0 & 0 & 1 & | 0 & 2 & -1 \end{bmatrix} = 𝐈|𝐀⁻¹ $$

So,

$$ 𝐀⁻¹ = \begin{bmatrix} 2 & -3 & 1 \\\ -1 & -1 & 1 \\\ 0 & 2 & -1 \end{bmatrix} $$

2x2

(2024-02-12)

The inverse of $[^{a\ b}_{d \ c}]$ is:

$$ \underbrace{ \begin{bmatrix} 1 & -\frac{b}{a} \\\ 0 & 1 \end{bmatrix} \begin{bmatrix} \frac{1}{d} & 0 \\\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\\ 0 & \frac{a}{ac-bd} \end{bmatrix} \begin{bmatrix} 1 & 0 \\\ -1 & 1 \end{bmatrix} \begin{bmatrix} \frac{d}{a} & 0 \\\ 0 & 1 \end{bmatrix} }\_{A⁻¹} \begin{bmatrix} a & b \\\ d & c \end{bmatrix} = \begin{bmatrix} 1 & 0 \\\ 0 & 1 \end{bmatrix} $$

The combinatio nof 5 matrices is the inverse matrix:

$$ A⁻¹ = \begin{bmatrix} \frac{c}{ac-bd} & -\frac{b}{ac-bd} \\\ -\frac{d}{ac-bd} & \frac{a}{ac-bd} \end{bmatrix} = \frac{1}{ac-bd} \begin{bmatrix} c & -b \\\ -d & a \end{bmatrix} $$
  • Hence, the 1/determinant is a part of the inverse matrix.

Matlab

A is invertible:

1
2
3
4
5
6
7
8
A = [1, 1, 2; 1, 2, 3; 2, 4, 5]
inv(A)

ans =

     2    -3     1
    -1    -1     1
     0     2    -1

B is not invertible:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
B = [1, 1, 1; 2, 2, 2; 3, 3, 3]
inv(B)

Warning: Matrix is singular to working precision. 

ans =

   Inf   Inf   Inf
   Inf   Inf   Inf
   Inf   Inf   Inf

C is not a square matrix:

1
2
3
4
5
C = [1, 2, 3; 4, 5, 6]
inv(C)

Error using inv
Matrix must be square.
Built with Hugo
Theme Stack designed by Jimmy