Distance between points
Two points on graph paper, and you want the straight-line gap between them without ever picking up a ruler. That is exactly what the distance formula does: feed it the coordinates of and , and it hands back the length by arithmetic alone. It sits third in the ICSE Class 9 Coordinate Geometry chapter, right after plotting points on the Cartesian plane and solving equations graphically, and it leans on nothing more exotic than the Pythagoras theorem you already know from the Geometry strand. The payoff is bigger than a single number. Once you can measure any segment on the plane, you can decide whether three points line up straight (collinear), what kind of triangle three points form, and whether four points trace out a square, rectangle, or parallelogram — all without drawing an accurate diagram. This section builds the formula from a right triangle, works through both a plain distance and a collinearity check, and flags the slips that cost the most marks.
The distance between and is the hypotenuse of a right triangle with legs and , so by the Pythagoras theorem.
The core idea
Setting up the right triangle. Plot and on the Cartesian plane. Draw a horizontal line through and a vertical line through (or the other way round); they meet at a third point . Because one line is horizontal and the other vertical, the angle at is exactly , so triangle is right-angled at with and .
Applying Pythagoras. In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. Here the hypotenuse is , the segment we actually want:
where: is the horizontal leg, is the vertical leg, and is the distance between the two original points. Taking the square root of both sides gives the distance formula itself:
where: is the distance between and , and are their coordinates in any order (each difference is squared, so a sign flip does not change the answer), and the units of match whatever units the coordinates are measured in. Swapping which point you call "1" and which you call "2" leaves unchanged, because — a useful check when you are unsure which point to subtract from which.
Distance from the origin. A common special case is the distance of a point from the origin . Substituting into the formula collapses it to
which is worth remembering on its own, since it turns up whenever a question asks "how far is this point from ."
What the formula is used for. Beyond a raw length, the same formula tells you whether three points , , form a triangle (compute all three sides , , ; equal sides signal an isosceles or equilateral triangle, and -type relations signal a right angle by the converse of Pythagoras theorem) or whether they are collinear instead — no triangle at all, just three points on one line, which happens exactly when the sum of two of the distances equals the third. It also lets you verify that four points form a square, rectangle, or parallelogram by comparing all four sides and both diagonals.
The goal of this derivation is to show, using only the definition of a right triangle and the Pythagoras theorem already known from the Geometry strand, that the straight-line distance between any two points and on the Cartesian plane can be computed purely from their coordinates as , with no measuring tool needed.
Step 1. Construct a right triangle from the two points. Through draw a horizontal line, and through draw a vertical line; call their intersection . Since shares its -coordinate with and its -coordinate with , . The line is horizontal and the line is vertical, so they meet at exactly : triangle is right-angled at .
Step 2. Measure the two legs along the grid. The horizontal leg spans from to at the fixed height , so its length is . The vertical leg spans from to at the fixed position , so its length is . Both legs lie along grid directions, so their lengths are just the numerical differences of the coordinates, no diagonal measurement required.
Step 3. Apply the Pythagoras theorem to the hypotenuse. The segment is the hypotenuse of the right triangle (it is opposite the right angle at ), so . Substituting the leg lengths from Step 2, and noting that squaring removes the absolute value bars since , gives .
Step 4. Take the square root to isolate the distance. Since a length is never negative, . Renaming as gives the standard form , valid for any two points anywhere on the plane, including when one or both coordinates are negative, because the differences are squared before the square root is taken.
Worked example
Find the distance between the points and , and then check whether the point , , are collinear.
Step 1. Label the coordinates for and : take and . Substitute into the distance formula: .
Step 2. Simplify inside the square root. and , so . This is a –– right triangle in disguise: the horizontal leg is units, the vertical leg is units, and the hypotenuse — the distance — is units. So .
Step 3. For the collinearity check, compute all three pairwise distances among , , using the same formula. . . .
Step 4. Compare the sums: . Since the sum of the two shorter distances equals the longest distance, lies exactly on the segment joining and , so , , do not form a triangle — they are collinear.
Competitive stretch
If instead had come out greater than for every pairing (the strict triangle inequality), the three points would form a genuine triangle, and you could go on to test its type by comparing the three side lengths — equal sides for isosceles or equilateral, or -style relations for a right angle, using the converse of Pythagoras theorem.
Common traps
- Forgetting to square before adding: some students write or take a square root too early. Square each difference, add the two squares, then take exactly one square root at the end.
- Sign errors with negative coordinates: when a coordinate is negative, e.g. , remember . Write the subtraction out fully before squaring rather than doing it in your head.
- Assuming equal-looking distances always mean equilateral: always compute the exact distances (or compare simplified surd forms), not a rough sketch estimate.
- Mixing up the collinearity test with the triangle-type test: collinear points satisfy (sum of two distances) equals (the third distance); a genuine triangle needs the strict triangle inequality, sum of any two sides greater than the third. Check which condition actually holds before concluding.
Ask the tutor: Stuck on a sign error with negative coordinates, or want to check step by step whether a set of points forms a triangle or a straight line? Ask the AI tutor to walk through it with you.
Does it matter which point I call x1 y1 and which I call x2 y2?
No. Because each difference is squared in the formula, always equals , so swapping the labels gives exactly the same value of . Pick whichever point is more convenient to subtract from, usually the one that keeps more numbers positive, and stay consistent for both the and differences within the same calculation.
Why do I square the differences instead of just adding the horizontal and vertical gaps?
Adding the two legs directly would give you the length of a path that goes along the grid, like walking along streets in a city, not the straight-line distance "as the crow flies." The straight segment is the hypotenuse of a right triangle whose legs are those two gaps, and the Pythagoras theorem is exactly the rule that converts two perpendicular leg lengths into the length of the hypotenuse — hence the squares, the addition, and the final square root.
How do I quickly tell three points are collinear without drawing them?
Compute all three pairwise distances between the points using the distance formula, then check whether the two shorter distances add up to exactly the longest one. If they do, the middle point sits exactly on the segment joining the outer two, so the three points lie on a single straight line and cannot form a triangle. If the sum is strictly greater than the longest distance instead, the points do form a genuine triangle.