math.wiki
Algebra › Linear relationships › Parallel and perpendicular lines
Open on the map
Math 8 · G.GPE.B.5

Parallel and perpendicular lines

Two lines on a grid look as if they will never meet. How can their equations settle it, without extending the drawing for ever?

Where you are 11 in Linear relationships

Why this exists

A drawing shows only a few squares of each line, and lines go on for ever. The lines y = 3x + 7 and y = 3.01x + 2 look parallel on any ordinary sheet of graph paper, yet they cross at (500, 1507), far off the page. Looking cannot decide whether two lines meet.

The equations can. A line that is not vertical has a Slope, the amount it rises for each step to the right, and a y-intercept, the height where it crosses the y-axis. Same slope and different intercepts: the lines never meet. Different slopes: they cross, exactly once. The same comparison tells how many solutions a system of two equations has.

Definition

Two different lines in a plane are parallel when they never meet, however far they are extended. In symbols, \ell_1 \parallel \ell_2 says that line \ell_1 is parallel to line \ell_2. This is the parallel lines of geometry, now read through coordinates.

For two lines that are not vertical, written in slope-intercept form

y = m_1 x + b_1 \qquad y = m_2 x + b_2

the lines are parallel exactly when

m_1 = m_2 \quad \text{and} \quad b_1 \ne b_2

If the slopes match and the intercepts match too, the two equations describe one and the same line. Some books count a line as parallel to itself; this lesson does not, so that “parallel” matches “no solution” exactly.

A vertical line has no slope, so vertical lines need their own statement: x = h and x = k are parallel exactly when h \ne k.

Intuition

Stand on one line at some value of x and measure straight up or down to the other line. Call that length the vertical gap at x. Two lines meet exactly where the vertical gap is 0, because there they have the same y for the same x.

Figure 1 draws \displaystyle y = \frac{1}{3}x + 2 and \displaystyle y = \frac{1}{3}x - 1. At x = 0 the gap is 2 - (-1) = 3. Take one step to the right. Each line rises by its slope, and both slopes are \displaystyle \frac{1}{3}, so the gap is still 3. The same happens at every step, to the right or to the left, so the gap is 3 at every x, never 0, and the lines never meet.

3 3 3 3
y = \tfrac{1}{3}x + 2
y = \tfrac{1}{3}x - 1
Figure 1Same slope. Both lines rise by \displaystyle \frac{1}{3} for each step to the right, so the vertical gap between them is 3 everywhere and never reaches 0.

Figure 2 keeps \displaystyle y = \frac{1}{3}x + 2 but swaps the lower line for the steeper y = x - 3. Now each step to the right lifts the steeper line by 1 and the other by only \displaystyle \frac{1}{3}, so the gap closes by \displaystyle 1 - \frac{1}{3} = \frac{2}{3} per step:

x0367.5
\displaystyle \frac{1}{3}x + 22344.5
x - 3-3034.5
gap5310

At x = 7.5 the gap reaches 0 and the lines cross at (7.5, 4.5). To the right of that point the steeper line is on top and keeps pulling away; to the left the gap only grows. So the lines cross once, and only once.

5 3
y = \tfrac{1}{3}x + 2
y = x - 3
Figure 2Different slopes. The steeper line gains \displaystyle \frac{2}{3} on the other for each step to the right, so the gap shrinks from 5 to 3 to 1 and reaches 0 at (7.5, 4.5).

Both pictures follow one rule. Each step to the right changes the gap by the difference of the slopes, m_1 - m_2. When the slopes are equal that difference is 0, so the gap is frozen at the difference of the intercepts. When the slopes differ, the gap changes at a steady rate that is not 0, and such a quantity passes through 0 exactly once.

Perpendicular lines

The other special way for two lines to sit is at a right angle, and slope triangles show what that does to their slopes. In Figure 3 the line through V has slope \displaystyle \frac{1}{3}: its slope triangle runs 3 to the right and rises 1, ending at P.

3 1 3 1 V P P′
m = \tfrac{1}{3}
m = -3
Figure 3A quarter turn about V turns the run of 3 into a rise of 3 and the rise of 1 into a run of -1, so slope \displaystyle \frac{1}{3} becomes -3.

Give the whole picture a quarter turn counterclockwise about V. The turned line is at a right angle to the first, and the triangle turns with it. The run of 3, which pointed right, now points up: it has become a rise of 3. The rise of 1, which pointed up, now points left: it has become a run of -1. So the turned line has slope

\frac{\text{rise}}{\text{run}} = \frac{3}{-1} = -3

Rise and run swapped places, which flips the fraction, and one of them changed sign. In the same way any slope \displaystyle \frac{a}{b} turns into \displaystyle -\frac{b}{a}, its negative reciprocal, and the two slopes multiply to -1; here \displaystyle \frac{1}{3} \cdot (-3) = -1. Lines at a right angle are called perpendicular, written \ell_1 \perp \ell_2. The lesson on slopes of perpendicular lines proves that every perpendicular pair behaves like this, and handles the horizontal and vertical cases this short section leaves aside.

Results

Parallel lines. Two lines that are not vertical, y = m_1 x + b_1 and y = m_2 x + b_2, are parallel if and only if m_1 = m_2 and b_1 \ne b_2. The vertical gap between them is then |b_1 - b_2| at every x.

Different slopes cross once. If m_1 \ne m_2, the lines meet at exactly one point, and its x-coordinate is

x = \frac{b_2 - b_1}{m_1 - m_2}

One line, two equations. If m_1 = m_2 and b_1 = b_2, the two equations describe the same line.

Vertical lines. x = h and x = k are parallel if and only if h \ne k, since every point of x = h has first coordinate h. A vertical line x = h meets every line y = mx + b exactly once, at (h, mh + b), so it is parallel to no line that has a slope.

Perpendicular lines. Two lines that are not vertical, with slopes m_1 and m_2, are perpendicular if and only if m_1 m_2 = -1.

Why it is true

The two lines meet at a value of x exactly when they give the same y there:

m_1 x + b_1 = m_2 x + b_2

Subtracting m_2 x + b_2 from both sides gives an equivalent equation,

(m_1 - m_2)x + (b_1 - b_2) = 0

and its left side is the first line’s height minus the second line’s height: the vertical gap, with a sign that says which line is on top. It is itself linear in x, with slope m_1 - m_2, which is the precise form of “each step changes the gap by the difference of the slopes”.

If m_1 \ne m_2, subtract b_1 - b_2 from both sides and divide by m_1 - m_2, which is allowed because it is not 0:

x = \frac{b_2 - b_1}{m_1 - m_2}

That is one number, giving one point on both lines. So the lines meet exactly once.

If m_1 = m_2, the x terms cancel and the equation becomes b_1 - b_2 = 0, with no x left in it. If b_1 \ne b_2 that statement is false for every x: the lines never meet, and they are parallel. If b_1 = b_2 it is true for every x: the equations describe one line. These are the two outcomes in equations with no solution or every number as a solution: an equation whose variable cancels is either never true or always true. Vertical lines were settled in the Results by their first coordinates alone.

Worked examples

Example 1

Reading the slopes

Decide whether the lines in each pair are parallel, cross, or are the same line.

(a) y = -3x + 5 and y = -3x - 2

(b) \displaystyle y = \frac{2}{5}x - 1 and \displaystyle y = \frac{5}{2}x - 1

(c) y = 7 - 2x and y = -2x + 4

Solution

(a) Both slopes are -3 and the intercepts 5 and -2 differ, so the lines are parallel. Subtracting shows the gap is the same at every x:

(-3x + 5) - (-3x - 2) = 7

(b) The slopes \displaystyle \frac{2}{5} and \displaystyle \frac{5}{2} differ, so the lines cross exactly once. The shared intercept says where: both pass through (0, -1).

(c) By the commutative property of addition, 7 - 2x = -2x + 7, so the first line is y = -2x + 7. Both slopes are -2, the intercepts 7 and 4 differ, and the lines are parallel.

Example 2

Equations in other forms

Decide whether the lines in each pair are parallel. If they cross, find where.

(a) 6x - 2y = 5 and y = 3x + 4

(b) 5x + 2y = 8 and 2x + 5y = 8

(c) x = -4 and x = 1

Solution

(a) The slope of 6x - 2y = 5 stays hidden until the equation is solved for y. Subtract 6x from both sides, then divide both sides by -2:

\begin{aligned} -2y &= -6x + 5 \\ y &= 3x - \tfrac{5}{2} \end{aligned}

Both lines have slope 3, and the intercepts \displaystyle -\frac{5}{2} and 4 differ. The lines are parallel.

(b) Solve each equation for y by subtracting the x term and dividing by the coefficient of y:

\begin{aligned} y &= -\tfrac{5}{2}x + 4 \\ y &= -\tfrac{2}{5}x + \tfrac{8}{5} \end{aligned}

The slopes \displaystyle -\frac{5}{2} and \displaystyle -\frac{2}{5} differ, so the lines cross once. At the crossing the two expressions for y are equal:

\begin{aligned} -\tfrac{5}{2}x + 4 &= -\tfrac{2}{5}x + \tfrac{8}{5} \\ -25x + 40 &= -4x + 16 \\ 24 &= 21x \end{aligned}

The second line multiplies both sides by 10 to clear the fractions, and the third adds 25x to both sides and subtracts 16. So \displaystyle x = \frac{24}{21} = \frac{8}{7}, and then \displaystyle y = -\frac{5}{2} \cdot \frac{8}{7} + 4 = -\frac{20}{7} + \frac{28}{7} = \frac{8}{7}. The lines cross at \displaystyle \left(\frac{8}{7}, \frac{8}{7}\right). Check in the second equation: \displaystyle 2 \cdot \frac{8}{7} + 5 \cdot \frac{8}{7} = \frac{56}{7} = 8.

(c) Neither equation has a y in it, so both lines are vertical and have no slope. Every point of the first has x-coordinate -4 and every point of the second has x-coordinate 1, so no point lies on both. The lines are parallel, 5 units apart.

Example 3

A parallel line through a point

Write an equation of the line through (8, -3) that is parallel to \displaystyle y = \frac{5}{4}x + 2.

Solution

A parallel line has the same slope, \displaystyle \frac{5}{4}. A slope and a point fix one line, and point-slope form writes it down. With (x_1, y_1) = (8, -3), the left side y - y_1 is y - (-3) = y + 3:

\begin{aligned} y + 3 &= \tfrac{5}{4}(x - 8) \\ y + 3 &= \tfrac{5}{4}x - 10 \\ y &= \tfrac{5}{4}x - 13 \end{aligned}

The second line uses the distributive property, and the third subtracts 3 from both sides.

Check. \displaystyle \frac{5}{4} \cdot 8 - 13 = 10 - 13 = -3, so the point is on the line, and its intercept -13 is not 2, so it is not the given line again.

Example 4

Two railway tracks

On a map drawn on a square grid, a straight railway track runs through signal posts at (-2, 1) and (6, 7). A second straight track is to be laid parallel to it, through a depot at (4, 2). Find an equation for each track, and show that the vertical gap between them is the same all along.

Solution

The first track’s slope comes from its two points:

m = \frac{7 - 1}{6 - (-2)} = \frac{6}{8} = \frac{3}{4}

Through (-2, 1), point-slope form gives \displaystyle y - 1 = \frac{3}{4}(x + 2), that is \displaystyle y = \frac{3}{4}x + \frac{3}{2} + 1. So the first track lies on

y = \frac{3}{4}x + \frac{5}{2}

The second track has the same slope and passes through (4, 2): \displaystyle y - 2 = \frac{3}{4}(x - 4), that is \displaystyle y = \frac{3}{4}x - 3 + 2. So it lies on

y = \frac{3}{4}x - 1

Subtract the second height from the first:

\left(\tfrac{3}{4}x + \tfrac{5}{2}\right) - \left(\tfrac{3}{4}x - 1\right) = \tfrac{7}{2}

The x terms cancel, so the gap is \displaystyle \frac{7}{2} grid units at every x, and the tracks never meet.

Example 5

Choosing the coefficients

For which numbers a and c are the lines ax + 3y = c and y = -2x + 5 (a) parallel, (b) the same line? What happens for every other choice?

Solution

Solve the first equation for y: subtract ax from both sides, then divide both sides by 3.

y = -\frac{a}{3}x + \frac{c}{3}

(a) Parallel needs the same slope, \displaystyle -\frac{a}{3} = -2, so a = 6, and a different intercept, \displaystyle \frac{c}{3} \ne 5, so c \ne 15. For instance, 6x + 3y = 9 is y = -2x + 3, parallel to the given line.

(b) The same line needs a = 6 and c = 15. Indeed, 6x + 3y = 15 divided by 3 is 2x + y = 5, which rearranges to y = -2x + 5.

For every a \ne 6 the slopes differ and the lines cross at exactly one point, whatever c is.

Example 6

Parallel or perpendicular to one line

Compare each line with y = -5x + 7. Is it parallel to it, perpendicular to it, or neither?

(a) y = -5x - 3

(b) \displaystyle y = \frac{1}{5}x + 7

(c) y = 5x + 7

(d) x - 5y = 20

Solution

The given slope is -5. A parallel line needs slope -5 and a different intercept. A perpendicular line needs a slope whose product with -5 is -1, and that slope is \displaystyle \frac{1}{5}.

(a) Slope -5, and intercept -3 rather than 7: parallel.

(b) \displaystyle -5 \cdot \frac{1}{5} = -1: perpendicular. The two lines share the intercept 7, so they cross at (0, 7), at a right angle.

(c) The product is -5 \cdot 5 = -25, not -1, and the slopes differ, so this line is neither. Changing only the sign of a slope tilts the line the other way at the same steepness; it does not turn it through a right angle.

(d) Subtracting x gives -5y = -x + 20, and dividing by -5 gives \displaystyle y = \frac{1}{5}x - 4. The slope is \displaystyle \frac{1}{5}: perpendicular. Lines (b) and (d), both perpendicular to the given line, share a slope and are parallel to each other.

Boundaries

Vertical lines have no slope. The test “same slope, different intercept” needs both lines in the form y = mx + b. Two vertical lines are compared through x = h and x = k instead, and a vertical line is never parallel to a line that has a slope.

Slopes must match exactly. Rounding can hide a difference: 0.33 is not \displaystyle \frac{1}{3}, and lines with those slopes whose intercepts differ by 1 meet 300 units to one side of the y-axis, since the gap changes by only \displaystyle \frac{1}{3} - 0.33 = \frac{1}{300} per step. Keep slopes as exact fractions.

The vertical gap is not the distance between the lines. It is measured straight up, not straight across. The shortest distance between two slanting parallel lines is measured along a perpendicular and is smaller; that is the distance from a point to a line. Only for horizontal lines are the two the same.

The test belongs to the plane. In space two lines can miss each other without being parallel, one passing above the other, and a line in space has no single slope.

Where this goes next

Solving systems by graphing is the nearest use: slopes and intercepts say whether two line equations have one common solution, none, or infinitely many before any solving starts. Writing a parallel or perpendicular line through a point turns the third example into a general move.

In geometry, equal slopes prove sides parallel from coordinates, a step in classifying a figure from its corners, and parallel lines cut by a transversal add the angle facts. In calculus the tangent and normal lines to a curve use a slope and its negative reciprocal.

Exercises

Parallel, crossing, or the same line

Decide whether the lines in each pair are parallel, cross, or are one line. If they cross and the point is easy to read off, give it.

  1. y = 2x + 9 and y = 2x - 1
  2. \displaystyle y = -\frac{3}{5}x + 4 and \displaystyle y = -\frac{5}{3}x + 4
  3. 3x - y = 7 and y = 3x + 2
  4. 2x + 8y = 16 and x + 4y = 8
  5. y = -2 and y = 5
  6. x = 3 and y = 3
  7. The line through (0, 1) and (4, 7), and the line through (-2, -5) and (2, 1)

Writing a parallel line

Write an equation of each line, in slope-intercept form unless the line is vertical.

  1. Through (-6, 1), parallel to \displaystyle y = \frac{1}{3}x - 5.
  2. Through (5, -2), parallel to 4x + 5y = 1.
  3. Through (-1, 7), parallel to (a) y = 3, (b) x = 3.

Perpendicular slopes

  1. Are the lines \displaystyle y = \frac{3}{8}x - 1 and 8x + 3y = 6 perpendicular?

Using the idea

  1. On a map grid, one rail of a straight railway track lies along 2x - 5y = -15. The other rail is parallel to it and passes through (5, 4). Find its equation and the vertical gap between the rails.
  2. For which value of k are the lines y = (k - 1)x + 4 and y = 3kx - 2 parallel?
  3. Without solving, decide how many solutions the system y = 6x - 1, 12x - 2y = 5 has.

Reasoning

  1. Elowen draws y = 3x - 2 and y = 2.99x + 1 for x from 0 to 10, and the lines look parallel. Are they? If they meet, find where, and explain why the drawing could not show it.
  2. Lines p and q are both parallel to a line r, and none of the three is vertical. Explain why p and q are parallel to each other or are the same line.
Answers
  1. Parallel. Both slopes are 2, and the intercepts 9 and -1 differ; the gap is 10 at every x.
  2. They cross, at (0, 4). The slopes \displaystyle -\frac{3}{5} and \displaystyle -\frac{5}{3} differ, and both lines have intercept 4.
  3. Parallel. 3x - y = 7 solves to y = 3x - 7: slope 3, intercept -7 rather than 2.
  4. The same line. Both equations solve to \displaystyle y = -\frac{1}{4}x + 2; the first is the second multiplied by 2.
  5. Parallel. Both lines are horizontal, with slope 0, and the intercepts -2 and 5 differ.
  6. They cross, at (3, 3). One line is vertical and the other horizontal, so they meet once.
  7. Parallel. The slopes are \displaystyle \frac{7 - 1}{4 - 0} = \frac{3}{2} and \displaystyle \frac{1 - (-5)}{2 - (-2)} = \frac{3}{2}. The lines are \displaystyle y = \frac{3}{2}x + 1 and \displaystyle y = \frac{3}{2}x - 2, so the intercepts differ.
  8. \displaystyle y = \frac{1}{3}x + 3, from \displaystyle y - 1 = \frac{1}{3}(x + 6) = \frac{1}{3}x + 2.
  9. \displaystyle y = -\frac{4}{5}x + 2. The slope of 4x + 5y = 1 is \displaystyle -\frac{4}{5}, and \displaystyle y + 2 = -\frac{4}{5}(x - 5) = -\frac{4}{5}x + 4.
  10. (a) y = 7: parallel to a horizontal line means horizontal, at the point’s height. (b) x = -1: parallel to a vertical line means vertical, through the point’s x-coordinate.
  11. Yes. 8x + 3y = 6 solves to \displaystyle y = -\frac{8}{3}x + 2, and \displaystyle \frac{3}{8} \cdot \left(-\frac{8}{3}\right) = -1.
  12. \displaystyle y = \frac{2}{5}x + 2, with a vertical gap of 1. The first rail is \displaystyle y = \frac{2}{5}x + 3, and \displaystyle y - 4 = \frac{2}{5}(x - 5) = \frac{2}{5}x - 2. The intercepts 3 and 2 differ by 1.
  13. \displaystyle k = -\frac{1}{2}, from k - 1 = 3k. Both slopes are then \displaystyle -\frac{3}{2}, and the intercepts 4 and -2 differ, so the lines are parallel and not one line.
  14. No solution. 12x - 2y = 5 solves to \displaystyle y = 6x - \frac{5}{2}: the same slope 6 and a different intercept, so the lines are parallel.
  15. Not parallel; they meet at (300, 898). The gap (3x - 2) - (2.99x + 1) = 0.01x - 3 is 0 at x = 300, and y = 3 \cdot 300 - 2 = 898. Over x from 0 to 10 the gap only moves from -3 to -2.9, far too little to see, and the crossing is hundreds of units away.
  16. Since p \parallel r and neither is vertical, p has the slope of r; so does q. So p and q have equal slopes: different intercepts make them parallel, equal intercepts make them one line.
kg1128 · updated 2026-10-09 · CC-BY-SA-4.0