Toggle Main Menu Toggle Search

### Solving Matrix Equations

#### Definition

Given matrices $\mathbf{A}$ and $\mathbf{B}$, we can solve the equation $\mathbf{A} \mathbf{X} = \mathbf{B}$ for the unknown matrix $\mathbf{X}$ when the matrix inverse of $\mathbf{A}$ exists.

We do this by multiplying both sides of the equation on the left by $\mathbf{A}^{-1}$, providing it exists, to give \begin{align} \mathbf{A} \mathbf{X} &= \mathbf{B} \\ \mathbf{A}^{-1} \mathbf{A} \mathbf{X} &= \mathbf{A}^{-1} \mathbf{B} \\ \mathbf{X} &= \mathbf{A}^{-1} \mathbf{B} \end{align}

as $\mathbf{A}^{-1} \mathbf{A} = \mathbf{I}$ and multiplying any matrix by the identity matrix leaves it unaltered.

It is important that both sides of the equation are multiplied on the left by $\mathbf{A}^{-1}$ because matrix multiplication does not commute - multiplying on the right could give a different result.

#### Worked Example

###### Example 1

Let \begin{align} \mathbf{A} &= \begin{pmatrix}1&2\\3&-5\end{pmatrix}, \\ \mathbf{B} &= \begin{pmatrix}4\\1\end{pmatrix}. \end{align}

Solve the equation $\mathbf{A} \mathbf{X} = \mathbf{B}$.

###### Solution

We have the equation $\begin{pmatrix}1&2\\3&-5\end{pmatrix}\mathbf{X} = \begin{pmatrix}4\\1\end{pmatrix}$

To get $\mathbf{X}$ on its own, multiply both sides by the inverse of $\mathbf{A}$.

Note that $\lvert \mathbf{A} \rvert = -5-6 = -11$. Therefore,

$\mathbf{A}^{-1} = -\dfrac{1}{11}\begin{pmatrix} -5&-2\\-3&1\end{pmatrix}$

So

$\mathbf{X} = \mathbf{A}^{-1} \mathbf{B} = -\dfrac{1}{11}\begin{pmatrix} -5&-2\\-3&1\end{pmatrix}\begin{pmatrix}4\\1\end{pmatrix}$

Now, use matrix multiplication to find $\mathbf{X}$.

\begin{align} \mathbf{X} &= -\frac{1}{11}\begin{pmatrix} -5&-2\\-3&1\end{pmatrix}\begin{pmatrix}4\\1\end{pmatrix}\\ &= -\frac{1}{11}\begin{pmatrix}(-20)+(-2)\\(-12)+1\end{pmatrix}\\ &= -\frac{1}{11}\begin{pmatrix}-22\\-11\end{pmatrix}\\ &= \begin{pmatrix}2\\1\end{pmatrix} \end{align}

#### Simultaneous Equations

We can apply this method to solving a system of simultaneous equations by reformulating it as a matrix equation.

Let's take the simultaneous equations \begin{align} ax+by&=c\\ dx+ey&=f \end{align} where $x$ and $y$ are unknown.

We can write these as matrices: \begin{align} \begin{pmatrix} a & b\\ d & e \end{pmatrix} \begin{pmatrix} x\\ y \end{pmatrix} =\begin{pmatrix} c\\ f \end{pmatrix} \end{align} and solve using the method described above.

###### Example 1

Solve the set of simultaneous equations:

\begin{align} 2x+4y &= 2 \\ -3x+y &= 11 \end{align}

###### Solution

In matrix form, this is

$\begin{pmatrix}2&4\\-3&1\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}2\\11\end{pmatrix}$

First, calculate the inverse of $\mathbf{A} = \begin{pmatrix}2&4\\-3&1\end{pmatrix}$.

$\mathbf{A}^{-1} = \dfrac{1}{\bigl(2\times 1 - 4\times (-3)\bigl)} \begin{pmatrix} 1&-4\\3&2\end{pmatrix} = \dfrac{1}{14}\begin{pmatrix} 1&-4\\3&2\end{pmatrix}$

Then

\begin{align} \begin{pmatrix} x\\y\end{pmatrix} &= \frac{1}{14}\begin{pmatrix} 1&-4\\3&2\end{pmatrix} \begin{pmatrix}2\\11\end{pmatrix}\\\\ &= \frac{1}{14} \begin{pmatrix} 2+ -(44)\\6+22\end{pmatrix}\\\\ &= \frac{1}{14} \begin{pmatrix} -42\\28\end{pmatrix}\\\\ &= \begin{pmatrix}-3\\2\end{pmatrix} \end{align}

Hence, $x = -3$ and $y=2$.

#### Video Example

Sarah Jowett solves the matrix equation $\mathbf{A} \mathbf{X} = \mathbf{B}$ for $\mathbf{A}=\begin{pmatrix} 2&-2\\7&-8 \end{pmatrix}$ and $B=\begin{pmatrix}3\\-2\end{pmatrix}$.

#### Workbook

This workbook produced by HELM is a good revision aid, containing key points for revision and many worked examples.

#### More Support

You can get one-to-one support from Maths-Aid.