Two lines are parallel when their slopes are equal and their y-intercepts differ, and perpendicular when their slopes multiply to −1 (equivalently, one slope is the negative reciprocal of the other). Vertical and horizontal lines are the exception that trips most people: a vertical line has undefined slope, so it can't be tested with the reciprocal rule — a vertical line is perpendicular to any horizontal line, and parallel only to another vertical line.
That's the whole test in one breath. What follows is the version you can actually use: how to read slope off different equation forms, how to handle the undefined-slope case without guessing, how to tell "parallel" from "same line," and where the multiply-to-−1 rule quietly fails on a calculator or a spreadsheet.
Slope tells you almost everything, but only after you fix the equation's form
The slope of a line is the change in y divided by the change in x between any two points on it, written m = (y₂ − y₁)/(x₂ − x₁). Two points are all you need; a graph is not. This is the single number that carries the line's direction, and direction is what parallel and perpendicular are about.
Before you compare anything, get both equations into slope-intercept form, y = mx + b. An equation like 4x + 2y = 10 hides its slope until you solve for y, at which point it reads y = −2x + 5 and the slope is −2. Comparing the raw coefficients of standard form is the most common source of wrong answers.
Watch the subtraction order in the slope formula. If you compute (y₂ − y₁) but (x₁ − x₂), you've flipped the sign of the slope and every conclusion downstream is wrong. Pick one order and apply it to both coordinates in the same sequence.
A line's slope is independent of which two points you choose on it, which is exactly why the test works. Take any two distinct points on a straight line and the ratio comes out identical. If it doesn't, you're not looking at a line — check your arithmetic before anything else.
A three-step test that handles parallel, perpendicular, and neither
Run these steps in order. Most errors come from skipping step 1 or stopping at step 2.
1: Rewrite both equations as y = mx + b. Solve for y completely, including dividing every term by the y-coefficient. If the equation is already in that form, move on. 2: Record each slope with its sign. Write m₁ and m₂ explicitly, negative signs included. For x = 3, write "undefined" rather than a number. 3: Apply the test. Equal slopes → parallel (then check intercepts, see below). Product of slopes equal to −1 → perpendicular. Neither → the lines intersect at some angle that is not 90°.
Failure handling matters more than the steps. If your product of slopes comes out to something like −0.9999 instead of −1, you have a rounding problem, not a geometry problem — fractions avoid it entirely. If one slope is undefined and the other is zero, the lines are perpendicular. If one is undefined and the other is any finite number, they are neither parallel nor perpendicular; they meet at a non-right angle.
Worked examples: parallel, perpendicular, and the "neither" case people skip
Take the line through (2, 3) and (6, 11). Slope = (11 − 3)/(6 − 2) = 8/4 = 2. A second line through (1, 0) and (4, 6) has slope (6 − 0)/(4 − 1) = 6/3 = 2. Equal slopes, different intercepts — parallel. Note the intercepts: the first line is y = 2x − 1, the second is y = 2x − 2. Distinct, so genuinely parallel.
Now a perpendicular pair. Line A: y = (3/4)x + 1, so m₁ = 3/4. Line B: y = −(4/3)x − 2, so m₂ = −4/3. Multiply: (3/4)(−4/3) = −12/12 = −1. Perpendicular. The negative reciprocal of 3/4 is −4/3, and that's the fastest mental check once you're comfortable with fractions.
The "neither" case: y = 2x + 1 and y = 3x − 4. Product is 6, not −1, and the slopes differ. The lines cross. Solving 2x + 1 = 3x − 4 gives x = 5, y = 11, so they meet at exactly (5, 11) — a useful sanity check that they aren't secretly parallel.
The one students most often mark wrong: y = 5 and x = −2. The first is horizontal (slope 0), the second vertical (undefined). They are perpendicular. No multiplication is possible, so the product rule simply doesn't apply — direction does.
Undefined slopes and the limits of the negative-reciprocal rule
A vertical line has no finite slope because the run is zero, and division by zero is undefined. That single fact is why "m₁ × m₂ = −1" can't be your only test. The rule presumes both slopes exist.
Horizontal lines have slope 0, and the negative reciprocal of 0 would be −1/0, which is undefined. So the pairing works only if you read it in both directions: horizontal is perpendicular to vertical, and the algebra agrees once you allow the undefined slope as its partner rather than trying to compute it.
Textbook answer keys sometimes write "no slope" for a vertical line and "zero slope" for a horizontal one, then expect you to treat them as opposites. Those two phrases are not the same thing, and swapping them is a classic grading loss. Write "undefined" for vertical.
Here's the boundary to state plainly: the reciprocal test applies to non-vertical lines only. For anything involving a vertical line, decide by inspection — vertical versus horizontal is perpendicular, vertical versus vertical is parallel (if distinct), and vertical versus anything slanted is neither.
The same-line trap: parallel requires distinct intercepts
Equal slopes make two lines parallel or identical; only the intercept decides which. y = 3x + 2 and 6x − 2y = −4 look different until you solve the second: −2y = −6x − 4, so y = 3x + 2. Same slope, same intercept, same line. Calling that "parallel" is wrong in the strict sense — a line isn't parallel to itself in most textbook conventions.
Check it by subtracting: if two equations reduce to an identity like 2 = 2, they describe one line. If they reduce to a contradiction like 2 = 5, they're parallel and never meet. That elimination check is faster and more reliable than eyeballing intercepts.
This matters in coordinate-geometry problems that ask "how many solutions does the system have?" Parallel distinct lines → zero. Same line → infinitely many. Perpendicular lines → exactly one, and you can find it.
When a problem supplies only two points per line and no equations, you still compute slopes first, then intercepts if the slopes match. Skipping the intercept comparison is the single most common way a correct slope calculation turns into a wrong conclusion.
Reading slope off tables, graphs, and two-point data
From a table, pick any two rows and apply the formula. A table showing (1, 4), (3, 10), (5, 16) has slope (10 − 4)/(3 − 1) = 6/2 = 3, and the next row confirms it: (16 − 10)/(5 − 3) = 3. Consistent slope means a straight line; inconsistent means it isn't one, and the parallel test doesn't apply.
From a graph, count rise over run between two clear lattice points. If the line passes through (0, 1) and (2, 5), it rises 4 and runs 2, so m = 2. Grid lines make this exact only if the intersections are truly on grid points — a line through (0.5, 1) won't give a clean count.
Real-world data adds a caveat. Surveying elevations, for instance, rarely produce exact slope matches, so a "parallel" conclusion from field data is always approximate. Geometry problems give exact values; measurement gives values with error bars, and the −1 test then becomes a tolerance question rather than a yes/no.
If you're handed a graph and asked to identify a perpendicular partner, the visual cue is a right angle at the crossing — but rotated coordinates can disguise a right angle that looks like 80°. Trust the slope arithmetic over the picture every time.
Common mistakes and how to catch each one
Forgetting to divide by the y-coefficient is the top error, and it produces slopes that are off by a constant factor. Catch it by substituting a point back into your rewritten equation.
Dropping a negative sign comes second. The negative reciprocal of 2 is −1/2, not 1/2. Catch it by multiplying your two slopes; if you get +1 instead of −1, a sign slipped.
Treating 0 and undefined as reciprocals is third. They aren't numbers you can multiply into −1, and the pairing is handled by direction, as above.
Using the wrong subtraction order in the slope formula flips signs on one line only, which can turn a parallel pair into a "perpendicular" answer or vice versa. Write the formula down with the order fixed before substituting.
Rounding fractions to decimals early is the quiet one. 1/3 becomes 0.333, its negative reciprocal becomes −3.003, and the product is −0.999. Keep fractions until the final answer whenever the problem allows it.
Where the test shows up in practice: construction, CAD, and spreadsheets
In construction layout, parallel and perpendicular checks are how you confirm a rectangular foundation is actually square. The 3-4-5 method — a triangle with legs of 3 and 4 units and a hypotenuse of 5 — guarantees a right angle, and carpenters use multiples of it (6-8-10, 9-12-15) to scale up. That's the perpendicular condition in physical form.
In CAD software, constraints named "parallel" and "perpendicular" enforce the relationship rather than testing it, and they operate on the geometry directly, including vertical lines that defeat the slope formula. If you're checking a drawing by hand instead, the slope test is the fallback.
Spreadsheets are where the reciprocal rule silently fails. A formula computing the product of two slopes will return an error or a garbage value when one slope's run is zero, because it divides by zero. Guard the calculation: test for a zero run first, then apply the reciprocal rule only to the remaining cases.
Note the difference between a tolerance check and an exact one. In CAD, a perpendicular constraint is exact within the software's precision. In a field measurement, "perpendicular" means within whatever tolerance the project specifies — often a fraction of a degree — and the slope product will only approach −1, never hit it.
FAQ
Can two lines with the same slope ever intersect?
No — equal slopes and different intercepts mean the lines never meet, which is the definition of parallel in Euclidean geometry. If they share both slope and intercept, they're the same line, not two intersecting ones. The only escape is non-Euclidean geometry, where parallel lines can behave differently; standard coordinate geometry doesn't apply there.
What's the slope of a line perpendicular to a vertical line?
Zero. A vertical line has undefined slope, and any horizontal line is perpendicular to it, so the answer is 0, not "negative reciprocal of undefined." Writing −1/0 is a sign you've tried to apply the formula where it doesn't hold. Decide this case by direction, not by arithmetic.
Is a line parallel to itself?
Most textbooks say no — parallel requires two distinct lines, so a line compared with itself is "coincident," not parallel. Some definitions allow it, which is why answer keys vary. In a system-of-equations context, the distinction matters: coincident lines have infinitely many intersection points, parallel ones have none.
How do I check perpendicularity on a calculator that only gives decimal slopes?
Multiply the two decimals and see whether the result is −1 within rounding tolerance. For slopes of 0.75 and −1.3333, the product is −0.999975, which is −1 to four decimal places — perpendicular. If the product lands near −0.9 or −1.1, it isn't a rounding artifact; the lines aren't perpendicular.
Do parallel lines have to be the same distance apart everywhere?
Yes, in Euclidean geometry — that constant separation is what equal slopes guarantee. The perpendicular distance between y = 2x + 1 and y = 2x + 5 is fixed at every point along either line. Curved surfaces break this, which is why the test is stated for the coordinate plane.
What if the two lines are given as ax + by = c and dx + ey = f?
Compare the ratios rather than the slopes. If a/d = b/e but not c/f, the lines are parallel. If a/d = b/e = c/f, they're the same line. Perpendicularity requires converting to slope-intercept form first, since the coefficient ratio alone doesn't encode the negative reciprocal cleanly.
Can perpendicular lines have positive slopes both?
No. The product of two positive numbers is positive, and perpendicularity requires a product of −1, so one slope must be negative (or one must be zero with the other undefined). If both your slopes come out positive, you've made a sign error somewhere in the algebra.
Why does the product of perpendicular slopes equal −1?
Rotating a line by 90° swaps its rise and run and flips one sign, so slope m becomes −1/m. Multiplying m by −1/m gives exactly −1 by construction. That geometric fact is the reason the rule works, and it's why the rule can't be extended to vertical lines — the rotation sends a finite slope to an undefined one.