Slope of a Line
One number decides how a line behaves: its slope. It tells you whether the line climbs or falls, how steeply, whether it is horizontal or vertical, and whether it will ever meet another line. This lesson derives the slope from the geometry of similar triangles, links it to the angle of inclination through the tangent function, and develops the three tests â parallel, perpendicular and collinearity â that the rest of the chapter is built on.
What You'll Learn
- 1Derive the slope formula from rise over run using similar triangles
- 2Convert between a slope and the angle of inclination of the line
- 3Apply the parallel and perpendicular slope conditions in both directions
- 4Test three points for collinearity by comparing slope pairs
Deriving the Slope from Rise over Run
Take two points and on the line and complete the right triangle with legs parallel to the axes. The vertical leg is and the horizontal leg is , so
Two facts make this well defined. First, any other pair of points on the same line gives a similar triangle, so the ratio does not depend on which pair you pick â that independence is the whole content of the theorem about similar triangles. Second, the formula is undefined when , which is precisely the case of a vertical line; vertical lines have no slope.
Angle of Inclination
The same right triangle that produced the slope shows that the rise over run ratio is exactly the tangent of this angle:
Because has period , each slope corresponds to exactly one inclination in the half-turn range, and a negative slope always corresponds to an obtuse angle. For example gives , not : the line falls to the right, and the acute angle it makes with the axis is while its inclination is .
| Orientation of the line | Slope | Inclination | Example |
|---|---|---|---|
| Rising to the right | acute, between and | ||
| Falling to the right | obtuse, between and | ||
| Horizontal | |||
| Vertical | undefined |
Parallel and Perpendicular Lines
For perpendicular lines, the condition follows from the tangent of a difference of angles. If the two lines meet at right angles, their inclinations differ by , and must be undefined â which happens when :
So a line of slope meets a line of slope at right angles, and a line of slope meets a line of slope . The product rule fails for horizontal and vertical pairs only because one of them has no slope at all; they are perpendicular anyway, and must be recognised from their orientation rather than from a product.
Four Worked Problems
Extracting the Slope in Python
Converting a general equation to slope-intercept form in code is a two-line job, and the parallel and perpendicular checks follow from arithmetic.
def slope_from_points(p, q):
x1, y1 = p
x2, y2 = q
if x1 == x2:
return None # vertical line, slope undefined
return (y2 - y1) / (x2 - x1)
m1 = slope_from_points((2, 3), (6, 7))
m2 = slope_from_points((2, 3), (4, 7))
print("slope 1 =", m1) # 1.0
print("slope 2 =", m2) # 2.0
print("parallel:", m1 == m2) # False
print("perpendicular to 2:", -1 / m2) # -0.5
Collinearity and slope extraction from the form can both be checked numerically.
import math
def slope_from_general(A, B, C):
return None if B == 0 else -A / B # y = -(A/B) x - C/B
print("slope of 3x + 4y - 12 =", slope_from_general(3, 4, -12)) # -0.75
m = slope_from_general(3, 4, -12)
print("inclination in degrees =",
round(math.degrees(math.atan(m)) % 180, 2)) # 143.13
def collinear(a, b, c):
(x1, y1), (x2, y2), (x3, y3) = a, b, c
return (y2 - y1) * (x3 - x1) == (y3 - y1) * (x2 - x1)
print(collinear((1, 1), (2, 3), (3, 5))) # True
print(collinear((1, 1), (2, 3), (3, 6))) # False
The cross-multiplied form used in collinear avoids division altogether, so it also works when two of the points share an -coordinate.
What CBSE Asks on This Topic
Objective questions give two points and ask for the slope, or give an equation in general form and ask for the slope without requesting the full conversion. Three-mark questions combine ideas: find the slope of one line, impose the perpendicular condition, and solve for an unknown coordinate. Another recurring form asks for the inclination, where you must decide whether to report the acute angle with the axis or the inclination itself â the question wording decides. Marks are lost by taking the reciprocal instead of the negative reciprocal, and by forgetting that vertical lines have undefined slope. When a question mentions three points, writing both slope ratios explicitly is the expected method; a bare statement that they are collinear earns little.
Common Mistakes
Taking the negative reciprocal as just the reciprocal
Fix: Perpendicular slopes multiply to minus one, so the slope perpendicular to 3 is minus one third, not one third.
Reporting an undefined slope as zero
Fix: A vertical line has undefined slope because its run is zero, while a horizontal line has slope zero.
Comparing slopes from inconsistently ordered points
Fix: Keep the same point first in both numerator and denominator, or cross-multiply before comparing.
Key Takeaways
- Slope is rise over run and is independent of which two points you pick on the line
- The slope equals the tangent of the angle of inclination, so positive slopes give acute angles and negative slopes obtuse ones
- Parallel lines share a slope while perpendicular slopes multiply to minus one
- Three points are collinear exactly when the two slope ratios computed from them agree
Practice Problems
- Find the slope of the line passing through and .
- If a line has slope , what is the slope of a line parallel to it, and what is the slope of one perpendicular to it?
- Find the slope of the line and state its inclination to the nearest tenth of a degree.
- Check whether the points , and are collinear.
- A line through is perpendicular to the line through and . Find its slope.