<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>7.3.25 (Solve sim. eqns. with matrix inverse)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<h3>Example</h3>

<p>Solve the following simultaneous equations by finding the inverse of the appropriate matrix,
\[
\begin{align*}
&3x + 2y = 7
\\
&5x - y = 3
\end{align*}
\]</p>

<h3>Solution</h3>

<p>Note that we can write these simultaneous equations in terms of matrices as
\[
\begin{bmatrix}
3 & 2
\\
5 & -1 
\end{bmatrix}
\begin{bmatrix}
x
\\
y
\end{bmatrix} = \begin{bmatrix}
7
\\
3
\end{bmatrix},
\]
we can multiply these matrices to check this is the correct matrix form of the equations. In order to solve this we therefore have to obtain the inverse of the matrix 
\[
A  = \begin{bmatrix}
3 & 2
\\
5 & -1 
\end{bmatrix}
\]
then multiply the equations on the left by this inverse. So using the formula for the inverse of a \(2 \times 2\) matrix we obtain
\[
A^{-1} = \begin{bmatrix}
-\frac{1}{13} & \frac{2}{13}
\\
\frac{5}{13} & -\frac{3}{13} 
\end{bmatrix}.
\]
Hence multiplying the matrix equation above on the left we have 
\[
A^{-1}A \mathbf{x} = A^{-1}\mathbf{b} \implies \mathbf{x} = A^{-1}\mathbf{b} \implies \begin{bmatrix}
x
\\
y
\end{bmatrix}  = A^{-1} = \begin{bmatrix}
-\frac{1}{13} & \frac{2}{13}
\\
\frac{5}{13} & -\frac{3}{13} 
\end{bmatrix} \begin{bmatrix}
7
\\
3
\end{bmatrix}.
\]
Performing this matrix multiplication we obtain the values for \(\mathbf{x}\):
\[
\begin{bmatrix}
x
\\
y
\end{bmatrix} =
\begin{bmatrix}
1
\\
2
\end{bmatrix}.
\]
In other words, the solution to our simultaneous equations is \(x = 1, y = 2\).</p>
<br/>
<p>Why don't we solve these equations by substitution to check the answers? Rearrange the second equation to get \(y = 5x-3\) substituting this into the first equation we get 
\[
3x + 2(5x-3) = 3x + 10x - 6 = 7 \implies 13x = 13 \implies x=1.
\]
Substituting this into the second equations we get \(y = 5(1) -3 = 2\). So we have solved the equations successfully using matrices above. </p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
