Part 13 of 20 · LinesSee the whole course

Parallel and perpendicular lines: the slope rules

Short answer

Parallel lines have the same slope. Perpendicular lines have slopes that multiply to −1: flip the fraction and change the sign. The slope of a line perpendicular to slope 2 is −½.

Parallel lines: the same slope

Two lines that never meet climb at exactly the same rate. So they have the same slope m and different intercepts b. The lines y = 2x + 1 and y = 2x − 3 are parallel: both have m = 2.

If the intercepts are also the same, the two equations describe the same line, not two parallel ones.

Perpendicular lines: slopes that multiply to −1

Perpendicular lines meet at a right angle, like the corner of a page. Their slopes are negative reciprocals: do two things to the slope.

  1. Flip the fraction. 2 is 2/1, so it becomes 1/2.
  2. Change the sign. Positive becomes negative, so it becomes −1/2.

Check by multiplying: 2 × (−½) = −1. Whenever two slopes multiply to −1, the lines are perpendicular. Slide the orange line below and watch for the little square that marks a right angle. It appears only at slope −½.

y = (−1/2)x − 2
2 × (−1/2) = −1
2 × (−1/2) = −1, so the lines meet at a right angle: perpendicular.

Write the equation of a parallel line

Find the line parallel to y = 3x − 1 that passes through (1, 5).

Same slope: m = 3, so y = 3x + b
Put in the point (1, 5): 5 = 3(1) + b
b = 2
So the line is y = 3x + 2

The slope comes from the rule. The intercept comes from the point. This is the same method as the equation of a line from two points.

Write the equation of a perpendicular line

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

Perpendicular slope: flip 2 and change the sign, so m = −1/2
Put in the point (4, 1): 1 = −½(4) + b
1 = −2 + b, so b = 3
So the line is y = −½x + 3

Watch it explained in under a minute

The same idea, narrated step by step. Square version for sharing: download the 1:1 video.

Special case: horizontal and vertical lines

A horizontal line (slope 0) and a vertical line (slope undefined) are perpendicular, even though the multiplying rule does not apply to them. See horizontal and vertical lines for why.

The four mistakes to avoid

Try it yourself

Tap a question to see the answer.

1. Are y = 3x + 1 and y = 3x − 5 parallel?

Both slopes are 3, and the intercepts differ, so they are parallel.

2. What is the slope of a line perpendicular to y = 4x − 2? And to y = −⅔x + 1?

For slope 4: flip to 1/4 and change the sign, so −1/4 (check: 4 × (−¼) = −1). For slope −2/3: flip to 3/2 and change the sign, so 3/2 (check: −⅔ × 3/2 = −1).

3. Find the line through (3, 2) that is perpendicular to y = −⅓x + 5.

The perpendicular slope is 3 (flip −1/3 and change the sign). Put in (3, 2): 2 = 3(3) + b, so b = −7. The line is y = 3x − 7.

Where this fits in

Parallel and perpendicular lines finish the course on lines. From here we move on to equations, starting with how to solve a linear equation.

Quick answers

Questions about this topic

What is the slope of a line parallel to another?

The same slope. Parallel lines climb at exactly the same rate, so y = 2x + 1 and y = 2x − 3 are parallel because both have slope 2.

What is the slope of a perpendicular line?

The negative reciprocal: flip the fraction and change the sign. The slope perpendicular to 2 is −1/2, and the slope perpendicular to −3/4 is 4/3.

How do you know if two lines are perpendicular?

Multiply their slopes. If the product is −1, the lines are perpendicular. For example, 2 × (−1/2) = −1.

Are horizontal and vertical lines perpendicular?

Yes. A horizontal line has slope 0 and a vertical line has an undefined slope, so the multiplying rule does not apply, but they do meet at a right angle.

Keep going

Learn it by playing

Pip: Math Adventure is a math game for iPhone where functions, lines, equations and calculus are puzzles you solve by playing. It is coming soon to the App Store.

Join the list and we will tell you the day Pip is out.