Facebook Pixel
Mathos AI logo

Matrix Inverses and Linear Systems

Matrix Inverses and Linear Systems

In matrix algebra, the inverse of a matrix allows us to perform an operation similar to division. The inverse of a matrix AA, denoted as Aโˆ’1A^{-1}, is a matrix such that when multiplied by AA, it yields the Identity matrix II: AAโˆ’1=Aโˆ’1A=IAA^{-1} = A^{-1}A = I

Finding the Inverse of a 2ร—22 \times 2 Matrix

For a 2ร—22 \times 2 matrix A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, the inverse exists if and only if its determinant is not zero.

The determinant is calculated as: detโก(A)=adโˆ’bc\det(A) = ad - bc

If detโก(A)โ‰ 0\det(A) \neq 0, the inverse is given by the formula: Aโˆ’1=1adโˆ’bc[dโˆ’bโˆ’ca]A^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} Notice that we swap the positions of aa and dd, change the signs of bb and cc, and multiply everything by 11 over the determinant.

Example 1: Finding an Inverse

Find the inverse of A=[3152]A = \begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}.

  1. Find the determinant: detโก(A)=(3)(2)โˆ’(1)(5)=6โˆ’5=1\det(A) = (3)(2) - (1)(5) = 6 - 5 = 1.
  2. Apply the inverse formula: Aโˆ’1=11[2โˆ’1โˆ’53]=[2โˆ’1โˆ’53]A^{-1} = \frac{1}{1} \begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix} = \begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}

Solving Linear Systems Using Matrices

We can write a system of linear equations as a single matrix equation AX=BAX = B, where:

  • AA is the coefficient matrix.
  • XX is the variable matrix.
  • BB is the constant matrix.

To solve for XX, we multiply both sides by Aโˆ’1A^{-1} (on the left): X=Aโˆ’1BX = A^{-1}B

Example 2: Solving a System

Solve the system 2x+3y=72x + 3y = 7 and xโˆ’y=1x - y = 1 using matrices.

  1. Set up the matrix equation AX=BAX = B: [231โˆ’1][xy]=[71]\begin{bmatrix} 2 & 3 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 7 \\ 1 \end{bmatrix}

  2. Find the inverse of AA: The determinant is (2)(โˆ’1)โˆ’(3)(1)=โˆ’2โˆ’3=โˆ’5(2)(-1) - (3)(1) = -2 - 3 = -5. Aโˆ’1=1โˆ’5[โˆ’1โˆ’3โˆ’12]A^{-1} = \frac{1}{-5} \begin{bmatrix} -1 & -3 \\ -1 & 2 \end{bmatrix}

  3. Multiply Aโˆ’1BA^{-1}B to find XX: X=1โˆ’5[โˆ’1โˆ’3โˆ’12][71]X = \frac{1}{-5} \begin{bmatrix} -1 & -3 \\ -1 & 2 \end{bmatrix} \begin{bmatrix} 7 \\ 1 \end{bmatrix} X=โˆ’15[(โˆ’1)(7)+(โˆ’3)(1)(โˆ’1)(7)+(2)(1)]=โˆ’15[โˆ’10โˆ’5]=[21]X = -\frac{1}{5} \begin{bmatrix} (-1)(7) + (-3)(1) \\ (-1)(7) + (2)(1) \end{bmatrix} = -\frac{1}{5} \begin{bmatrix} -10 \\ -5 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}

The solution is x=2x = 2 and y=1y = 1.