Parallel, Perpendicular, Horizontal and Vertical Lines
Use slopes to recognize and write parallel and perpendicular lines, and write equations for horizontal and vertical lines without mixing them up.
Welcome back!
Step 1 of 14Learn
Same slope, never meet
Railroad tracks, notebook lines and lanes on a highway are parallel: they run in the same direction and never cross. In algebra, that means:
Parallel lines have equal slopes and different y-intercepts.
y = 2x + 1 and y = 2x − 4 are parallel. Both rise 2 for every 1 across, so the gap between them never changes. If the y-intercepts were also equal, the equations would describe the same line.
Perpendicular lines cross at a right angle, like the corner of a sheet of paper. Their slopes are negative reciprocals: flip the fraction and change the sign.
- Slope 2 is perpendicular to slope −1/2.
- Slope −3/4 is perpendicular to slope 4/3.
- Slope 1 is perpendicular to slope −1.
A quick test: two slopes are perpendicular when their product is −1. Check: 2 × (−1/2) = −1.
The one exception is horizontal and vertical lines. They are perpendicular, but a vertical line has undefined slope, so the product test does not apply.
Step 2 of 14Chart
Parallel lines: y = 2x + 1 and y = 2x − 4
The gap between the lines stays 5 units at every x, so they never meet.
| x | y = 2x + 1 | y = 2x − 4 |
|---|---|---|
| x = −2 | -3 | -8 |
| x = −1 | -1 | -6 |
| x = 0 | 1 | -4 |
| x = 1 | 3 | -2 |
| x = 2 | 5 | 0 |
| x = 3 | 7 | 2 |
Step 3 of 14Practice · Choose one
What is the slope of a line perpendicular to y = (3/4)x + 1?
Step 4 of 14Learn
Horizontal and vertical lines
Two kinds of lines have especially simple equations.
Horizontal lines have the form y = k. Every point has the same y-coordinate. The line y = 3 passes through (−5, 3), (0, 3) and (100, 3). Its slope is 0.
Vertical lines have the form x = h. Every point has the same x-coordinate. The line x = 3 passes through (3, −5), (3, 0) and (3, 100). Its slope is undefined.
The trap: x = 3 looks like it should be about the x-axis, so people draw it horizontally. But the equation says x is always 3 while y can be anything, which makes a vertical line crossing the x-axis at 3.
A vertical line is the only kind of line that is not a function, because a single input (x = 3) has infinitely many outputs. It fails the vertical line test in the most complete way possible: it is a vertical line.
To write a line through (−4, 7): the horizontal line is y = 7, and the vertical line is x = −4.
Step 5 of 14Compare
Horizontal vs vertical lines
| Aspect | Horizontal | Vertical |
|---|---|---|
| Equation | y = k | x = h |
| Slope | 0 | Undefined |
| Example points | y = 3: (−5, 3), (0, 3), (100, 3) | x = −2: (−2, 0), (−2, 4), (−2, −9) |
| Crosses | The y-axis once (unless k = 0) | The x-axis once (unless h = 0) |
| Is it a function? | Yes | No: one x has many y-values |
Step 6 of 14Practice · Sort into groups
Classify each pair of lines.
Tap an item, then tap its group (or drag it there).
Step 7 of 14Practice · Work it out
Find the y-intercept of the line that is parallel to y = −2x + 5 and passes through (1, 4).
Step 8 of 14Learn
Writing a perpendicular line
Write the line through (6, 1) that is perpendicular to y = 3x − 2.
- The given slope is 3, so the perpendicular slope is −1/3.
- Substitute the point into y = −(1/3)x + b: 1 = −(1/3)(6) + b = −2 + b, so b = 3.
- The line is y = −(1/3)x + 3.
If the given line is in standard form, find its slope first. For 2x + 5y = 10, solve for y to get y = −(2/5)x + 2, so the slope is −2/5 and a perpendicular slope is 5/2.
Perpendicular slopes show up in geometry with coordinates. To check whether a corner of a shape is a right angle, compute the slopes of the two sides that meet there. If the product is −1, it is a right angle. For points A(0, 0), B(4, 2) and C(3, 4): slope AB = 2/4 = 1/2 and slope BC = (4 − 2)/(3 − 4) = −2. The product is −1, so the angle at B is a right angle.
Step 9 of 14Practice · Diagram
How do two lines relate?
Start by comparing slopes. Tap a result for the rule.
Lines with slopes 4 and −1/4: where do they belong?
Tap the shape that answers the question, then press Check.
- Compare the slopes
- Equal slopes
- Different b: parallel
Same direction, never touch. y = 2x + 1 and y = 2x − 4.
- Same b: the same line
Two names for one line.
- Different slopes
- Product is −1: perpendicular
Opposite reciprocals, such as 3 and −1/3. They meet at a right angle.
- Otherwise: they just cross
One intersection, not at a right angle. 2 and −2 is this case.
Step 10 of 14Try the calculator
Perpendicular line through a point
Enter the slope of the given line and the point. The calculator flips and negates the slope, then finds b.
- Perpendicular slope
- -0.333
- y-intercept b
- 3
- Check: product of slopes
- -1
Step 11 of 14Practice · Work it out
Find the y-intercept of the line that is perpendicular to y = 2x + 1 and passes through (4, 3).
Step 12 of 14Note
Step 13 of 14Practice · True or false
The lines y = 2x + 3 and y = −2x + 3 are perpendicular.
Step 14 of 14Practice · Choose one
Which is the equation of the vertical line through (−3, 7)?
Lesson complete!