Lines & Graphs

Slopes of Parallel and Perpendicular Lines

Parallel lines have equal slopes, m1=m2m_1 = m_2, and perpendicular lines have slopes whose product is −1-1, so m2=−1m1m_2 = -\frac{1}{m_1}.

m1=m2(parallel),m1m2=−1(perpendicular)m_1 = m_2 \quad \text{(parallel)}, \qquad m_1 m_2 = -1 \quad \text{(perpendicular)}

Try it with your numbers

Show every step

That one pair of facts answers most questions about parallel and perpendicular lines. The rest of this page covers why the rules are true, how to flip awkward slopes, how to write full equations, and the cases where the rules need a small adjustment.

How do you tell if two lines are parallel?

Two non-vertical lines are parallel when their slopes are equal and their intercepts differ. The proof takes one line of algebra. To find where y=mx+b1y = mx + b_1 and y=mx+b2y = mx + b_2 meet, set them equal. The mxmx terms cancel and leave b1=b2b_1 = b_2, which is false for different intercepts, so there is no meeting point. Equal slopes mean the vertical gap between the lines never changes, so they never get closer.

The test is instant in slope-intercept form, but equations rarely arrive that way. Take y=2x+3y = 2x + 3 and 4x−2y=104x - 2y = 10. Solving the second for yy gives −2y=−4x+10-2y = -4x + 10, so y=2x−5y = 2x - 5. Both slopes are 22 and the intercepts are 33 and −5-5, so the lines are parallel. The trap is comparing the coefficient 44 with the 22 and calling the lines different, when the second equation had not yet been solved for yy.

In standard form, Ax+By=CAx + By = C, the slope is −AB-\frac{A}{B}. That gives a faster test: two lines are parallel when the ratio of AA to BB matches, whatever CC is. One more case matters. If the slopes match and the intercepts match too, the two equations describe the same line. Rewrite 4x−2y=−64x - 2y = -6 and you get y=2x+3y = 2x + 3 again. Most courses do not call a line parallel to itself, and in a system of equations this case gives infinitely many solutions.

Quick check

Do y=−13x+2y = -\frac{1}{3}x + 2 and x+3y=9x + 3y = 9 describe parallel lines, the same line, or neither?

Why are perpendicular slopes negative reciprocals?

Start with any line through the origin with slope mm. It passes through the point (1,m)(1, m), because one step right produces a rise of mm. Now rotate the whole picture 90∘90^\circ counterclockwise. A rotation sends (x,y)(x, y) to (−y,x)(-y, x), so (1,m)(1, m) lands on (−m,1)(-m, 1). The rotated line is perpendicular to the original, and its slope is rise over run:

1−m=−1m\frac{1}{-m} = -\frac{1}{m}

Multiply the two slopes and the mm cancels, leaving m⋅(−1m)=−1m \cdot \left(-\frac{1}{m}\right) = -1. Any line parallel to the rotated one is also perpendicular to the original, which is why the rule covers every perpendicular line and not just the ones through the origin.

A second proof uses vectors. The direction of the first line is (1,m1)(1, m_1) and of the second is (1,m2)(1, m_2). Perpendicular directions have dot product zero, so 1+m1m2=01 + m_1 m_2 = 0, which gives m1m2=−1m_1 m_2 = -1. This version is worth keeping, because it handles vertical lines without any trouble (more on that below).

The sign has a picture behind it. Two rising lines both tilt the same way, so they can never meet at a corner of a page. Perpendicular lines always tilt opposite ways, which is why one slope is positive and the other negative. The reciprocal handles the steepness: a steep line pairs with a shallow one.

Try this: Pick the slope 37\frac{3}{7}. Draw the arrow from (0,0)(0, 0) to (7,3)(7, 3), then the arrow from (0,0)(0, 0) to (−3,7)(-3, 7). Find the slope of the second arrow and multiply the two slopes. You should get −1-1 and see a right angle.

How do you flip fractions, negatives and decimals?

Three cards show slope −3/4 flipped only, sign only, and both, with products 1, −9/16 and −1
For −3/4, only flipping and then negating gives 4/3, the one slope whose product with −3/4 is −1.

Finding the perpendicular slope takes three moves, always in the same order:

  1. Write the slope as a fraction. An integer nn becomes n1\frac{n}{1}, and a decimal becomes a fraction.
  2. Flip the fraction, so numerator and denominator swap places.
  3. Change the sign.

A slope of ab\frac{a}{b} therefore becomes −ba-\frac{b}{a}. Students lose most of their points here by doing only one of the two changes. For −34-\frac{3}{4}, flipping alone gives −43-\frac{4}{3} and changing the sign alone gives 34\frac{3}{4}. Both are wrong. The correct answer is 43\frac{4}{3}, and it is the only candidate whose product with −34-\frac{3}{4} is −1-1.

Given slope Parallel slope Perpendicular slope
22 22 −12-\frac{1}{2}
−34-\frac{3}{4} −34-\frac{3}{4} 43\frac{4}{3}
0.40.4 0.40.4 −52-\frac{5}{2}
−6-6 −6-6 16\frac{1}{6}
Decimals go through fractions

Convert first: 0.4=250.4 = \frac{2}{5}, so the perpendicular slope is −52-\frac{5}{2}, which is −2.5-2.5. Flipping a decimal directly is how 0.40.4 ends up as a messy guess.

Another mistake is treating “opposite” and “negative reciprocal” as the same. The slopes 22 and −2-2 are opposites, and their product is −4-4, so those lines are neither parallel nor perpendicular. Always finish with the multiplication check.

How do you write a parallel line through a point?

Keep the slope, then use the point to set the position. Suppose a line must pass through (−2,5)(-2, 5) and be parallel to 3x−4y=83x - 4y = 8. Solving the given equation, −4y=−3x+8-4y = -3x + 8 gives y=34x−2y = \frac{3}{4}x - 2, so the slope is 34\frac{3}{4}. Now apply point-slope form:

y−5=34(x+2)y - 5 = \frac{3}{4}(x + 2)

Distribute to get y−5=34x+32y - 5 = \frac{3}{4}x + \frac{3}{2}, then add 55 to both sides. Since 5+32=1325 + \frac{3}{2} = \frac{13}{2}, the answer is:

y=34x+132y = \frac{3}{4}x + \frac{13}{2}

There is a shortcut when the original is in standard form. A parallel line keeps the same left side, 3x−4y3x - 4y, and only the constant changes. Substitute the point: 3(−2)−4(5)=−6−20=−263(-2) - 4(5) = -6 - 20 = -26, so the line is 3x−4y=−263x - 4y = -26. Multiply the first answer by 44 and you get 4y=3x+264y = 3x + 26, which is the same equation. No fractions appeared at any step.

How do you write a perpendicular line through a point?

Flip and negate the slope, then use the point exactly as before. Find the line through (4,−1)(4, -1) perpendicular to y=−23x+1y = -\frac{2}{3}x + 1. The given slope is −23-\frac{2}{3}, so the perpendicular slope is 32\frac{3}{2}. Point-slope form gives:

y+1=32(x−4)y + 1 = \frac{3}{2}(x - 4)

Distribute: y+1=32x−6y + 1 = \frac{3}{2}x - 6. Subtract 11 from both sides and the result is y=32x−7y = \frac{3}{2}x - 7. Check by substituting x=4x = 4: 32(4)−7=6−7=−1\frac{3}{2}(4) - 7 = 6 - 7 = -1, which matches the point.

For standard form there is a swap trick. If the given line is Ax+By=CAx + By = C, a perpendicular line has the left side Bx−AyBx - Ay. Take the line perpendicular to 5x+2y=105x + 2y = 10 through (3,1)(3, 1). The left side becomes 2x−5y2x - 5y, and the point gives 2(3)−5(1)=12(3) - 5(1) = 1, so the line is 2x−5y=12x - 5y = 1. The slopes confirm it: the given line has slope −52-\frac{5}{2} and the new one has slope 25\frac{2}{5}, and their product is −1-1. The trick works because Bx−Ay=kBx - Ay = k has slope BA\frac{B}{A}, which is the negative reciprocal of −AB-\frac{A}{B}.

Quick check

Write, in standard form, the line through (2,−3)(2, -3) that is perpendicular to 3x+4y=83x + 4y = 8.

Are two lines through given points parallel or perpendicular?

When the lines come as pairs of points, compute each slope with the slope formula, then compare. Line A passes through (−1,3)(-1, 3) and (2,−1)(2, -1). Line B passes through (0,0)(0, 0) and (4,3)(4, 3).

mA=−1−32−(−1)=−43,mB=3−04−0=34m_A = \frac{-1 - 3}{2 - (-1)} = \frac{-4}{3}, \qquad m_B = \frac{3 - 0}{4 - 0} = \frac{3}{4}

The product is −43⋅34=−1-\frac{4}{3} \cdot \frac{3}{4} = -1, so the lines are perpendicular. Subtract in the same order in the numerator and the denominator, because swapping the order in only one of them flips the sign of the slope and wrecks the verdict.

If the slopes were 22 and −2-2, or 12\frac{1}{2} and 33, the answer would be neither. A line that is merely “different” is not perpendicular. If you need the full equation of either line afterwards, the method for the equation of a line through two points picks up exactly where this step ends.

A fraction-free version of the test saves time. Write each line’s steps as (run, rise): A is (3,−4)(3, -4) and B is (4,3)(4, 3). The lines are perpendicular when run times run plus rise times rise equals zero: 3⋅4+(−4)(3)=03 \cdot 4 + (-4)(3) = 0. They are parallel when the cross products match: run1⋅rise2=run2⋅rise1\text{run}_1 \cdot \text{rise}_2 = \text{run}_2 \cdot \text{rise}_1.

What happens with vertical and horizontal lines?

Here the product rule breaks, and the reason is worth knowing. A horizontal line has slope 00 and a vertical line has an undefined slope. The number 00 has no reciprocal, so m1m2=−1m_1 m_2 = -1 cannot even be written. Yet every horizontal line is perpendicular to every vertical line. See horizontal and vertical lines for how y=cy = c and x=cx = c behave.

So the rule has one exception, handled by sight. A line perpendicular to x=4x = 4 is any horizontal line y=ky = k. A line through (2,7)(2, 7) perpendicular to y=−5y = -5 must be vertical, so it is x=2x = 2. Two vertical lines are parallel to each other even though their slopes are both undefined, so “equal slopes” must be read as “both vertical” in that case.

The test that never fails

For direction steps (a,b)(a, b) and (c,d)(c, d), the lines are perpendicular exactly when ac+bd=0ac + bd = 0. A vertical step (0,5)(0, 5) and a horizontal step (3,0)(3, 0) give 0+0=00 + 0 = 0, as they should.

When a problem says “find the slope of a perpendicular line” and the given line is horizontal, the honest answer is “undefined, the line is vertical”, not “no answer”.

Where are parallel and perpendicular lines used?

Systems of equations are the first place most students meet them again. Two parallel lines never meet, so the system has no solution. Two identical lines meet everywhere, so it has infinitely many. Two lines with different slopes meet at exactly one point, and if the slopes multiply to −1-1 they cross at a right angle. In matrix language, a coefficient matrix with a zero 2×2 determinant signals parallel or identical lines, because ad−bc=0ad - bc = 0 is the same as equal slopes.

In coordinate geometry, perpendicular slopes prove that a quadrilateral has right angles or that a triangle is a right triangle. The perpendicular bisector of a segment passes through its midpoint at a right angle, so you need the midpoint formula for the point and the negative reciprocal for the slope. The right angle that the slopes detect is the 90∘90^\circ one from types of angles, and the distance formula with the Pythagorean theorem reaches the same verdict by a different route.

Beyond the classroom, a street grid is a family of parallel and perpendicular lines. Roof rafters are parallel, and the framing square a carpenter uses tests for a right angle. In calculus, the normal line to a curve at a point is perpendicular to the tangent there, so its slope is −1f′(a)-\frac{1}{f'(a)}. The shortest path from a point to a line also runs along the perpendicular, which is why this slope rule underlies distance-to-a-line problems.

Quick check

How many solutions does the system 2x+3y=62x + 3y = 6 and 4x+6y=54x + 6y = 5 have?

How can you check a parallel or perpendicular answer quickly?

Run through these checks in order. They take under a minute and catch almost every error:

  • Parallel: the slopes are equal and the intercepts differ. Equal intercepts too means the same line.
  • Perpendicular: multiply the slopes. The product must be exactly −1-1, and one slope must be positive while the other is negative.
  • Equation of a line: substitute the given point into your final equation. Both sides must match.
  • Scale: if the original line is steep, the perpendicular line must be shallow, and vice versa.

For a visual check, pick two points on each line and plot them on the coordinate plane. Parallel lines look like rails, and perpendicular lines look like the corner of a sheet of paper. Use equal scales on both axes, because a stretched graph makes right angles look wrong.

The solver at the top of the page lets you test your own numbers, and the practice quiz below it lets you try the same steps on fresh problems. If an answer fails a check, go back to the flip-and-negate step first. That one step accounts for most lost points.

Practice problems

0 of 5 solved

  1. Find the slope of any line parallel to y=−4x+9y = -4x + 9.

  2. Find the slope of a line perpendicular to y=35x−2y = \frac{3}{5}x - 2.

  3. Are 2x+5y=102x + 5y = 10 and 5x−2y=45x - 2y = 4 parallel, perpendicular, or neither?

  4. Write the equation of the line through (6,−2)(6, -2) that is parallel to y=−12x+7y = -\frac{1}{2}x + 7.

  5. Write the equation of the perpendicular bisector of the segment from (−2,1)(-2, 1) to (4,5)(4, 5).

Common questions

What is the slope of a line parallel to another line?

It is exactly the same slope. If the given line has slope mm, every line parallel to it also has slope mm, and only the y-intercept (or the point it passes through) changes.

How do you find the slope of a perpendicular line?

Write the slope as a fraction, flip it, and change its sign. A slope of 27\frac{2}{7} becomes −72-\frac{7}{2}, and a slope of −5-5 becomes 15\frac{1}{5}.

Can two lines have the same slope and not be parallel?

Yes, if they also have the same y-intercept they are the same line, not two separate lines. Most courses reserve the word parallel for distinct lines that never meet.

What is the slope of a line perpendicular to a horizontal line?

It is undefined, because the perpendicular line is vertical. A horizontal line has slope 00, and zero has no reciprocal, so the product rule m1m2=−1m_1 m_2 = -1 cannot be used here.

How do you tell if lines in standard form are parallel or perpendicular?

For Ax+By=CAx + By = C the slope is −AB-\frac{A}{B}. Equal values of −AB-\frac{A}{B} with different CC mean parallel, and slopes that multiply to −1-1 mean perpendicular.

Do perpendicular lines always have one positive and one negative slope?

Yes, as long as neither line is horizontal or vertical. Two rising lines or two falling lines can never meet at a right angle, so the slopes must have opposite signs.

Up next