Table of Contents

Solving systems of linear equations

You know that to solve equations with one unknown like $2x + 4 = 7x$, you have to manipulate both sides of the equation until you isolate the unknown variable on one side. For the above equation we would subtract $2x$ from both sides to obtain: $4 = 5x$, which means that $x=\frac{4}{5}$.

What if you have two equations and two unknowns? For example: \[ \begin{align*} x + 2y & = 5, \nl 3x + 9y & = 21. \end{align*} \] Can you find values of $x$ and $y$ that satisfy these equations?

Concepts

These equations will look like:

  
  \[
  \begin{align*}
   a_1x + b_1y     & =  c_1, \nl
   a_2x + b_2y     & =  c_2,
  \end{align*}
  \]
  where the $a$s, $b$s and $c$s are given constants.

Principles

If you have $n$ equations and $n$ unknowns you can solve the equations simultaneously and find the values of the unknowns. There are different tricks which you can use to solve these equations simultaneously. We learn about three such tricks in this section.

Solution techniques

Solving by equating

We want to solve the following system of equations: \[ \begin{align*} x + 2y & = 5, \nl 3x + 9y & = 21. \end{align*} \]

We can isolate $x$ in both equations by moving all other variables and constants to the right sides of the equations: \[ \begin{align*} x & = 5 -2y, \nl x & = \frac{1}{3}(21 - 9y) = 7 - 3y. \end{align*} \]

The variable $x$ is still unknown, but we know two facts about it. We know that $x$ is equal to $5 - 2y$ and also that $x$ is equal to $7 - 3y$. So it must be that: \[ 5 - 2y = 7 -3y. \]

We can now solve for $y$ by adding $3y$ to both sides and subtracting $5$ from both sides to get $y = 2$.

We got $y=2$, but what is $x$? That is easy, we can plug in the value of $y$ that we found into any of the above equations. Say I pick the first one: \[ x = 5 - 2y = 5 - 2(2) = 1. \]

We are done, and $x=1,y=2$ is our solution.

Substitution

Let us go back to our set of equations: \[ \begin{align*} x + 2y & = 5, \nl 3x + 9y & = 21. \end{align*} \]

Looking at the first equation we can isolate $x$ to obtain: \[ \begin{align*} x & = 5 - 2y, \nl 3x + 9y & = 21. \end{align*} \]

If we substitute the top equation for $x$ into the bottom equation we will obtain: \[ 3(5-2y) + 9y = 21. \] We have just eliminated one of the unknowns by substitution. Let's do some massaging of this equation now. Expanding the bracket we get: \[ 15 - 6y +9y = 21, \] or \[ 3y = 6, \] which means that $y=2$. To get $x$, we use the original substitution $x = (5-2y)$ to get $x = (5-2(2)) = 1$.

Subtraction

There is a third way to solve the equations: \[ \begin{align*} x + 2y & = 5, \nl 3x + 9y & = 21. \end{align*} \]

Observe that we would not change the truth of any equation if we were to multiply it by some constant. For example, we can multiply the first equation by $3$ to obtain an equivalent set of equations: \[ \begin{align*} 3x + 6y & = 15, \nl 3x + 9y & = 21. \end{align*} \]

Why did I pick three as the multiplier? I chose this constant so that the first term (the $x$ term) now has the same coefficient in both equations.

If we subtract two true equations from each other we obtain another true equation. Let's do that. Let's subtract the top equation from the bottom one. We get: \[ 3x - 3x + 9y - 6y = 21 - 15 \quad \Rightarrow \quad 3y = 6. \] Did you see how the $3x$'s cancelled? That is why I originally chose to multiply the first equation by three. Now it is obvious that $y=2$, and substituting back into one of the original equations we have \[ x + 2(2) = 5, \] or moving the $2(2)=4$ to the other side we get $x=1$.

Discussion

These techniques can be extended to as many unknowns as you want. When we get to the chapter on linear algebra, we will learn a much more systematic way of solving this type of equations.