Systems of equations in two variables
A system of equations is a set of equations with the same unknowns. A solution of the system is a set of values that makes every equation true. In two variables, a solution is an ordered pair ${(x,y)}$.
For example, ${(2,3)}$ is a solution of the system
$\begin{cases}2x+y=7\\x-3y=-7\end{cases}$
because ${2(2)+3=7}$ and ${2-3(3)=-7}$. The pair ${(3,1)}$ is not a solution: it makes the first equation true, but ${3-3(1)=0}$, not ${-7}$.
What a solution looks like
Each linear equation in ${x}$ and ${y}$ has a line as its graph. A solution of the system is on both lines, so it is a point where the lines meet. Two lines can meet in three ways:
A system of two linear equations in two variables has exactly one solution, no solution, or infinitely many solutions.
A system with no solution is called inconsistent. A system with infinitely many solutions is called dependent.
The substitution method
- Solve one equation for one variable.
- Substitute that expression into the other equation. This gives an equation in one variable.
- Solve it.
- Put the value back into the expression from step 1 to find the other variable.
Example 1: Solve the system by substitution.
$\begin{cases}2x+y=7\\x-3y=-7\end{cases}$
Solution:
Solve the first equation for ${y}$: ${y=7-2x}$.
Substitute this into the second equation, and solve for ${x}$:
$\begin{align*}x-3(7-2x)&=-7\\x-21+6x&=-7\\7x&=14\\x&=2\end{align*}$
Then ${y=7-2(2)=3}$. The solution is ${(2,3)}$.
Check: ${2(2)+3=7}$ and ${2-3(3)=-7}$.
The elimination method
Adding two true equations gives another true equation. The idea is to add the equations so that one variable cancels.
- Multiply one or both equations by numbers, so that the coefficients of one variable are opposites.
- Add the equations. That variable is eliminated.
- Solve for the remaining variable.
- Put its value into one of the original equations to find the other variable.
Example 2: Solve the system by elimination.
$\begin{cases}3x+4y=10\\5x-2y=8\end{cases}$
Solution:
The ${y}$-coefficients are ${4}$ and ${-2}$. Multiply the second equation by ${2}$, so they become ${4}$ and ${-4}$:
$\begin{cases}3x+4y=10\\10x-4y=16\end{cases}$
Add the two equations. The ${y}$-terms cancel:
$\begin{align*}13x&=26\\x&=2\end{align*}$
Put ${x=2}$ into the first equation:
$\begin{align*}6+4y&=10\\y&=1\end{align*}$
The solution is ${(2,1)}$.
Check: ${5(2)-2(1)=8}$.
Watch out: When you multiply an equation, multiply every term, including the number on the right side.
No solution or infinitely many solutions
Sometimes both variables cancel. Then the result tells which case you have:
A false statement, such as ${0=11}$: the system has no solution.
A true statement, ${0=0}$: the system has infinitely many solutions.
Example 3: Solve the system.
$\begin{cases}2x-y=3\\-4x+2y=5\end{cases}$
Solution:
Multiply the first equation by ${2}$, and add it to the second:
$\begin{align*}4x-2y&=6\\-4x+2y&=5\\\hline 0&=11\end{align*}$
This is false, so the system has no solution. The two lines, ${y=2x-3}$ and ${y=2x+\dfrac{5}{2}}$, have the same slope. They are parallel.
Example 4: Solve the system.
$\begin{cases}x-2y=4\\-3x+6y=-12\end{cases}$
Solution:
Multiply the first equation by ${3}$, and add it to the second:
$\begin{align*}3x-6y&=12\\-3x+6y&=-12\\\hline 0&=0\end{align*}$
This is always true. The second equation is just ${-3}$ times the first, so both describe the same line. Every point on the line ${x-2y=4}$ is a solution.
To list the solutions, let ${y}$ be any number ${t}$. Then ${x=2t+4}$. The solutions are all pairs
${(2t+4,\ t)}$, where ${t}$ is any real number.
For example, ${t=0}$ gives ${(4,0)}$, and ${t=1}$ gives ${(6,1)}$.
Applications
For a word problem with two unknowns, name the unknowns, and write one equation for each fact.
Example 5: A school play sold ${500}$ tickets. Adult tickets cost ${\$12}$, and child tickets cost ${\$7}$. The total income was ${\$4850}$. How many tickets of each kind were sold?
Solution:
Let ${a}$ be the number of adult tickets, and ${c}$ the number of child tickets. There are two facts: the number of tickets, and the money.
$\begin{cases}a+c=500\\12a+7c=4850\end{cases}$
From the first equation, ${c=500-a}$. Substitute it into the second:
$\begin{align*}12a+7(500-a)&=4850\\12a+3500-7a&=4850\\5a&=1350\\a&=270\end{align*}$
Then ${c=500-270=230}$. So ${270}$ adult tickets and ${230}$ child tickets were sold.
Check: ${12(270)+7(230)=3240+1610=4850}$.
Example 6: A boat travels ${36}$ km down a river in ${2}$ hours. The return trip, against the current, takes ${3}$ hours. Find the speed of the boat in still water, and the speed of the current.
Solution:
Let ${b}$ be the speed of the boat in still water, and ${c}$ the speed of the current, in km/h. Going downstream, the current helps, so the speed is ${b+c}$. Going upstream, it slows the boat, so the speed is ${b-c}$.
Speed is distance divided by time:
${b+c=\dfrac{36}{2}=18}$
${b-c=\dfrac{36}{3}=12}$
Add the two equations: ${2b=30}$, so ${b=15}$. Then ${c=18-15=3}$.
The boat goes ${15}$ km/h in still water, and the current flows at ${3}$ km/h.
Nonlinear systems
If an equation in the system is not linear, the graphs can be curves. They can meet at more than one point. Substitution usually works best.
Example 7: Solve the system.
$\begin{cases}x^2+y^2=25\\x+y=7\end{cases}$
Solution:
Solve the linear equation for ${y}$: ${y=7-x}$. Substitute it into the first equation:
$\begin{align*}x^2+(7-x)^2&=25\\x^2+49-14x+x^2&=25\\2x^2-14x+24&=0\\x^2-7x+12&=0\\(x-3)(x-4)&=0\end{align*}$
So ${x=3}$ or ${x=4}$.
If ${x=3}$, then ${y=7-3=4}$. If ${x=4}$, then ${y=3}$. The solutions are ${(3,4)}$ and ${(4,3)}$.
Summary
- A solution of a system makes every equation true. In two variables, it is a point on every graph.
- Two linear equations have one solution, no solution, or infinitely many solutions.
- Substitution: solve one equation for a variable, and substitute it into the other.
- Elimination: multiply the equations so a variable cancels when you add them.
- If both variables cancel, ${0=c}$ with ${c\ne 0}$ means no solution, and ${0=0}$ means infinitely many.
← Practice questionsSystems of linear equations in three variables →