Subject: Class 10 Mathematics Chapter: Coordinate Geometry Topic: 7.1 Distance Formula – Calculate distance between points accurately always
Every object in the world around us occupies a position. In geometry, we describe that position using coordinates. Once two positions are known, the most natural question to ask is: how far apart are they? In Class 10 Mathematics, this question is answered by the distance formula, which is one of the very first tools introduced in the chapter on Coordinate Geometry. The distance formula is important not only because it is directly tested in the board examination, but also because it is used again and again inside other results of this chapter, such as the section formula, the midpoint formula, the area of a triangle and the test for collinearity. A student who calculates distance correctly every time builds a strong foundation for every subsequent topic.
Recall that the coordinate plane is drawn with two perpendicular number lines, the x-axis running horizontally and the y-axis running vertically. Their point of intersection is called the origin and is denoted by O. Every point P in the plane is described by an ordered pair (x, y), where the first number, called the x-coordinate or abscissa, gives the horizontal position, and the second number, called the y-coordinate or ordinate, gives the vertical position. Two points A(x₁, y₁) and B(x₂, y₂) may be anywhere on the plane, and we cannot measure the gap between them with a ruler in an examination. We need an algebraic expression that works for every pair of points, and that expression is the distance formula.
The distance between two points can be found by drawing a right-angled triangle and applying Pythagoras' theorem. Take A(x₁, y₁) and B(x₂, y₂). Through A draw a horizontal line and through B draw a vertical line; let these lines meet at a point C. Then C has coordinates (x₂, y₁). The horizontal leg AC has length |x₂ − x₁|, because it measures how far the x-coordinates are apart, and the vertical leg BC has length |y₂ − y₁|. Since triangle ABC is right-angled at C, Pythagoras' theorem gives AB² = AC² + BC². Substituting the lengths and taking the positive square root, we obtain the distance formula. Notice that the formula uses absolute differences, so the order in which we subtract the coordinates does not matter at all.
For two points A(x₁, y₁) and B(x₂, y₂), the distance AB between them is given by
d = √[(x₂ − x₁)² + (y₂ − y₁)²]
The same formula can be written as d² = (x₂ − x₁)² + (y₂ − y₁)². Because the differences are squared, the result is always a non-negative number, and the square root gives the final answer in the same units as the coordinates. When the coordinates contain square roots or fractions, the answer may also be left in the form of a square root, which is perfectly acceptable in the examination. The formula is symmetric: the distance from A to B is exactly the same as the distance from B to A, which is only natural, since distance is a physical fact independent of direction.
A very important special case is the distance of a point P(x, y) from the origin O(0, 0). Substituting the origin into the formula gives OP = √[(x − 0)² + (y − 0)²] = √(x² + y²). This shorter form is used frequently, for example when checking whether a given point lies on a circle centred at the origin, or when comparing the distances of several points from the origin to decide which is nearest. Another special case occurs when the two points lie on the same horizontal line, so that y₁ = y₂. Then the distance simply equals |x₂ − x₁|. Similarly, for two points on the same vertical line, the distance equals |y₂ − y₁|. Recognising these special cases saves time in the examination.
Find the distance between the points A(2, 3) and B(6, 6). Here x₁ = 2, y₁ = 3, x₂ = 6 and y₂ = 6. The difference in x-coordinates is 6 − 2 = 4, and the difference in y-coordinates is 6 − 3 = 3. Squaring these differences gives 16 and 9, and their sum is 25. Taking the square root gives AB = 5. Notice that the numbers 4 and 3 formed a well-known Pythagorean triple with hypotenuse 5. Whenever the differences form a 3-4-5, 5-12-13 or 8-15-17 triple, the answer comes out as a whole number, and this is a useful check on our working.
The points A(0, 0), B(4, 0) and C(0, 3) are the corners of a right-angled triangle. The side AB is horizontal, so its length is |4 − 0| = 4. The side AC is vertical, so its length is |3 − 0| = 3. The side BC is oblique, and its length must be found with the full formula: BC = √[(0 − 4)² + (3 − 0)²] = √(16 + 9) = 5. So the sides of the triangle are 3, 4 and 5, which forms a right triangle as expected. This example shows that the distance formula works together with the special cases for horizontal and vertical segments to give the complete perimeter of any figure drawn on the coordinate plane.
The distance formula has a very simple and useful property. The squared differences are always non-negative, so the only way their sum can be zero is when both differences are zero. This means that AB = 0 if and only if x₁ = x₂ and y₁ = y₂, that is, the points A and B coincide. This observation gives a clean algebraic test for whether two given ordered pairs represent the same point. It also appears in examination questions that ask for the value of an unknown coordinate when two given points are at a stated distance: we substitute the unknown, set up the equation d² = (difference)² + (difference)², and solve for the unknown value.
| Point A | Point B | x-difference | y-difference | Distance |
|---|---|---|---|---|
| (1, 2) | (4, 6) | 3 | 4 | √(9+16) = 5 |
| (0, 0) | (5, 12) | 5 | 12 | √(25+144) = 13 |
| (−2, 3) | (1, −1) | 3 | −4 | √(9+16) = 5 |
| (0, 0) | (a, b) | a | b | √(a² + b²) |
| (7, −2) | (7, 6) | 0 | 8 | 8 |
| (2, 3) | (9, 3) | 7 | 0 | 7 |
| Mistake made | Wrong answer | Correct working | Correct answer |
|---|---|---|---|
| Adding differences: 4 + 3 = 7 | 7 | √(4² + 3²) = √25 | 5 |
| Forgetting the square root | 25 | √(16 + 9) | 5 |
| Using x₂ − x₁ and y₁ − y₂ inconsistently | varies | (x₂−x₁)² + (y₂−y₁)² | unchanged value |
| Ignoring negative signs in differences | varies | square makes them positive | correct |
| Dropping the root for horizontal lines | — | x₂ − x₁ |
flowchart TD
A[Given points A(x1, y1) and B(x2, y2)] --> B[Find x2 - x1 and y2 - y1]
B --> C{Are both differences zero?}
C -- Yes --> D[Distance = 0, points coincide]
C -- No --> E[Square each difference]
E --> F[Add the two squares]
F --> G[Take positive square root]
G --> H[Write distance AB]
H --> I[Check with Pythagorean triple if possible]
flowchart LR
S[Two points given] --> T{Same y-coordinate?}
T -- Yes --> U[Horizontal segment, d = |x2 - x1|]
T -- No --> V{Same x-coordinate?}
V -- Yes --> W[Vertical segment, d = |y2 - y1|]
V -- No --> X[Use full distance formula]
U --> Y[Distance computed]
W --> Y
X --> Y
Y --> Z[Continue with area or section work]
The diagram below shows the segment joining A(2, 1) and B(6, 4) drawn on a coordinate plane. The horizontal difference is 4 units and the vertical difference is 3 units, so the length of the segment AB is exactly 5 units, forming the familiar 3-4-5 triangle.
<svg viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg">
<rect width="800" height="600" fill="#fdfcf9"/>
<g stroke="#334155" stroke-width="2">
<line x1="80" y1="300" x2="760" y2="300"/>
<line x1="300" y1="40" x2="300" y2="560"/>
</g>
<g fill="#334155" font-family="Arial" font-size="20">
<text x="750" y="322">x</text>
<text x="316" y="56">y</text>
<text x="284" y="330">0</text>
</g>
<g stroke="#475569" stroke-width="2" stroke-dasharray="6 5">
<line x1="380" y1="450" x2="500" y2="450"/>
<line x1="500" y1="450" x2="500" y2="330"/>
</g>
<line x1="380" y1="450" x2="500" y2="330" stroke="#dc2626" stroke-width="4"/>
<g fill="#dc2626" font-family="Arial" font-size="20">
<circle cx="380" cy="450" r="7"/>
<circle cx="500" cy="330" r="7"/>
</g>
<g fill="#2563eb" font-family="Arial" font-size="20">
<text x="400" y="490">A(2, 1)</text>
<text x="512" y="322">B(6, 4)</text>
<text x="426" y="470">dx = 4</text>
<text x="510" y="408">dy = 3</text>
<text x="340" y="280" fill="#dc2626">AB = 5 units</text>
</g>
<text x="120" y="580" fill="#475569" font-family="Arial" font-size="18">Distance AB = sqrt((6-2)^2 + (4-1)^2) = sqrt(16 + 9) = 5</text>
</svg>
This diagram shows how any two points A and B create a right-angled triangle with the helper point C. The legs are the horizontal and vertical differences, and the distance AB is the hypotenuse, exactly as Pythagoras' theorem describes.
<svg viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg">
<rect width="800" height="600" fill="#fdfcf9"/>
<g stroke="#334155" stroke-width="2">
<line x1="60" y1="520" x2="760" y2="520"/>
<line x1="100" y1="580" x2="100" y2="40"/>
</g>
<polygon points="200,460 560,180" fill="none" stroke="#dc2626" stroke-width="4"/>
<polygon points="200,460 560,460 560,180" fill="#bfdbfe" opacity="0.5"/>
<g stroke="#475569" stroke-width="2" stroke-dasharray="5 5">
<line x1="200" y1="460" x2="560" y2="460"/>
<line x1="560" y1="460" x2="560" y2="180"/>
</g>
<g fill="#2563eb" font-family="Arial" font-size="20">
<circle cx="200" cy="460" r="7" fill="#dc2626"/>
<circle cx="560" cy="180" r="7" fill="#dc2626"/>
<circle cx="560" cy="460" r="7" fill="#16a34a"/>
<text x="150" y="496" fill="#dc2626">A(x1, y1)</text>
<text x="568" y="160" fill="#dc2626">B(x2, y2)</text>
<text x="568" y="494" fill="#16a34a">C(x2, y1)</text>
<text x="340" y="492" fill="#475569">leg AC = |x2 - x1|</text>
<text x="576" y="330" fill="#475569">leg BC = |y2 - y1|</text>
<text x="300" y="300" fill="#dc2626">hypotenuse AB = sqrt(AC^2 + BC^2)</text>
</g>
<text x="120" y="580" fill="#475569" font-family="Arial" font-size="18">The distance formula is just Pythagoras' theorem applied to coordinate differences</text>
</svg>
The distance formula is not an isolated tool. It is used to prove the section formula, to derive the coordinates of the midpoint, to compute the area of a triangle through Heron-like checks, and to test whether three points are collinear by checking whether the sum of two distances equals the third. When asked to prove that a quadrilateral is a square, a rectangle, a rhombus or a parallelogram, we compare side lengths and diagonal lengths using this very formula. Practising distance problems with fractions, square roots and negative coordinates makes the formula automatic and prevents the sign errors that cost marks in the board paper.
To master the distance formula, compute distances for at least ten pairs chosen so that the differences are sometimes negative, sometimes fractional, and sometimes involve square roots. Verify each answer by drawing a rough sketch on graph paper, because the picture will immediately reveal a distance that is impossibly small or large. Then solve reverse problems: given the distance between two points and one unknown coordinate, form the equation and solve it. Finally, apply the formula to prove that a given quadrilateral has equal sides or equal diagonals, since these questions appear regularly in the examination.
The distance formula d = √[(x₂ − x₁)² + (y₂ − y₁)²] is the cornerstone of Coordinate Geometry. In the Class 10 board examination, it is tested directly as a two-mark or three-mark question, and it is hidden inside questions on the section formula, the midpoint, the area of a triangle and collinearity. A student who can calculate the distance between two points accurately and quickly, every single time, has already secured a large fraction of the marks available in this chapter. Memorise the formula, practise the special cases of horizontal and vertical segments, and always square the differences before adding them. Do this correctly every time, and the whole chapter opens up.