Chapter 0 ยท Preparing for Geometry

Solving Systems of Linear Equations

Find where two lines meet by graphing, substitution or elimination, and learn how to choose the method that fits.

25 min read

You already know that the graph of a linear equation in two variables is a line. Now you will work with two such equations at once.

A system of linear equations is a set of linear equations in the same variables that must all be true at the same time. In this lesson, each system has two equations in xx and yy. A solution of a system is an ordered pair that makes every equation in the system true.

For example, (1,4)(1, 4) is a solution of the system x+y=5x + y = 5 and 2x+y=62x + y = 6, because 1+4=51 + 4 = 5 and 2(1)+4=62(1) + 4 = 6. The pair (2,3)(2, 3) is not a solution. It makes x+y=5x + y = 5 true, but 2(2)+3=72(2) + 3 = 7, not 66. One true equation is not enough.

Key concept

A solution is a point on both lines

The graph of an equation is the set of all points whose coordinates make the equation true. So a point lies on a line exactly when its coordinates make that line's equation true.

This means the solutions of a system of two linear equations are exactly the points that lie on both lines. Graphing, substitution and elimination are three ways to find those same points.

To solve a system by graphing, draw both lines on one coordinate plane and look for a point they share. In the figure below, the horizontal axis is the xx-axis and the vertical axis is the yy-axis.

Slope is the change in yy over the change in xx, for a nonzero change in xx. A horizontal line has slope 00, and a vertical line has undefined slope.

Take the system y=2xโˆ’1y = 2x - 1 and y=โˆ’x+5y = -x + 5. Line A is y=2xโˆ’1y = 2x - 1, with slope 22, and it passes through Point A at (0,โˆ’1)(0, -1). Line B is y=โˆ’x+5y = -x + 5, with slope โˆ’1-1, and it passes through Point B at (0,5)(0, 5). The lines appear to cross at Point C, which looks like (2,3)(2, 3). A drawing only suggests this. It cannot prove exact coordinates. So call (2,3)(2, 3) a candidate: a possible solution that you must test in both equations.

Coordinate grid from x -2 to 6 and y -2 to 6, with a grid step of 1, showing 5 plotted elements. Details: line 2 x plus -1 y equals 1, named Line A; line 1 x plus 1 y equals 5, named Line B; point at (0, -1), named Point A; point at (0, 5), named Point B; point at (2, 3), named Point C.
Line A is y=2xโˆ’1y = 2x - 1 and Line B is y=โˆ’x+5y = -x + 5. Point C marks the candidate (2,3)(2, 3) that the next example tests.

Worked example

Solve by graphing

Given the system y=2xโˆ’1y = 2x - 1 and y=โˆ’x+5y = -x + 5, find its solution by graphing.

  1. Graph the first equation. The form y = mx + b describes a nonvertical line with slope m and y-intercept b, the y-value where the line meets the y-axis. So this line, Line A, has slope 2 and passes through (0, -1).

    y=2xโˆ’1y = 2x - 1
  2. Graph the second equation the same way. This line, Line B, has slope -1 and passes through (0, 5).

    y=โˆ’x+5y = -x + 5
  3. The lines appear to cross at (2, 3). That makes (2, 3) a candidate, not yet a solution, because a drawing cannot prove exact values.

    candidate:ย (2,3)\text{candidate: } (2, 3)
  4. Test the candidate in the first equation by replacing x with 2. The result is 3, the y-value of the candidate, so the equation is true.

    2(2)โˆ’1=4โˆ’1=32(2) - 1 = 4 - 1 = 3
  5. Test the candidate in the second equation the same way. The result is again 3, so this equation is true too.

    โˆ’(2)+5=โˆ’2+5=3-(2) + 5 = -2 + 5 = 3
  6. Both equations are true at (2, 3), so it is a solution by the definition of a solution. It is the only one. The slopes 2 and -1 differ, so these are two different lines. The Line Postulate says that through any two points there is exactly one line, so two different lines cannot share a second point.

Answer

The system has exactly one solution, (2,3)(2, 3), the point where the two lines meet.

Two lines do not always meet at exactly one point. If two equations describe the same line, every point on it is a solution, so the system has infinitely many solutions. If the lines are different and parallel, the system has no solution.

Parallel lines are lines in the same plane that never meet. The Parallel Slopes Theorem says that two different nonvertical lines are parallel exactly when their slopes are equal. It works in both directions: equal slopes give parallel lines, and parallel lines have equal slopes. So different slopes mean the lines are not parallel, and they must meet.

The next figure, with the same axes, shows y=2x+1y = 2x + 1 as Line A, through Point A at (0,1)(0, 1), and y=2xโˆ’3y = 2x - 3 as Line B, through Point B at (0,โˆ’3)(0, -3). Each equation has the form y=mx+by = mx + b, so both lines are nonvertical. Both slopes are 22 and the yy-intercepts differ, so these are two different lines with equal slopes. By the direction "equal slopes give parallel lines," they are parallel. That reason comes from the equations, not from how the picture looks, and it means this system has no solution.

Coordinate grid from x -4 to 4 and y -5 to 5, with a grid step of 1, showing 4 plotted elements. Details: line 2 x plus -1 y equals -1, named Line A; line 2 x plus -1 y equals 3, named Line B; point at (0, 1), named Point A; point at (0, -3), named Point B.
Line A is y=2x+1y = 2x + 1 and Line B is y=2xโˆ’3y = 2x - 3. Both have slope 22. Point A at (0,1)(0, 1) and Point B at (0,โˆ’3)(0, -3) mark their different yy-intercepts.

A graph shows what a solution means, but it cannot always give exact values. The lines y=2xโˆ’1y = 2x - 1 and y=โˆ’x+4y = -x + 4 meet at (53,73)\left(\frac{5}{3}, \frac{7}{3}\right), since both equations give y=73y = \frac{7}{3} when x=53x = \frac{5}{3}. No one can read those exact values from a drawing. Algebra can find them.

Substitution rests on the substitution property of equality: if two quantities are equal, you may replace one with the other in any equation. At a solution, xx and yy stand for the same numbers in both equations. So if one equation says y=xโˆ’1y = x - 1, you may write xโˆ’1x - 1 in place of yy in the other equation. That leaves one equation in one variable, which you already know how to solve.

The plan: get one variable alone, replace it in the other equation, solve, find the second variable, then check the pair in both original equations. If getting a variable alone means dividing by its coefficient, the number that multiplies it, that number must be nonzero. Each step follows from the one before, so any solution must have the values you find. The check confirms that those values work.

Worked example

Solve by substitution

Given the system 2x+3y=122x + 3y = 12 and y=xโˆ’1y = x - 1, find its solution by substitution.

  1. The second equation says y and x - 1 are equal. By the substitution property of equality, replace y with x - 1 in the first equation. Keep the parentheses, because 3 multiplies all of x - 1.

    2x+3(xโˆ’1)=122x + 3(x - 1) = 12
  2. Use the distributive property, then combine like terms.

    2x+3xโˆ’3=12โ‡’5xโˆ’3=122x + 3x - 3 = 12 \quad\Rightarrow\quad 5x - 3 = 12
  3. Add 3 to both sides, by the addition property of equality.

    5x=155x = 15
  4. Divide both sides by 5, by the division property of equality. This is allowed because 5 is not zero.

    x=3x = 3
  5. Replace x with 3 in the second equation to find y, by the substitution property of equality.

    y=3โˆ’1=2y = 3 - 1 = 2
  6. Check (3, 2) in both original equations. Both are true, so (3, 2) is a solution by the definition of a solution.

    2(3)+3(2)=6+6=12and3โˆ’1=22(3) + 3(2) = 6 + 6 = 12 \quad\text{and}\quad 3 - 1 = 2

Answer

The solution of the system is (3,2)(3, 2).

Elimination removes one variable by adding the two equations. It rests on the addition property of equality: if a=ba = b and c=dc = d, then a+c=b+da + c = b + d. At a solution, both equations are true, so the sum of the left sides equals the sum of the right sides.

When a variable's coefficients in the two equations are opposites, such as 22 and โˆ’2-2, their sum is 00, so adding the equations makes that variable disappear.

If no coefficients are opposites yet, multiply both sides of one equation, or of each one, by a nonzero number, using the multiplication property of equality. The number must be nonzero, because multiplying by 00 turns any equation into 0=00 = 0 and erases its line. A nonzero multiplier keeps the same line.

Worked example

Solve by elimination

Given the system 3x+2y=163x + 2y = 16 and 2xโˆ’y=62x - y = 6, find its solution by elimination.

  1. The y coefficients are 2 and -1, which are not opposites. Multiply both sides of the second equation by 2, by the multiplication property of equality. Because 2 is nonzero, the line does not change.

    2(2xโˆ’y)=2(6)โ‡’4xโˆ’2y=122(2x - y) = 2(6) \quad\Rightarrow\quad 4x - 2y = 12
  2. Add this equation to the first, by the addition property of equality. The y terms cancel because 2y + (-2y) = 0.

    (3x+2y)+(4xโˆ’2y)=16+12โ‡’7x=28(3x + 2y) + (4x - 2y) = 16 + 12 \quad\Rightarrow\quad 7x = 28
  3. Divide both sides by 7, by the division property of equality. This is allowed because 7 is not zero.

    x=4x = 4
  4. Replace x with 4 in the original second equation, by the substitution property of equality. Subtract 8 from both sides, then divide both sides by -1, which is not zero.

    2(4)โˆ’y=6โ€…โ€Šโ‡’โ€…โ€Š8โˆ’y=6โ€…โ€Šโ‡’โ€…โ€Šโˆ’y=โˆ’2โ€…โ€Šโ‡’โ€…โ€Šy=22(4) - y = 6 \;\Rightarrow\; 8 - y = 6 \;\Rightarrow\; -y = -2 \;\Rightarrow\; y = 2
  5. Check (4, 2) in both original equations. Both are true, so (4, 2) is a solution by the definition of a solution.

    3(4)+2(2)=12+4=16and2(4)โˆ’2=8โˆ’2=63(4) + 2(2) = 12 + 4 = 16 \quad\text{and}\quad 2(4) - 2 = 8 - 2 = 6

Answer

The solution of the system is (4,2)(4, 2).

Sometimes both variables disappear as you use substitution or elimination. The statement left over tells you which case you have.

Try substitution on y=2x+1y = 2x + 1 and y=2xโˆ’3y = 2x - 3. By the substitution property of equality, replacing yy gives 2x+1=2xโˆ’32x + 1 = 2x - 3. Subtracting 2x2x from both sides, by the subtraction property of equality, leaves 1=โˆ’31 = -3. Any solution would have to make this statement true. It is false, so the system has no solution, which agrees with the parallel lines above.

Now try y=x+1y = x + 1 and 2y=2x+22y = 2x + 2. Replacing yy the same way gives 2(x+1)=2x+22(x + 1) = 2x + 2, and the distributive property makes this 2x+2=2x+22x + 2 = 2x + 2. Subtracting 2x+22x + 2 from both sides leaves 0=00 = 0, which is true for every xx. Dividing 2y=2x+22y = 2x + 2 by the nonzero number 22 gives y=x+1y = x + 1, so both equations describe the same line, and every point on it is a solution.

To compare slopes in the table below, solve each equation for yy. That divides by the coefficient of yy, which must be nonzero. If that coefficient is 00, the line is vertical, like x=3x = 3.

The three possible outcomes for a system of two linear equations
How the lines relateHow to tell from the equationsHow the algebra endsNumber of solutions
They meet at one point
Different slopes, or exactly one line is vertical
One value for each variable
Exactly one
Different parallel lines
Equal slopes and different yy-intercepts, or two different vertical lines
A false statement, such as 1=โˆ’31 = -3
None
The same line
Equal slopes and equal yy-intercepts, or the same vertical line
A statement that is always true, such as 0=00 = 0
Infinitely many

All three methods look for the same points, so you may choose the one that fits the form of the equations.

  • Graphing shows how the lines relate, but it gives only a candidate to test.
  • Substitution is quick when a variable is alone or has a coefficient of 11 or โˆ’1-1.
  • Elimination is quick when a variable's coefficients are opposites or can become opposites with a nonzero multiplier.

These are guides, not rules. In the table below, test each listed solution in both of its equations.

How the form of a system can point to a method
SystemWhat you noticeGood choiceSolution
y=4xโˆ’3y = 4x - 3 and 2x+5y=72x + 5y = 7
yy is already alone
Substitution
(1,1)(1, 1)
3x+2y=83x + 2y = 8 and 5xโˆ’2y=85x - 2y = 8
The yy coefficients, 22 and โˆ’2-2, are opposites
Elimination
(2,1)(2, 1)
y=x+1y = x + 1 and y=โˆ’2x+4y = -2x + 4
Both lines are easy to draw, and you want to see how they relate
Graphing, then test the candidate
(1,2)(1, 2)

Worked example

Choose a method and solve

Given: a rectangle has a perimeter of 6464 cm, and its length is 44 cm less than 33 times its width. Find its length and width.

  1. Let L be the length and W the width, in centimeters. Side lengths are positive, so L > 0 and W > 0. Opposite sides of a rectangle are congruent and perimeter is the sum of the side lengths, so the perimeter is 2L + 2W. The second given fact gives L directly.

    2L+2W=64andL=3Wโˆ’42L + 2W = 64 \quad\text{and}\quad L = 3W - 4
  2. Choose a method. L is already alone, so substitution fits best: graphing would give only a candidate, and elimination would need rearranging first. By the substitution property of equality, replace L with 3W - 4 in the first equation.

    2(3Wโˆ’4)+2W=642(3W - 4) + 2W = 64
  3. Use the distributive property, then combine like terms.

    6Wโˆ’8+2W=64โ‡’8Wโˆ’8=646W - 8 + 2W = 64 \quad\Rightarrow\quad 8W - 8 = 64
  4. Add 8 to both sides, by the addition property of equality. Then divide both sides by 8, which is not zero, by the division property of equality.

    8W=72โ‡’W=98W = 72 \quad\Rightarrow\quad W = 9
  5. Replace W with 9 in the second equation, by the substitution property of equality.

    L=3(9)โˆ’4=27โˆ’4=23L = 3(9) - 4 = 27 - 4 = 23
  6. Check both equations and the geometric condition. Both equations are true and both lengths are positive, so the values fit the rectangle.

    2(23)+2(9)=46+18=64,3(9)โˆ’4=23,23>0,9>02(23) + 2(9) = 46 + 18 = 64,\quad 3(9) - 4 = 23,\quad 23 > 0,\quad 9 > 0

Answer

The rectangle has a length of 2323 cm and a width of 99 cm.

A solution of a system is a point on both lines, so it must make both equations true. Graphing shows where to look, and substitution and elimination give exact values. Choose the method that fits the form of the equations, then test your answer in both of them.