An equation with two unknown has two variables. For a linear equation with 2 unknowns, we can solve two variables if we are given two equations.

For example, if we are only given \(2x + y = 5 \), we CANNOT solve it! We need one more equation to solve for both \(x\) and \(y\).

If we have two equations, namely \(2x + y = 5 \) and \(6x-y = 3 \), we can solve for both \(x\) and \(y\)!

If we plot the two equations on a graph, it shows as this:

Notice that the lines converge at (1, 3)! It means for \(2x + y = 5 \) and \(6x-y = 3 \), the solution is \(x=1\) and \(y=3\). (where the lines meet)

Method 1 – Substitution

The basic rule:  Express one unknown in terms of the other!   What do we mean by this? See an example below.

Example Solve for \(x\) and \(y\).
Equation (1) \(\quad 3x-2y=6\)
Equation (2) \(\quad x-y=1\)

 Solution  From Equation (2), express the equation in terms of \(x\).
\(x-y=1 \\ \, \\ x-y {\color{red}{+y}}=1 {\color{red}{+y}} \\ \, \\ x=1+y \\ \, \\ \)
Now substitute this \(x\) value into Equation (1).
\( 3x-2y=6 \\ \, \\ 3 \underbrace{(1+y)}_{\substack{\text{From} \\ \text{Equation (2)}}} – 2y = 6 \\ \, \\ \underbrace{3+3y-2y}_{\text{Expand}} = 6 \\ \, \\ 3+y = 6 \\ \, \\ 3+y {\color{red}{-3}} = 6 {\color{red}{-3}} \\ \, \\ y = 3 \\ \, \\ \)
We are not done yet! We need to find the value of \(x\).
From Equation (2), substitute the value of \(y\) we just found.
\( x=1+y \\ \, \\ x = 1+ 3 \\ \, \\ x = 4 \\ \, \\\)
Answer: \( x=4 \), \( y=3 \)


Solve \(x\) and \(y\).
\(3x+2y = 17\)
\(x – y = 4\)
Answer
Let
Equation (1) \(\quad 3x+2y = 17\)
Equation (2) \(\quad x – y = 4\)

From Equation (2), express the equation in terms of \(x\).
\(x – y = 4 \\ \, \\ x-y {\color{red}{+y}}=4 {\color{red}{+y}} \\ \, \\ x=4+y \\ \, \\ \)
Now substitute this \(x\) value into Equation (1).
\( 3x+2y = 17 \\ \, \\ 3 \underbrace{(4+y)}_{\substack{\text{From} \\ \text{Equation (2)}}} + 2y = 17 \\ \, \\ \underbrace{12 + 3y}_{\text{Expand}} +2y = 17 \\ \, \\ 12+5y = 17 \\ \, \\ 12+5y {\color{red}{-12}} = 17 {\color{red}{-12}} \\ \, \\ 5y = 5 \\ \, \\ \dfrac{5y}{{\color{red}{5}}} = \dfrac{5}{{\color{red}{5}}} \\ \, \\ y = 1 \\ \, \\ \)
Substitute \(y\) into either Equation (1) or Equation (2) to find \(x\).
\( x=5, y=1\)


Solve \(x\) and \(y\).
\(7x – 2y = 20\)
\(2x+y = 1\)
Answer
Let
Equation (1) \(\quad 7x – 2y = 20\)
Equation (2) \(\quad 2x+y = 1\)

From Equation (2), express the equation in terms of \(y\) because it’s easier.
\(2x+y = 1 \\ \, \\ 2x+y {\color{red}{-y}}=1 {\color{red}{-y}} \\ \, \\ y = 1 – 2x \\ \, \\ \)
Now substitute this \(y\) value into Equation (1).
\( 7x – 2y = 20 \\ \, \\ 7x- 2 \underbrace{(1 – 2x)}_{\substack{\text{From} \\ \text{Equation (2)}}} = 20 \\ \, \\ 7x \underbrace{-2+ 4x}_{\text{Expand}} = 20 \\ \, \\ 11x – 2 = 20 \\ \, \\ 11x – 2 {\color{red}{+2}} = 20 {\color{red}{+2}} \\ \, \\11x = 22 \\ \, \\ \dfrac{11x}{{\color{red}{11}}} = \dfrac{22}{{\color{red}{11}}} \\ \, \\ x = 2 \\ \, \\ \)
Substitute \(x\) into either Equation (1) or Equation (2) to find \(y\).
\( x=2, y=-3\)


Method 2 – Combining Equations

You can also solve \(x\) and \(y\) with combination method. Add or subtract the equations to eliminate a variable!
Example Solve for \(x\) and \(y\).
Equation (1) \(\quad x-2y=7\)
Equation (2) \(\quad 2x+2y=5\)

 Solution  Notice that if we add Equations (1) and (2), we can eliminate \(y\).
\( \begin{align*} \quad & x-2y=7 & \\ +\quad & \underline{2x+2y=5} & \color{red}{\text{add!}}\\ \quad & 3x=12 & \end{align*} \)

\( \require{cancel} \dfrac{\cancel{{\color{red}{3}}}x}{\cancel{{\color{red}{3}}}} = \dfrac{\cancelto{4}{{\color{red}{12}}}}{\cancel{{\color{red}{3}}}} \\ \, \\ x=4 \)

Now substitute this \(x\) value into either Equation (1) or (2).
\( x-2y=7 \quad \text{Equation (1)} \\ \, \\ \underbrace{4}_{\substack{x=4}} -2y = 7 \\ \, \\ 4-2y\color{red}{-4} = 7 \color{red}{-4} \\ \, \\ -2y = 3 \\ \, \\ y = -\dfrac{3}{2} \)

Answer: \( x=4 \), \( y = -\dfrac{3}{2} \)

Solve \(x\) and \(y\) using the combination method.
\(4x+y = 14\)
\(3x+y = 3\)
Answer
Because both equations have \(+x\), subtracting may work well.
\( \begin{align*} \quad & 4x+y = 14 & \\ -\quad & \underline{3x+y = 3} & \color{red}{\text{subtract!}}\\ \quad & x = 11 & \end{align*} \)

Now substitute this \(x\) value into either Equation (1) or (2).
\( 4x+y = 14 \qquad \text{Equation (1)} \\ \, \\ \underbrace{(4)(11)}_{\substack{x=11}} +y = 14 \\ \, \\ 44+y = 14 \\ \, \\ 44+y\color{red}{-44} = 14 \color{red}{-44} \\ \, \\ y = -30 \)

Answer: \( x=11 \), \( y = -30 \)


Solve \(x\) and \(y\) using the combination method.
\(6x-2y = 9\)
\(7x+4y = 20\)
Answer
In order for the addition of two equations to work, we need to multiply Equation (1) by 2 to produce the same \(4y\).
\( \begin{align*} \color{red}{2 \times} \quad & (6x-2y = 9) & \\ \quad & \underline{7x+4y = 20} & \\ \quad & \qquad ? & \end{align*} \)

\( \begin{align*} \quad & 12x -4y = 18 & \\ \color{red}{+}\quad & \underline{7x+4y = 20} & \color{red}{\text{add!}}\\ \quad & 19x = 38 & \end{align*} \)

\( \require{cancel} \dfrac{\cancel{{\color{red}{19}}}x}{\cancel{{\color{red}{19}}}} = \dfrac{\cancelto{2}{{\color{red}{38}}}}{\cancel{{\color{red}{19}}}} \\ \, \\ x=2 \)

Now substitute this \(x\) value into either Equation (1) or (2).
\( 6x-2y = 9 \qquad \text{Equation (1)} \\ \, \\ \underbrace{(6)(2)}_{\substack{x=11}} -2y = 9 \\ \, \\ 12 – 2y = 9 \\ \, \\ 12-2y\color{red}{-12} = 9 \color{red}{-12} \\ \, \\ -2y = -3 \\ \, \\ y = \dfrac{3}{2} \)

Answer: \( x=2 \), \( y = \dfrac{3}{2} \)

← Linear Equations with 1 Unknown Practice → NEXT: Linear Equations with 2 Unknowns Practice