<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# Writing and Solving a Matrix Equation for a Linear System

## Convert linear systems to matrices and solve

Estimated6 minsto complete
%
Progress
Practice Writing and Solving a Matrix Equation for a Linear System

MEMORY METER
This indicates how strong in your memory this concept is
Progress
Estimated6 minsto complete
%
Writing and Solving a Matrix Equation for a Linear System

On Friday, an ice cream shop sold 15 small chocolate cones and 25 X-large chocolate cones. It also sold 20 small vanilla cones and 50 X-large vanilla cones. The shop's chocolate sales for the day totaled $220 and its vanilla sales totaled$410. How much did the shop charge for a small cone versus an X-large cone?

### Matrix Equations

Look at the system:

3x5y7xy=11=15.\begin{align*}3x-5y &= 11\\ 7x-y &= 15.\end{align*}

Working backwards, this system can be written as the matrix equation:

[3751][xy]=[1115]\begin{align*}\begin{bmatrix} 3 & -5\\ 7 & -1 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} = \begin{bmatrix} 11 \\ 15 \end{bmatrix}\end{align*} where the variables, \begin{align*}x\end{align*} and \begin{align*}y\end{align*} are the components of a variable matrix for which we can solve using an inverse as shown:

\begin{align*}\frac{1}{32} \begin{bmatrix} -1 & 5\\ -7 & 3 \end{bmatrix} \begin{bmatrix} 3 & -5 \\ 7 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} &= \frac{1}{32} \begin{bmatrix} -1 & 5\\ -7 & 3 \end{bmatrix} \begin{bmatrix} 11\\ 15 \end{bmatrix}\\ \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} &= \frac{1}{32}\begin{bmatrix} 64\\ -32 \end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= \begin{bmatrix} 2\\ -1 \end{bmatrix}\end{align*}

In general, any system of linear equations in two variables can be written as a matrix equation that can then be solved using inverses. The coefficients of \begin{align*}x\end{align*} and \begin{align*}y\end{align*} form a \begin{align*}2 \times 2\end{align*} matrix and the constants form a \begin{align*}2 \times 1\end{align*} matrix as shown below.

\begin{align*}ax+by &= e \quad \Rightarrow \quad \begin{bmatrix} a & b\\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e \\ f \end{bmatrix}\\ cx+dy &= f\end{align*}

If we let \begin{align*}A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \ X= \begin{bmatrix} x \\ y \end{bmatrix}\end{align*} and \begin{align*}B=\begin{bmatrix} e \\ f \end{bmatrix},\end{align*} then we could write the equation as \begin{align*}AX=B\end{align*}. Now we can see what happens when we multiply both sides by \begin{align*}A^{-1}\end{align*}:

\begin{align*}A^{-1} AX &= A^{-1} B\\ IX &= A^{-1} B\\ X &= A^{-1} B\end{align*}

So, we can find the matrix, \begin{align*}X\end{align*}, by “left multiplying” the matrix, \begin{align*}B\end{align*}, by \begin{align*}A^{-1}\end{align*}.

Solve the following systems using matrices.

1.       \begin{align*}3x+4y &= -14\\ -2x + y &= -9\end{align*}

First, let’s translate the system into a matrix equation:

\begin{align*}\begin{bmatrix} 3 & 4 \\ -2 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} -14\\ -9 \end{bmatrix}\end{align*}

Now we can “left multiply” both sides by the inverse of the coefficient matrix and solve:

\begin{align*}\begin{bmatrix} x \\ y \end{bmatrix} &= \frac{1}{11} \begin{bmatrix} 1 & -4 \\ 2 & 3 \end{bmatrix} \begin{bmatrix} -14\\ -9 \end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= \frac{1}{11} \begin{bmatrix} 22\\ -55 \end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= \begin{bmatrix} 2 \\ -5 \end{bmatrix}\\\end{align*}

Therefore, the solution is (2, -5).

1.

\begin{align*}-5x-2y &= 1\\ 3x+y &= -2\end{align*}

First, let’s translate the system into a matrix equation:

\begin{align*}\begin{bmatrix} -5 & -2 \\ 3 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \\ -2 \end{bmatrix}\end{align*}

Now we can “left multiply” both sides by the inverse of the coefficient matrix and solve:

\begin{align*}\begin{bmatrix} x \\ y \end{bmatrix} &= \frac{1}{1} \begin{bmatrix} 1 & 2\\ -3 & -5 \end{bmatrix} \begin{bmatrix} 1\\ -2 \end{bmatrix}\\ \begin{bmatrix} x\\ y \end{bmatrix} &= 1 \begin{bmatrix} -3 \\ 7 \end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= \begin{bmatrix} -3 \\ 7 \end{bmatrix} \end{align*}

Therefore, the solution is (-3, 7).

1.
\begin{align*}3x-2y &= 3\\ -6x+4y &= 5\end{align*}

First, let’s translate the system into a matrix equation:

\begin{align*}\begin{bmatrix} 3 & -2 \\ -6 & 4 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 3 \\ 5 \end{bmatrix}\end{align*}

What happens this time when we try to find the inverse of the coefficient matrix?

\begin{align*} \frac{1}{0} \begin{bmatrix} 4 & 2 \\ 6 & 3 \end{bmatrix}\end{align*}

The inverse does not exist so there is no unique solution to the system. Now we must use an alternative method to determine whether there are infinite solutions or no solution. Let’s use linear combination:

\begin{align*}& \ 2(3x-2y=3) \quad \Rightarrow \ \ \cancel{6x} - 4y = 6\\ & -6x+4y = 5 \qquad \quad \underline{- \cancel{6x} +4y = 5 \; \;}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \ 0=11\end{align*}

Therefore, there is no solution.

### Examples

#### Example 1

Earlier, you were asked to find the cost of a small cone and an X-large cone.

The system of equations represented by this situation is

\begin{align*}15x + 25y &= 220\\ 20x + 50y &= 410\end{align*}

First, let’s translate the system into a matrix equation:

\begin{align*}\begin{bmatrix} 15 & 25 \\ 20 & 50 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 220 \\ 410 \end{bmatrix}\end{align*}

Now we can “left multiply” both sides by the inverse of the coefficient matrix and solve:

\begin{align*}\begin{bmatrix} x \\ y \end{bmatrix} &= \frac{1}{250} \begin{bmatrix} 50 & -25\\ -20 & 15 \end{bmatrix} \begin{bmatrix} 220\\ 410 \end{bmatrix}\\ \begin{bmatrix} x\\ y \end{bmatrix} &= \frac{1}{250} \begin{bmatrix} 750 \\ 750 \end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= \begin{bmatrix} 3 \\ 7 \end{bmatrix} \end{align*}

Therefore, the shop charges $3 for a small cone and$7 for an X-large cone.

#### Example 2

Solve the following system using matrices.

\begin{align*}2x+y &= -5\\ -3x-2y &= 2\end{align*}

Translate to a matrix equation and solve.

\begin{align*}\begin{bmatrix} 2 & 1 \\ -3 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} &= \begin{bmatrix} -5 \\ 2\end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= \frac{1}{-1} \begin{bmatrix} -2 & -1 \\ 3 & 2 \end{bmatrix} \begin{bmatrix} -5 \\ 2\end{bmatrix}\\ \begin{bmatrix} x \\ y \end{bmatrix} &= -1 \begin{bmatrix} 8\\ -11 \end{bmatrix} \\ \begin{bmatrix} x \\ y \end{bmatrix} &= \begin{bmatrix} -8 \\ 11 \end{bmatrix}\end{align*}

Therefore, the solution is (-8, 11).

#### Example 3

Solve the following system using matrices.
\begin{align*}7x-y &= 8\\ 3y &= 21x-24\end{align*}

First, rewrite the second equation as \begin{align*}-21x+3y=-24\end{align*} so the coefficient matrix can be identified.

\begin{align*}\begin{bmatrix} 7 & -1 \\ -21 & 3 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 8 \\ -24 \end{bmatrix},\end{align*}

However \begin{align*}\begin{bmatrix} 7 & -1 \\ -21 & 3 \end{bmatrix}^{-1}\end{align*} does not exist. Using linear combinations:

\begin{align*}& \quad \ 3(7x-y=8) \quad \Rightarrow \quad \ \cancel{21x} -3y =24\\ & -21x +3y =-24 \qquad \ \underline{- \cancel{21x} +3y =-24 \;}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad 0=0 \end{align*}

Therefore, there are infinite solutions.

#### Example 4

Solve the following system using matrices.

\begin{align*}4x+5y &= 5\\ -8x+15y &= 5\end{align*}

Translate to a matrix equation and solve.

\begin{align*}\begin{bmatrix} 4 & 5\\ -8 & 15 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} &= \begin{bmatrix} 5\\ 5 \end{bmatrix}\\ \begin{bmatrix} x\\ y \end{bmatrix} &= \frac{1}{100} \begin{bmatrix} 15 & -5\\ 8 & 4 \end{bmatrix} \begin{bmatrix} 5 \\ 5 \end{bmatrix}\\ \begin{bmatrix} x\\ y \end{bmatrix} &= \frac{1}{100} \begin{bmatrix} 50\\ 60 \end{bmatrix}\\ \begin{bmatrix} x\\ y \end{bmatrix} &= \begin{bmatrix} \frac{1}{2}\\ \frac{3}{5} \end{bmatrix}\end{align*}

Therefore, the solution is \begin{align*}\left( \frac{1}{2} , \frac{3}{5} \right)\end{align*} .

### Review

Solve the systems of linear equations using matrices.

1. \begin{align*}2x+13y &= -29\\ 4x-3y &= 29\end{align*}
2. \begin{align*}3x-7y &= 98\\ -2x+5y &= -69\end{align*}
3. \begin{align*}7x-9y &= 31\\ 10x+5y &= -45\end{align*}
4. \begin{align*}3x-2y &= 1\\ 7x-5y &= -2\end{align*}
5. \begin{align*}3x-5y &= 2\\ -9x+15y &= 4\end{align*}
6. \begin{align*}4x-3y &= -5\\ 12x+9y &= -3\end{align*}
7. \begin{align*}6x+9y &= -3\\ -5x-7y &= -1\end{align*}
8. \begin{align*}x+4y &= 7\\ -2x &= 8y -14\end{align*}
9. \begin{align*}x+y &= 45\\ -3x+2y &= -10\end{align*}
10. \begin{align*}4x+6y &= 8\\ -9y &= 2x-2\end{align*}
11. \begin{align*}2x-y &= -30\\ x+2y &= 10\end{align*}
12. \begin{align*}14x-7y &= -1\\ 7x+21y &= 10\end{align*}
13. \begin{align*}-3x+4y &= 5\\ 2x-y &= -10\end{align*}
14. \begin{align*}6x-12y &= -18\\ 5x-10y &= -15\end{align*}
15. Tommy and Max start a lawn care business. They both charge by the hour for mowing and raking leaves. One week Tommy mowed lawns for 10 hours and raked leaves for 6 hours and earned a total of $114. In the same week, Max mowed lawns for 8 hours and raked leaves for 9 hours and earned a total of$118.50. Assuming they both charge the same rates for each of their services, how much do they charge per hour for mowing? For raking leaves?

To see the Review answers, open this PDF file and look for section 4.11.

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes