Parallel and Perpendicular Lines

Learning goals

  • Match slopes for parallel lines with different intercepts
  • Take the negative reciprocal for a perpendicular slope
  • Treat vertical and horizontal lines as the exception to the product rule
  • Classify two lines by comparing their slopes
  • Write the required line through a point with point-slope form

Parallel lines: equal slopes

Slope measures direction, the tilt of a line as rise over run. Two lines point the same way exactly when they climb at the same rate, so it should feel right that parallel lines have equal slopes. Suppose one line rises two units for every unit across and the other rises three. Then the steeper one is slowly pulling away from the flatter one, and sooner or later they cross. Only when the two rates match does the distance between the lines hold steady forever, and holding a steady distance is what it means to be parallel.

That picture is convincing, but the algebra makes it exact. The algebra also sorts out the one case the picture glosses over: two lines with the same slope that are secretly the same line.

Two parallel lines with slope one halfThe lines y = (1/2)x + 2 and y = (1/2)x - 1 drawn on a grid, with two vertical markers showing the gap between them is the same at two different x-values.xy033y = (1/2)x + 2y = (1/2)x - 1
Two parallel lines. Both have slope 1/2, so they climb at the same rate, and the vertical gap between them stays a constant 3 units at every x. Equal slope with different y-intercepts is the parallel case.

Why equal slopes mean parallel#

Try it first on the two lines drawn above, y=12x+2y = \tfrac{1}{2}x + 2 and y=12x−1y = \tfrac{1}{2}x - 1. A meeting point is an xx where both right-hand sides agree, so set them equal:

12x+2=12x−1.\tfrac{1}{2}x + 2 = \tfrac{1}{2}x - 1.

Subtract 12x\tfrac{1}{2}x from both sides:

2=−1.2 = -1.

That is false for every xx, so no meeting point exists: the lines never cross, exactly as the picture shows. Now compare a pair with different slopes, y=12x+2y = \tfrac{1}{2}x + 2 and y=2x−1y = 2x - 1. Setting those equal gives 12x+2=2x−1\tfrac{1}{2}x + 2 = 2x - 1, so 3=32x3 = \tfrac{3}{2}x and x=2x = 2: one definite crossing. Last, compare the first line with itself, y=12x+2y = \tfrac{1}{2}x + 2 against y=12x+2y = \tfrac{1}{2}x + 2. Setting those equal gives 2=22 = 2, true for every xx, so every point is shared: the two equations describe one line written twice. Three splits, three outcomes: different slopes cross once, equal slopes with different intercepts never cross, and equal slopes with equal intercepts share every point. Nothing about any of that depended on these particular numbers. The general argument below repeats the same moves with letters in place of digits, so it settles every pair of lines at once.

Take two nonvertical lines and write each in slope-intercept form, y=m1x+b1y = m_1 x + b_1 and y=m2x+b2y = m_2 x + b_2. The lines meet at any point where their yy-values agree, so set the right-hand sides equal and see which xx can satisfy both:

m1x+b1=m2x+b2.m_1 x + b_1 = m_2 x + b_2.

Gather the xx-terms on one side:

(m1−m2) x=b2−b1.(m_1 - m_2)\,x = b_2 - b_1.

Everything now hinges on whether the slopes are equal. Suppose first that they differ, so m1≠m2m_1 \neq m_2. Then m1−m2m_1 - m_2 is not zero, and you may divide by it:

x=b2−b1m1−m2.x = \frac{b_2 - b_1}{m_1 - m_2}.

That is one definite number, a single xx where the lines cross. Different slopes force exactly one crossing, so lines with different slopes are never parallel.

Now suppose the slopes are equal, m1=m2m_1 = m_2. Then m1−m2=0m_1 - m_2 = 0, and the equation collapses to 0=b2−b10 = b_2 - b_1. If the intercepts differ, b1≠b2b_1 \neq b_2, this says 00 equals a nonzero number, which is impossible: no xx works, the lines share no point, and they are parallel. If instead the intercepts are also equal, b1=b2b_1 = b_2, then every xx works, and the two equations describe one and the same line lying on top of itself.

So among nonvertical lines, equal slopes with different intercepts is precisely the parallel case, and it is the only way two such lines can fail to cross.

One family sits outside this argument because it has no slope to compare: the vertical lines. A vertical line has the equation x=cx = c and an undefined slope, so slope-intercept form never applies to it. Even so, any two vertical lines with different cc run straight up and down side by side and never meet, so distinct vertical lines are always parallel to one another. Two vertical lines with the same cc, such as x=3x = 3 and x=3x = 3, are not a parallel pair at all: they are the same line written twice, exactly the coincident case you already saw for slanted lines. You handle vertical lines by inspection rather than by matching a slope number.

Worked example 1 Decide whether two lines are parallel

Are the lines y=−3x+5y = -3x + 5 and 6x+2y=16x + 2y = 1 parallel? Parallelism is about slope, so get both slopes into view. The first line is already in slope-intercept form, and its slope is m1=−3m_1 = -3.

The second line is in standard form, so solve it for yy to expose its slope. Subtract 6x6x from both sides, then divide every term by 22:

2y=−6x+1,y=−3x+12.2y = -6x + 1, \qquad y = -3x + \tfrac{1}{2}.

Its slope is m2=−3m_2 = -3 as well. The two slopes are equal, −3=−3-3 = -3, and the intercepts differ, 5≠125 \neq \tfrac{1}{2}, so the lines are parallel and not the same line.

Check your understanding

Are the lines y=25x+1y = \tfrac{2}{5}x + 1 and 2x−5y=202x - 5y = 20 parallel, perpendicular, or neither?

Answer choices

Perpendicular lines: negative reciprocal slopes

Perpendicular is the right-angle case, and the slope rule for it is less obvious than for parallel lines. Two lines with defined, nonzero slopes are perpendicular exactly when their slopes are negative reciprocals: flip one slope over and change its sign to get the other. Written as an equation, the slopes satisfy

m1⋅m2=−1,equivalentlym2=−1m1.m_1 \cdot m_2 = -1, \qquad \text{equivalently} \qquad m_2 = -\frac{1}{m_1}.

So a line of slope 22 is perpendicular to a line of slope −12-\tfrac{1}{2}. A line of slope −34-\tfrac{3}{4} is perpendicular to a line of slope 43\tfrac{4}{3}, and in every case the product of the two slopes is −1-1. This is not a rule to accept on faith. It falls out of a single idea: a perpendicular line is the original line turned a quarter turn. Turning a slope triangle a quarter turn does a predictable thing to its rise and run.

Rotating a slope triangle a quarter turn to get the perpendicular slopeLine L1 with a slope triangle of run 2 and rise 1, rotated ninety degrees about the point P to produce the perpendicular line L2, whose triangle has a rise of 2 and a run of 1 to the left.90°Prun = brise = arise = brun = -aL1: slope a/bL2: slope -b/a
Turning a slope triangle a quarter turn. The line L1 has slope a/b, drawn here with run b = 2 and rise a = 1. Rotating its triangle ninety degrees about P swaps the legs: the run of 2 becomes a rise of 2, and the rise of 1 becomes a run of 1 to the left. The turned line L2 has slope b over negative a, that is negative b/a, and the two lines meet at a right angle.

Why perpendicular slopes are negative reciprocals#

Try it first on the line drawn above: it has slope 12\tfrac{1}{2}, built from a rise of 11 and a run of 22. Starting at PP, step 22 to the right and 11 up, and you reach a second point on the line. That is the slope triangle in the picture, with legs 22 across and 11 up. Rotate that triangle a quarter turn (90 degrees counterclockwise) about PP. The step 22 right becomes a step 22 up, and the step 11 up becomes a step 11 left, a run of −1-1. The turned triangle has rise 22 and run −1-1, so the rotated line has slope 2−1=−2\dfrac{2}{-1} = -2. Multiply the two slopes to check: 12⋅(−2)=−1\tfrac{1}{2} \cdot (-2) = -1, exactly as the rule predicts. If the line tilts down instead, with rise −1-1 and run 22 (slope −12-\tfrac{1}{2}), the same turn sends that downward step to a step right. The turned triangle then has run 11 and rise 22: slope 21=2\dfrac{2}{1} = 2, and again −12⋅2=−1-\tfrac{1}{2} \cdot 2 = -1. None of that depended on the particular numbers 11 and 22, or on the line tilting up rather than down. Redo the same three moves: mark off a rise and a run, then turn the triangle a quarter turn. Use letters instead of digits, and the same pattern holds for every slope.

Start with a line L1L_1 that is neither horizontal nor vertical. Write its slope as a fraction, m1=abm_1 = \dfrac{a}{b}, where bb is a horizontal run and aa is the matching vertical rise: pick bb positive, and let aa carry the sign of the slope, so aa is negative exactly when L1L_1 tilts down. Both aa and bb are nonzero, since the line tilts. Pick any point PP on L1L_1. Starting at PP, step bb to the right and then aa up or down according to its sign, and you land on a second point of L1L_1. The two steps form a slope triangle with a horizontal leg bb and a vertical leg aa.

Now rotate the whole figure a quarter turn (ninety degrees counterclockwise) about the point PP. Rotation is rigid and turns every direction by the same angle. So the line L1L_1 swings to a new line L2L_2 through PP, and that new line meets L1L_1 at a right angle. That is exactly a line perpendicular to L1L_1, so finding the slope of L2L_2 finds the slope of the perpendicular direction.

Track the slope triangle through the turn. A quarter turn counterclockwise sends a step ”bb to the right” to a step ”bb up”. The same turn sends the step ”aa up or down” to a horizontal step of −a-a: an upward step (aa positive) turns to a step left, and a downward step (aa negative) turns to a step right. Starting again at PP, the rotated triangle has run −a-a and rise bb, which makes the slope of L2L_2

m2=riserun=b−a=−ba.m_2 = \frac{\text{rise}}{\text{run}} = \frac{b}{-a} = -\frac{b}{a}.

Compare that with m1=abm_1 = \dfrac{a}{b}: the fraction has been flipped and its sign changed, so m2m_2 is the negative reciprocal of m1m_1. Multiplying the two slopes confirms it directly:

m1⋅m2=ab⋅(−ba)=−abab=−1.m_1 \cdot m_2 = \frac{a}{b} \cdot \left(-\frac{b}{a}\right) = -\frac{ab}{ab} = -1.

The argument runs backward too. Suppose two nonvertical lines have slopes whose product is −1-1, which forces one slope to be −ba-\dfrac{b}{a} when the other is ab\dfrac{a}{b}. Then the same quarter turn carries the first line onto a line parallel to the second. Parallel lines lean the same way, so the two lines meet at a right angle. Perpendicular and “slopes multiply to −1-1” are therefore the same condition, each guaranteeing the other.

With the rule in hand, the two jobs it does are quick: reading off a perpendicular slope, and testing whether two given lines are perpendicular.

Worked example 2 Find a perpendicular slope, then test a pair of lines

First, find the slope of any line perpendicular to 2x−3y=62x - 3y = 6. Solve for yy to read its slope. Subtract 2x2x and divide by −3-3:

−3y=−2x+6,y=23x−2,-3y = -2x + 6, \qquad y = \tfrac{2}{3}x - 2,

so this line has slope 23\tfrac{2}{3}. A perpendicular line has the negative reciprocal slope: flip 23\tfrac{2}{3} to 32\tfrac{3}{2} and change the sign,

m⊥=−32.m_{\perp} = -\frac{3}{2}.

Second, are y=23x+1y = \tfrac{2}{3}x + 1 and y=−32x+4y = -\tfrac{3}{2}x + 4 perpendicular? Multiply their slopes and check for −1-1:

23⋅(−32)=−66=−1.\frac{2}{3} \cdot \left(-\frac{3}{2}\right) = -\frac{6}{6} = -1.

The product is −1-1, so yes, the two lines meet at a right angle.

Two perpendicular lines with slopes 2 and negative one halfThe lines y = 2x - 3 and y = -(1/2)x + 2 meeting at the point (2, 1), with a small right-angle square at the intersection.xy0(2, 1)y = 2x - 3y = -(1/2)x + 2
Two perpendicular lines. One has slope 2 and the other has slope negative one half, and 2 times negative one half is negative 1. They cross at (2, 1), and the small square marks the right angle there. Drawing the axes to the same scale is what makes the right angle look square.

Check your understanding

What is the slope of any line perpendicular to the line through the points (1,2)(1, 2) and (5,4)(5, 4)?

Answer choices

The horizontal and vertical case

The negative-reciprocal rule quietly assumes both lines have real-number slopes. So one pair of perpendicular lines slips through the cracks and has to be handled on its own: a horizontal line and a vertical line.

A horizontal line has slope 00, and a vertical line has an undefined slope. Picture the xx-axis and the yy-axis: one runs flat, the other stands straight up, and they cross at a perfect right angle. So a horizontal line is perpendicular to every vertical line, plainly and by sight. But you cannot confirm it with m1⋅m2=−1m_1 \cdot m_2 = -1, because a vertical line has no slope number to multiply, and 00 times “undefined” is not a meaningful product. On the horizontal side the trouble shows up differently: the negative reciprocal of 00 would be −10-\tfrac{1}{0}. Dividing by zero is not allowed, so slope 00 has no negative reciprocal at all. The perpendicular partner of a horizontal line is a vertical line, and you know it because it stands upright, not because a slope product came out to −1-1.

Testing whether two lines are parallel, perpendicular, or neither

Check for a vertical line first, since the slope tests below need a real slope on both sides. If either line is vertical: two vertical lines are parallel when their equations differ and the same line when they match, a vertical line and a horizontal line are perpendicular, and a vertical line paired with any other slanted line is neither.

Once both lines have a real slope, the rest of the routine is short. Find the slope of each line, putting each equation into slope-intercept form or applying the slope formula to two points if that is what you are given. Then compare the two slopes: if they are equal, the lines are parallel (or the same line, when the intercepts match too). If their product is −1-1, the lines are perpendicular. If neither test holds, the lines are neither, crossing at some angle that is not a right angle.

Worked example 3 Classify three pairs of lines

Classify each pair as parallel, perpendicular, or neither.

Pair A: y=4x−1y = 4x - 1 and y=4x+6y = 4x + 6. Both slopes are 44, and the intercepts differ, so the lines are parallel.

Pair B: y=32x+5y = \tfrac{3}{2}x + 5 and 2x+3y=92x + 3y = 9. Convert the second: 3y=−2x+93y = -2x + 9, so y=−23x+3y = -\tfrac{2}{3}x + 3. The slopes are 32\tfrac{3}{2} and −23-\tfrac{2}{3}, and their product is

32⋅(−23)=−1,\frac{3}{2} \cdot \left(-\frac{2}{3}\right) = -1,

so the lines are perpendicular.

Pair C: y=2x+1y = 2x + 1 and y=−2x+1y = -2x + 1. The slopes are 22 and −2-2. They are not equal, so the lines are not parallel, and their product is 2⋅(−2)=−42 \cdot (-2) = -4, not −1-1, so they are not perpendicular either. This pair is neither. Watch the trap: the slopes look related, but a sign flip alone is not the same as a negative reciprocal, which also flips the fraction.

Check your understanding

The lines 3x+4y=83x + 4y = 8 and 4x−3y=124x - 3y = 12 are which of the following?

Answer choices

The figure below opens on Pair C, the trap from the worked example: y=2x+1y = 2x + 1 and y=−2x+1y = -2x + 1. Read the readout sentence under it. It reports that the slopes are different and the lines cross once, and it says nothing about a right angle, because there is not one there. Then try these three changes in order.

First, fix the trap. Leave the first line alone and change the second line’s slope to −12-\tfrac{1}{2}: set its rise to −1-1 and its run to 22. A sign flip was never enough, and this is the step it was missing, the fraction turning over. The readout sentence changes to name the right angle, and the two lines visibly square up.

Second, make the two lines parallel. Move the second line’s yy-intercept away from the first line’s, to −2-2, then set its rise and run to match the first line’s. Now the two lines have the same slope and different intercepts, and the crossing dot disappears: parallel lines have nowhere to meet, and the readout sentence stops naming a crossing point.

Third, make them coincide. Holding that same slope, walk the second line’s yy-intercept back onto the first line’s. The picture now shows what looks like a single line, and the dot is still gone, this time because the two lines meet at every point rather than none. This is the one moment where looking is not enough: only the readout sentence tells you the two equations describe the same line.

Parallel, perpendicular, or neither?

y = 2x + 1. y = -2x + 1. The slopes 2 and -2 are different, so they cross exactly once. They cross at (0, 1). A coordinate plane with two straight lines drawn across it, and a dot marking where they cross when they do. Use the controls below the figure to change the rise, the run or the crossing point of either line. -6 -4 -2 2 4 6 -6 -4 -2 2 4 6
Rise A Run A Crosses A Rise B Run B Crosses B

y = 2x + 1. y = -2x + 1. The slopes 2 and -2 are different, so they cross exactly once. They cross at (0, 1).

Two lines on one coordinate plane, one solid and one dashed, each with its own rise, run and y-intercept. A dot marks where they cross at a single point. It is absent for parallel lines, which never meet, and also for two equations that turn out to be the same line, which meet everywhere and so have no single crossing point to mark.

Writing equations of parallel and perpendicular lines

The slope rules also let you build a line to specification. Given a line and a point not on it, write the line through that point that is parallel, or perpendicular, to the one you were handed. When the given line has a slope, the plan is two steps. Get the slope you need from it (the same slope for parallel, the negative reciprocal for perpendicular). Then feed that slope and the given point into point-slope form and simplify.

When the given line is vertical or horizontal instead, skip point-slope form and use what you already know about writing x=cx = c and y=cy = c equations, together with this lesson’s exception: a vertical line’s parallel partner is vertical, and its perpendicular partner is horizontal. Through the point (5,1)(5, 1), the line parallel to x=−2x = -2 is x=5x = 5 (still vertical, now through x=5x = 5), and the line perpendicular to x=−2x = -2 is y=1y = 1 (horizontal, at the point’s height).

Check your understanding

What is the equation of the line through (4,−3)(4, -3) that is perpendicular to y=6y = 6?

Answer choices

Worked example 4 A line through a point, parallel to a given line

Write the equation of the line through (2,−1)(2, -1) that is parallel to y=3x+4y = 3x + 4, in slope-intercept form.

Parallel means the same slope, and the given line has slope 33, so the new line also has slope 33. Now use point-slope form with the point (2,−1)(2, -1):

y−(−1)=3(x−2),y+1=3x−6.y - (-1) = 3(x - 2), \qquad y + 1 = 3x - 6.

Subtract 11 from both sides to reach slope-intercept form:

y=3x−7.y = 3x - 7.

As a check, the slope is 33 as required, and at x=2x = 2 the equation gives y=6−7=−1y = 6 - 7 = -1, so the line passes through (2,−1)(2, -1).

Worked example 5 A line through a point, perpendicular to a given line

Write the equation of the line through (4,1)(4, 1) that is perpendicular to y=2x−5y = 2x - 5, in slope-intercept form.

The given line has slope 22, so a perpendicular line has the negative reciprocal slope: flip 22 to 12\tfrac{1}{2} and change the sign, giving m=−12m = -\tfrac{1}{2}. Use point-slope form with the point (4,1)(4, 1):

y−1=−12(x−4),y−1=−12x+2.y - 1 = -\tfrac{1}{2}(x - 4), \qquad y - 1 = -\tfrac{1}{2}x + 2.

Add 11 to both sides:

y=−12x+3.y = -\tfrac{1}{2}x + 3.

The slope −12-\tfrac{1}{2} is the negative reciprocal of 22, and at x=4x = 4 the equation gives y=−2+3=1y = -2 + 3 = 1, so the line runs through (4,1)(4, 1) as required.

Worked example 6 Perpendicular to a line given in standard form

Write the equation of the line through (−3,2)(-3, 2) that is perpendicular to 3x+y=73x + y = 7.

First get the slope of the given line by solving for yy: y=−3x+7y = -3x + 7, so its slope is −3-3. The perpendicular slope is the negative reciprocal of −3-3: flip to −13-\tfrac{1}{3} and change the sign, giving m=13m = \tfrac{1}{3}. Now use point-slope form with (−3,2)(-3, 2):

y−2=13(x−(−3))=13(x+3).y - 2 = \tfrac{1}{3}\bigl(x - (-3)\bigr) = \tfrac{1}{3}(x + 3).

Distribute and add 22:

y−2=13x+1,y=13x+3.y - 2 = \tfrac{1}{3}x + 1, \qquad y = \tfrac{1}{3}x + 3.

The slope 13\tfrac{1}{3} times the original −3-3 gives −1-1, confirming perpendicularity, and the line passes through (−3,2)(-3, 2) since 13(−3)+3=2\tfrac{1}{3}(-3) + 3 = 2.

Check your understanding

Which is the equation of the line through (2,7)(2, 7) that is perpendicular to y=12x−8y = \tfrac{1}{2}x - 8?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)
A bit of history (optional)

A stone wall that leans will eventually fall. So how did a builder with no instruments find true vertical?

The answer was a string and a weight. Hang a lump of lead on a cord, let it stop swinging, and gravity does the whole job for you. The taut string points straight down, and it is square to level ground. The Romans called that tool a perpendiculum, from pendere, to hang. Masons had been trusting it for thousands of years before anyone wrote a proof about it.

Our word for a right angle is that tool’s name. Something perpendicular is something that agrees with the plumb line. So the idea of one line standing square to another was named after a cord with a weight tied to the bottom of it. Geometry borrowed the word from the building site.

“Parallel” is Greek and older still. It comes from parallelos, built from para, beside, and allelos, each other. Lines that travel beside one another and never touch.

Both words describe a picture. Neither of them mentions a number, and that is worth noticing, because this lesson has mostly left the picture behind. For any two distinct lines that both have a slope, you can now settle both questions without a drawing: equal slopes for parallel, a product of −1-1 for perpendicular. Only a vertical line still falls back on the picture the two words came from, whether it is paired with another vertical line, a horizontal line, or any other slanted line.