0:00 / 0:00

Solving Matrix Equations

Matrix Multiplication

You can multiply both sides of a matrix equation by a matrix:

Watch Out!
Matrices are not commutative in general! (ABBAAB \ne BA)
That means we have to be consistent when multiplying: left multiplication vs. right multiplication.
  • Left multiplication by a matrix C\colorOne{\bm C}:
Ax=b    CAx=CbA\vec x=\vec b \quad\implies\quad \colorOne{\mathbf{C}}A\vec x =\colorOne{\mathbf{C}}\vec b
  • Right multiplication by a matrix C\colorOne{\bm C} :
Ax=b    AxC=bCA\vec x=\vec b \quad\implies\quad A\vec x\colorOne{\mathbf{C}}=\vec b\colorOne{\mathbf{C}}
PAGE BREAK

Solving Linear Systems Using Inverse

Write the matrix equation for the linear system: Ax=bA \vec x = \vec b.
Wize Concept
Recall:
  • AA is the coefficient matrix
  • x\vec x is the solution vector
  • b\vec b is the constant vector (the augmented column of [ A  b ][\ A\ |\ \vec b\ ])

Rearrange to solve for x\vec x, the solution vector, by cancelling AA on the LHS:
Ax=bA1A=I x=A1bIx=A1b\begin{aligned} A \vec x &= \vec b\\[0.5em] \underbrace{\colorOne{A^{-1}}A}_{=I} \ \vec x &= \colorOne{A^{-1}}\vec b\\[0.5em] I \vec x &= A^{-1}\vec b \end{aligned}
x=A1b\boxed{\quad \vec x = A^{-1}\vec b \quad}
Steps
  1. Write the system of linear equations as a matrix equation 𝐴x=b𝐴\vec{x} = \vec b.
  2. Find A1A^{-1}.
  3. The solution is x=A1b\vec x=A^{-1}b.

0:00 / 0:00

Example: Solving Linear Systems Using Inverse

A=[121011210],A1=[111221231],b=[034]A= \left[\begin{array}{rrr} 1&2&1\\ 0&1&1\\ 2&1&0 \end{array}\right] ,\quad A^{-1}= \left[\begin{array}{rrr} -1&1&1\\ 2&-2&-1\\ -2&3&1 \end{array}\right] ,\quad \vec b= \left[\begin{array}{r} 0\\ -3\\ 4 \end{array}\right]
Find the solution(s) to the linear system Ax=bA \vec x = \vec b.
The linear system we want to solve can be written:
x+2y+z=0y+z=32x+y=4\begin{array}{rcr} x+2y+z&=&0\\[0.5em] y+z&=&-3\\[0.5em] 2x+y&=&4 \end{array}
In matrix form, we have:
Ax=b    [121011210][xyz]=[034]A\vec x = \vec b \quad\implies\quad \left[\begin{array}{rrr} 1&2&1\\ 0&1&1\\ 2&1&0 \end{array}\right] \left[\begin{array}{c} x\\ y\\ z \end{array}\right] = \left[\begin{array}{r} 0\\ -3\\ 4 \end{array}\right]
We have been given the inverse of AA, so AA must be invertible.
Wize Concept
Recall: since AA is invertible, the linear system Ax=bA\vec x = \vec b must have a unique solution.

Ax=b    x=A1b    [xyz]=[111221231][034]    [xyz]=[125]\begin{array}{rrcll} A \vec x = \vec b &\quad \implies \quad& \vec x &=& A^{-1}\vec b\\[1em] &\quad \implies \quad& \left[\begin{array}{r} x\\ y\\ z \end{array}\right] &=& \left[\begin{array}{rrr} -1&1&1\\ 2&-2&-1\\ -2&3&1 \end{array}\right] \left[\begin{array}{r} 0\\ -3\\ 4 \end{array}\right]\\[2em] &\quad \implies \quad& \left[\begin{array}{r} x\\ y\\ z \end{array}\right] &=& \boxed{ \left[\begin{array}{r} 1\\ 2\\ -5 \end{array}\right] } \end{array}
0:00 / 0:00

Example: Solving Matrix Equations

Find the matrix CC such that:
(I2C[2413])1=[3111]\left( I-2C \left[\begin{array}{rr} 2&4\\ -1&-3 \end{array}\right] \right)^{-1} = \left[\begin{array}{rr} 3&1\\ 1&1 \end{array}\right]
Writing the equation symbolically:
(I2CA)1=B\left(I-2CA\right)^{-1} =B, where A=[2413],B=[3111]A= \left[\begin{array}{rr} 2&4\\ -1&-3 \end{array}\right] ,\quad B= \left[\begin{array}{rr} 3&1\\ 1&1 \end{array}\right]
Take the inverse of both sides to cancel the inverse on the LHS:
I2CA=B1I-2CA =B^{-1}
We are trying to isolate CC, so subtract II from both sides:
2CA=B1I-2CA=B^{-1}-I
Multiply both sides by the scalar 12-\dfrac{1}{2}:
CA=12(B1I)CA = -\dfrac{1}{2}(B^{-1}-I)
Right multiply both sides by A1A^{-1} to cancel AA on the LHS:
CAA1=12(B1I)A1    CI=12(B1I)A1      C=12(B1I)A1\begin{aligned} CA\colorOne{A^{-1}} &= -\dfrac{1}{2}(B^{-1}-I) \colorOne{A^{-1}}\\[1em] \implies \quad C\colorOne{I} &= -\dfrac{1}{2}(B^{-1}-I) \colorOne{A^{-1}}\\[1em] \implies \quad \ \ C &= -\dfrac{1}{2}(B^{-1}-I)\colorOne{A^{-1}} \end{aligned}
We can now compute CC (use the formula for 2×22 \times 2 matrices to find B1, A1B^{-1}, \ A^{-1}):
B1=[3111]1=12[1113]=[12121232]B^{-1} = \left[\begin{array}{rr}3&1\\1&1\end{array}\right]^{-1} = \dfrac{1}{2}\left[\begin{array}{rr}1&-1\\-1&3\end{array}\right] = \left[\begin{array}{rr}\frac{1}{2}&-\frac{1}{2}\\[0.5em]-\frac{1}{2}&\frac{3}{2}\end{array}\right]
12(B1I) = 12([12121232][1001]) = 12[12121212] = [14141414]-\dfrac{1}{2}(B^{-1}-I) \ =\ -\dfrac{1}{2}\left(\left[\begin{array}{rr}\frac{1}{2}&-\frac{1}{2}\\[0.5em]-\frac{1}{2}&\frac{3}{2}\end{array}\right]-\left[\begin{array}{rr}1&0\\[0.5em]0&1\end{array}\right]\right) \ =\ -\dfrac{1}{2}\left[\begin{array}{rr}-\frac{1}{2}&-\frac{1}{2}\\[0.5em]-\frac{1}{2}&\frac{1}{2}\end{array}\right] \ =\ \colorOne{ \left[\begin{array}{rr}\frac{1}{4}&\frac{1}{4}\\[0.5em]\frac{1}{4}&-\frac{1}{4}\end{array}\right] }
A1=[2413]1=12[3412]=[322121]A^{-1}=\left[\begin{array}{rr}2&4\\-1&-3\end{array}\right]^{-1} = \dfrac{1}{-2}\left[\begin{array}{rr}-3&-4\\1&2\end{array}\right] = \colorTwo{ \left[\begin{array}{rr}\frac{3}{2}&2\\[0.5em]-\frac{1}{2}&-1\end{array}\right] }
C = 12(B1I)A1 = [14141414][322121] = [14141234]C \ =\ \colorOne{-\dfrac{1}{2}(B^{-1}-I)} \colorTwo{A^{-1}} \ =\ \colorOne{ \left[\begin{array}{rr}\frac{1}{4}&\frac{1}{4}\\[0.5em]\frac{1}{4}&-\frac{1}{4}\end{array}\right] } \colorTwo{ \left[\begin{array}{rr}\frac{3}{2}&2\\[0.5em]-\frac{1}{2}&-1\end{array}\right] } \ =\ \left[\begin{array}{rr}\frac{1}{4}&\frac{1}{4}\\[0.5em]\frac{1}{2}&\frac{3}{4}\end{array}\right]
 C=[14141234]\therefore \ \boxed{C=\left[\begin{array}{rr}\frac{1}{4}&\frac{1}{4}\\[0.5em]\frac{1}{2}&\frac{3}{4}\end{array}\right]}

Solve the following system of linear equations using the inverse of the coefficient matrix.
3x+4y=12xy=0\begin{array}{rrr} 3x+4y&=&1\\ -2x-y&=&0 \end{array}
Let [3104]\begin{bmatrix} 3&-1\\ 0&4 \end{bmatrix} be the inverse of the matrix [abcd]\begin{bmatrix} a&b\\c&d \end{bmatrix}.

Find the solution to the following system of linear equations:
ax+by=2cx+dy=2\begin{array}{rrr} ax+by&=&-2\\ cx+dy&=&2 \end{array}
Solve for AA in the following equation:
A[1225]=I2[2302]A \left[ \begin{array}{rr} -1&2\\ 2&-5 \end{array} \right] = I_2- \left[ \begin{array}{rr} 2&-3\\ 0&2 \end{array} \right]
[Fill in the entries for matrix AA]
Extra Practice