Slope using coordinates
Give a surveyor two pegs in a field and, without ever pointing a protractor at either, they can tell you how steeply a fence line between them climbs. The trick is the coordinate slope formula — one of the most-used tools in the whole "Straight Lines" chapter of CBSE Class 11 Coordinate Geometry. You already know slope as , the tangent of the angle a line makes with the horizontal. That definition is elegant but hard to use directly: you rarely get handed an angle. What you do get, over and over, are coordinates — two points a line passes through. This article turns those coordinates directly into a slope, shows why the formula is really the same in disguise, flags when slope refuses to exist at all, and uses the idea to test whether three points sit on one straight line.
The slope of a line through and is the ratio of vertical change to horizontal change, , undefined exactly when the line is vertical.
The core idea
From two points to a number. Let a line pass through two distinct points and , with . Its slope is defined as the change in divided by the change in between the two points:
where: is the slope of line , and are the two given points, and the difference must be nonzero for the ratio to be defined.
It agrees with the angle definition. is exactly the vertical rise between the points and is exactly the horizontal run, so their ratio equals , where is the line's inclination — this coordinate formula is not a new idea, just a computable version of .
Order doesn't matter, as long as it's consistent. Swapping which point you call "first" and which "second" flips the sign of both the numerator and the denominator, so the ratio is unchanged: . What you must never do is swap only one of the two subtractions.
Two special cases to recognise on sight. If the line is vertical and the denominator is zero, so the slope is undefined — not zero, not infinite in a usable sense, simply not defined as a number. If the line is horizontal and the numerator is zero, so the slope is exactly .
Why the ratio never depends on which two points you pick. Take any two points on a line and drop a horizontal segment from the left one and a vertical segment from the right one; they meet at a right angle, forming a right triangle whose legs have lengths and . The angle between the line and its horizontal leg is the inclination itself, so . Any other pair of points on the same line forms a similar right triangle — same angle , proportionally scaled legs — so the ratio of vertical to horizontal leg is identical every time. That is precisely why slope is a property of the whole line, not of any one pair of points on it.
Show that for any two distinct points and on a line with , the slope defined by the line's inclination equals exactly , regardless of which of the two points is labelled first, and this ratio is the same no matter which two points on the line are used to compute it.
Step 1. Draw the line through and , and let be its inclination — the angle it makes with the positive direction of the x-axis, measured anticlockwise, with and so the line is not vertical.
Step 2. From draw a horizontal segment to the point directly below or above , and from draw a vertical segment up to . Because is horizontal and is vertical, angle is a right angle, and triangle is right-angled at .
Step 3. The length of the horizontal leg is and the length of the vertical leg is . Because is itself a segment of the line, the angle that makes with the horizontal leg is exactly the inclination of the whole line.
Step 4. By the definition of tangent in a right triangle, equals the opposite leg over the adjacent leg at the vertex : . Keeping track of signs (rather than just magnitudes) so the formula works whether the line rises or falls, this becomes , and since slope is defined as , we get .
Step 5. To confirm the formula does not depend on labelling, swap the points: using first and second gives , which is the previous fraction with both numerator and denominator multiplied by , so the value is unchanged. Hence the coordinate slope formula is well-defined for the line itself, not for an ordered pair of points.
Worked example
Problem. Find the slope of the line through and , then use the same method to check whether , , and are collinear.
Step 1. Apply the formula to and with and :
Step 2. Sanity-check the sign: as increases from to , increases from to , so the line rises left to right — a positive slope of is consistent with the picture.
Step 3. Now take the second, unrelated set of points , , , and find the slope of : . Find the slope of : .
Step 4. Since and both were computed through the shared point , the three points lie on one straight line. As a cross-check, the slope of directly is , agreeing with both.
Final answer: the slope of is , and , , are collinear because .
Competitive stretch
Find so that , , are collinear. Set : , so , giving , so . This kind of "find the unknown coordinate that keeps points collinear" question is a favourite in competitive papers precisely because it needs nothing beyond the slope formula, applied twice.
Common traps
- Mixing up which coordinate goes on top: it is always , change in over change in , never the reverse.
- Subtracting in a criss-cross, mismatched order — for example computing — which flips the sign of the slope and gives a wrong answer even though the arithmetic "looks" fine.
- Forgetting to check before dividing; if the two points share an x-coordinate the line is vertical and the slope is undefined, not zero.
- In collinearity checks, comparing the wrong pair of slopes, or computing them with inconsistent point order, and getting a spurious mismatch that suggests three points are not collinear when they actually are.
Ask the tutor: want a quick set of coordinate-slope and collinearity practice problems, or a walk-through of how this formula feeds into the point-slope form of a line's equation?
Why is the slope of a vertical line undefined instead of just being infinity?
Because slope is defined as a ratio , and division by zero simply has no numerical value in ordinary arithmetic — it is not that the answer is some very large number. A vertical line has no finite either, since and tangent is undefined there. So "undefined" is the mathematically honest description, and it is a separate case you must check for before dividing, not a number you can compute and then interpret as infinite.
Do I always have to call one point 1 and the other point 2, and does it matter which is which?
No — you can label either point as and the other as ; the formula gives the same slope either way, because swapping the labels multiplies both the numerator and the denominator by , leaving the ratio unchanged. What you cannot do is swap only one of the two subtractions, for example using on top but on the bottom — that genuinely flips the sign and gives a wrong slope.
If three points give equal slopes for AB and BC, is that always enough to prove collinearity, or do I need to check AC too?
Equal slopes for and already prove collinearity, because both segments share the point and pass through it in the same direction — two lines through a common point with the same slope must be the same line. Checking as well is not logically necessary, but it is a quick, cheap arithmetic cross-check that catches labelling or calculation slips, which is why worked solutions often include it as a final verification step.