Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 37 ยท Linear Functions and Graphs

Parallel and Perpendicular Lines

Learn the slope rules for parallel and perpendicular lines and use them to write equations of lines, with worked examples, a plot and a checker.

Two lines in a plane can cross, or they can never meet. Slope lets us describe both situations exactly. This lesson shows how slopes reveal whether lines are parallel or perpendicular, and how to write the equation of a new line using that information.

Parallel lines

Parallel lines are in the same plane and never meet. They rise or fall at the same rate, so they have the same slope (and different y-intercepts).

y = 2x + 1 and y = 2x - 5 are parallel, because both have slope 2.

Two vertical lines (x = 2 and x = 7) are parallel too, although their slope is undefined. And two horizontal lines are parallel.

Example 1. Find the line through (3, 4) parallel to y = 2x + 1.

  • Same slope: m = 2
  • Substitute the point: 4 = 2(3) + b, so b = -2
  • Line: y = 2x - 2

Perpendicular lines

Perpendicular lines meet at a right angle (90ยฐ). Their slopes are negative reciprocals of each other: flip the fraction and change the sign. Equivalently, the product of the slopes is -1.

Slope Perpendicular slope
2 -1/2
-3 1/3
3/4 -4/3
0 (horizontal) undefined (vertical)

Check: 2 ร— (-1/2) = -1, and (3/4) ร— (-4/3) = -1.

Why does this work? Rotating a line by 90ยฐ swaps its run and rise and reverses one direction. A line with rise 2, run 1 becomes a line with rise 1, run -2: slope -1/2.

Example 2. Find the line through (4, 1) perpendicular to y = 2x + 1.

  • Perpendicular slope: -1/2
  • Substitute: 1 = -1/2 (4) + b, so 1 = -2 + b and b = 3
  • Line: y = -1/2 x + 3
flowchart TD
    A["Given line with slope m"] --> B{"Parallel or perpendicular?"}
    B -->|"parallel"| C["new slope = m"]
    B -->|"perpendicular"| D["new slope = -1/m"]
    C --> E["use the given point to find b"]
    D --> E

The recipe: choose the slope by the relationship, then use the point to find the intercept.

Python Classify two lines by slope

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Seeing it on a graph

Python A line, its parallel and its perpendicular

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The set_aspect("equal") line is important. With unequal axis scales, perpendicular lines would not look perpendicular.

From standard form

For Ax + By = C, the slope is -A/B. For 3x + 6y = 12, the slope is -3/6 = -1/2. A perpendicular line has slope 2.

A quick rule in standard form: a parallel line has the same A and B and a different C; a perpendicular line swaps them and changes one sign: Bx - Ay = k.

Example 3. The line through (1, 2) parallel to 3x + 6y = 12: same left side, so 3x + 6y = 3(1) + 6(2) = 15. Line: 3x + 6y = 15.

Python Build parallel and perpendicular lines through a point

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  1. Only flipping or only changing the sign. Perpendicular means flip and negate.
  2. Using the original slope for a perpendicular line.
  3. Forgetting to compare in slope-intercept form. Lines like 2x + y = 3 and y = -2x + 8 are parallel, but you only see it after solving for y.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which line is parallel to y = 3x - 4?

    Parallel lines have the same slope, 3.
  2. 2. What slope is perpendicular to 4?

    Negative reciprocal of 4 is -1/4.
  3. 3. What slope is perpendicular to -2/3?

    Flip to -3/2, then negate to 3/2. Check: (-2/3)(3/2) = -1.
  4. 4. Find the line through (0, 5) perpendicular to y = 5x + 1.

    The perpendicular slope is -1/5 and the y-intercept is 5 (the point is on the y-axis).

Summary

  • Parallel lines have equal slopes.
  • Perpendicular lines have slopes that are negative reciprocals (product -1).
  • To write a new line, pick the slope by the rule, then use the given point to find b.
  • Compare slopes only after writing each equation in the form y = mx + b.

Next: Solving Systems of Equations by Graphing