Model G20 2027 at FLAME University, registrations now open

Distance formula | ICSE Class 9 Maths Notes

24 min read

On this page

This note covers the meaning of distance between points, horizontal and vertical distances, the distance formula and its derivation, distances from the origin, calculations with negative coordinates, and applications to triangles, straight lines, squares and equal distances.

What do coordinates tell us about distance?

Coordinate geometry uses numbers and algebra to study geometrical figures. A Cartesian plane is a flat surface with two perpendicular number lines called coordinate axes. Perpendicular lines meet at a right angle, which measures 90°, where ° denotes degrees.

The horizontal number line is the x-axis, and the vertical number line is the y-axis. Their intersection is the origin, labelled O. Its coordinates are (0, 0). Use the same unit length on both axes when calculating distances.

An ordered pair (x, y) gives a point's coordinates: x is its horizontal coordinate, or abscissa, and y is its vertical coordinate, or ordinate. The signs distinguish opposite directions from the origin. The order of the two coordinates matters.

How is a coordinate different from a length?

A coordinate can be negative. A distance is a non-negative length, so it cannot be negative. The distance between two points is the length of the straight line segment joining them. A segment is the part of a line between its two endpoints.

For points labelled P and Q, the notation PQ denotes the segment or its length, as the context requires. The distance formula calculates this length from the two ordered pairs. It does not require measuring a drawn segment with a ruler.

Definition: The distance between two points is the non-negative length of the line segment joining them, expressed in the same length unit as the coordinates.

Points on the x-axis have coordinates (x, 0), because their vertical coordinate is zero. Points on the y-axis have coordinates (0, y), because their horizontal coordinate is zero. These facts make distances along an axis a useful starting point.

How do we find distances along the coordinate axes?

When two points are on the same coordinate axis, their separation can be found by subtracting their positions along that axis and taking the non-negative value. The other coordinate is zero for both points, so there is no separation in that direction.

How does subtraction give a horizontal distance?

Worked example 1. Find the distance between A(4, 0) and B(6, 0).

Answer: Both points lie on the x-axis. Their distances from the origin are OA = 4 units and OB = 6 units. Therefore, AB = OB − OA = 6 − 4 = 2 units.

The coordinate zero in each ordered pair is important. It establishes that the points lie on the same horizontal axis. Subtracting their horizontal positions therefore gives their full separation, rather than just one component of a sloping segment.

How does subtraction give a vertical distance?

Worked example 2. Find the distance between C(0, 3) and D(0, 8).

Answer: Both points lie on the y-axis. Their distances from the origin are OC = 3 units and OD = 8 units. Hence CD = OD − OC = 8 − 3 = 5 units.

What the figure shows

Points on the coordinate axes

The horizontal axis carries A(4, 0) and B(6, 0); the vertical axis carries C(0, 3) and D(0, 8). Sloping segments connect A to C and B to D.

See Fig. 7.2 in your NCERT textbook

For A and C, subtraction along just one axis is insufficient because both coordinates change. Their horizontal and vertical separations are perpendicular lengths. Combining these lengths requires the theorem for a right-angled triangle, rather than adding the two separations directly.

How is the distance formula derived?

A right-angled triangle has one right angle. Its hypotenuse is the side opposite that angle. Pythagoras' theorem states that the square of the hypotenuse equals the sum of the squares of the other two sides. The superscript ² denotes a square, meaning a number multiplied by itself.

Let P(x₁, y₁) and Q(x₂, y₂) be two points. Here x₁ and y₁ are the coordinates of P, while x₂ and y₂ are those of Q. The subscripts ₁ and ₂ identify the points; they are labels, not multipliers.

How does the right triangle arise?

For the illustrated arrangement, Q is above and to the right of P. Draw perpendiculars PR and QS to the x-axis, with R and S as the points where they meet the axis. Draw a horizontal segment from P meeting QS at T. The triangle PTQ is right-angled at T.

What the figure shows

Right triangle for the distance formula

P(x₁, y₁) and Q(x₂, y₂) are joined by a sloping segment. R and S lie below them on the x-axis. Horizontal PT meets vertical QS at T, forming the right triangle PTQ.

See Fig. 7.5 in your NCERT textbook

  1. The horizontal side has length PT = RS = x₂ − x₁.
  2. The vertical side has length QT = QS − TS = y₂ − y₁.
  3. Pythagoras' theorem gives PQ² = PT² + QT² = (x₂ − x₁)² + (y₂ − y₁)².
  4. Take the non-negative square root, the non-negative number whose square is PQ², to obtain the required length PQ.

Result: The distance formula

PQ = √[(x₂ − x₁)² + (y₂ − y₁)²]. The symbol √ denotes the non-negative square root: the non-negative number whose square equals the quantity inside it. Square brackets group the entire sum beneath the root.

The formula applies to points in different positions and quadrants too. A quadrant is one of the four regions formed by the axes. Differences may be negative, but their squares are non-negative. Distance itself remains non-negative.

Note: The horizontal and vertical sides in the pictured derivation are positive lengths. For general coordinates, use the squared differences in the formula; do not treat a negative coordinate difference as a negative segment length.

How should the distance formula be used step by step?

Begin by recording both ordered pairs carefully. Pair an x-coordinate with the other x-coordinate and a y-coordinate with the other y-coordinate. The formula combines two coordinate differences, each squared separately, before taking the square root of their sum.

What is a reliable calculation sequence?

  1. Identify the first point's coordinates x₁ and y₁ and the second point's coordinates x₂ and y₂.
  2. Write the distance formula before inserting the given values.
  3. Calculate x₂ − x₁ and y₂ − y₁, keeping negative coordinates in brackets.
  4. Square each difference, add the squares, and take the non-negative square root.
  5. State the final answer in units of length, retaining an exact square root where appropriate.

Worked example 3. Find the distance between P(4, 6) and Q(6, 8).

Answer: The coordinate differences are 6 − 4 = 2 and 8 − 6 = 2. Hence PQ² = 2² + 2² = 8, so PQ = √8 = 2√2 units. The notation 2√2 means two multiplied by the square root of two.

An exact value keeps the answer without rounding. Thus 2√2 represents the distance exactly. A decimal approximation is a rounded value and should be identified as approximate. Keeping exact roots is especially useful when later comparing or adding distances.

Property: Reversing the endpoints preserves distance

PQ = QP = √[(x₁ − x₂)² + (y₁ − y₂)²]. Reversing both subtractions changes the signs of the differences but not their squares. Either endpoint can therefore be designated the first point.

In the example, reversing the order gives differences −2 and −2. Their squares are still 4 and 4, so the same distance results. Keep one order throughout the calculation so that the substitutions remain easy to follow and check.

How are negative coordinates handled?

Negative coordinates locate points on the opposite side of an axis from positive coordinates. They do not require a different distance formula. The crucial step is subtraction: subtracting a negative number means adding its positive opposite.

How do points in different quadrants affect the calculation?

Worked example 4. Find the distance between P(6, 4) and Q(−5, −3).

Answer: Using P minus Q for both differences gives 6 − (−5) = 11 and 4 − (−3) = 7. Therefore PQ² = 11² + 7² = 121 + 49 = 170. The distance is √170 units.

The horizontal separation includes the stretches on both sides of the y-axis. Similarly, the vertical separation includes the stretches above and below the x-axis. This explains why the relevant positive lengths are 11 units and 7 units in this example.

What the figure shows

Points in different quadrants

P(6, 4) is above and right of the origin; Q(−5, −3) is below and left. Horizontal PT crosses the y-axis at R(0, 4). Vertical TQ crosses the x-axis at S(−5, 0).

See Fig. 7.4 in your NCERT textbook

What does squaring change?

Using Q minus P instead gives −11 and −7. Squaring the complete bracketed differences again gives 121 and 49. The square removes the sign of each difference; it does not justify changing the original coordinates before subtraction.

Brackets protect the calculation. Write 6 − (−5), rather than silently dropping the negative sign. First simplify the subtraction, then square. A mistake in the subtraction produces the wrong separation even if the later squaring is carried out correctly.

How is distance from the origin calculated?

The origin is a particularly simple endpoint because both its coordinates are zero. Let P(x, y) be any point. Substitution of O(0, 0) and P(x, y) into the distance formula gives the distance OP without introducing any new geometrical rule.

Result: Distance of a point from the origin

OP = √(x² + y²). Here O is the origin, P is the given point, and x and y are P's coordinates. The squares arise from x − 0 and y − 0. Both coordinates contribute unless one is zero.

Do not confuse this distance with a single coordinate. The x-coordinate records horizontal position, while the y-coordinate records vertical position. The distance from the origin combines both perpendicular separations to give the length of the straight segment joining O to P.

How does the formula apply to a geographical layout?

Worked example 5. Town B lies 36 kilometres east and 15 kilometres north of town A. Find their straight-line distance. One kilometre is written as 1 km.

Answer: Choose A as the origin, with east along the positive horizontal axis and north along the positive vertical axis. Using one kilometre per coordinate unit, B is (36, 15). Thus AB = √(36² + 15²) = √(1296 + 225) = √1521 = 39 km.

The two stated movements describe perpendicular components of the separation. Adding them would describe travelling east and then north, rather than the straight segment joining the towns. The right triangle connects the coordinate description to the required distance.

Keep the scale explicit. Here coordinate units represent kilometres, so the result is in kilometres. If a question supplies coordinates without a physical scale, report the distance in units rather than assigning an unstated measurement unit.

How can distances identify the type of a triangle?

Three points are vertices, or corner points, of a triangle when they form a three-sided figure rather than lying on one straight line. Calculating all three distances lets us compare the sides and test whether a right angle occurs.

The triangle inequality says that the sum of any two side lengths of a triangle is greater than the third. Its role here is to distinguish a triangle from three points on a straight line. A drawing can suggest the answer but does not establish it.

How does the converse of Pythagoras' theorem help?

The converse of Pythagoras' theorem states that if the square of one side of a triangle equals the sum of the squares of the other two, the angle opposite that side is a right angle. Compare the largest squared distance with the other two.

Worked example 6. Determine whether P(3, 2), Q(−2, −3) and R(2, 3) form a triangle, and identify its type.

Answer: PQ² = (3 + 2)² + (2 + 3)² = 50; QR² = (−2 − 2)² + (−3 − 3)² = 52; PR² = (3 − 2)² + (2 − 3)² = 2.

Thus PQ = √50, QR = √52 and PR = √2 units. Their approximate lengths are 7.07, 7.21 and 1.41 units respectively. The sum of any two exceeds the third, so they form a triangle.

Also, PQ² + PR² = 50 + 2 = 52 = QR². Therefore the angle at P is a right angle, and PQR is a right-angled triangle.

The right angle is at the common endpoint of PQ and PR, the two sides whose squares are added. QR is opposite P and is the longest side. Naming the vertex makes the conclusion more precise than merely writing “right-angled”.

For the theorem check, use the exact squares 50, 52 and 2. The decimal lengths are approximate and are not needed to establish the exact equality. Comparing squared distances avoids rounding errors in a geometrical proof.

How can the distance formula test collinearity?

Collinear points lie on the same straight line. If one of three distinct points lies between the other two, the two shorter distances add to the distance between the outer points. This gives a distance-based test using the three segment lengths.

Which equality should be checked?

Calculate all three pairwise distances and identify the largest. Compare it with the sum of the remaining two. If AB + BC = AC, then B lies between A and C on their straight segment. The letters identify the points in that particular calculation.

Worked example 7. Test whether A(3, 1), B(6, 4) and C(8, 6) lie on one straight line.

Answer: AB = √[(6 − 3)² + (4 − 1)²] = √18 = 3√2 units.

BC = √[(8 − 6)² + (6 − 4)²] = √8 = 2√2 units.

AC = √[(8 − 3)² + (6 − 1)²] = √50 = 5√2 units.

Since AB + BC = 3√2 + 2√2 = 5√2 = AC, the points are collinear, with B between A and C.

These roots simplify to multiples of the same square root. This permits exact addition: three lots of √2 plus two lots of √2 give five lots of √2. There is no need to replace them with rounded decimals.

Why should actual lengths be added?

The collinearity condition concerns the sum of segment lengths. It is not a statement about adding their squares. Use AB, BC and AC in this test. The squared-length relation belongs to the right-triangle test and answers a different geometrical question.

Identify the middle point from the equality. In AB + BC = AC, the two shorter segments share B. A different naming order would not change the geometry, but the equality would need to match the actual segment lengths.

How can distances prove that four points form a square?

A quadrilateral is a closed plane figure with four straight sides and no crossing sides. Its vertices should be taken in the stated order when identifying sides. A diagonal joins two non-adjacent vertices, meaning vertices that are not endpoints of the same side. For a quadrilateral named ABCD, the sides are AB, BC, CD and DA, while the diagonals are AC and BD.

A square has four equal sides and four right angles. A distance-based proof can establish four equal sides and equal diagonals. Four equal sides alone establish a rhombus, a quadrilateral whose sides are equal, and do not by themselves establish a square.

Which six lengths must be compared?

Worked example 8. Show that A(1, 7), B(4, 2), C(−1, −1) and D(−4, 4), taken in order, are vertices of a square.

Answer: Apply the distance formula to the four sides and the two diagonals. The squared distances are recorded below.

SegmentSum of squared differencesLength in units
AB(1 − 4)² + (7 − 2)² = 9 + 25 = 34√34
BC(4 + 1)² + (2 + 1)² = 25 + 9 = 34√34
CD(−1 + 4)² + (−1 − 4)² = 9 + 25 = 34√34
DA(1 + 4)² + (7 − 4)² = 25 + 9 = 34√34
AC(1 + 1)² + (7 + 1)² = 4 + 64 = 68√68
BD(4 + 4)² + (2 − 4)² = 64 + 4 = 68√68

All four sides equal √34 units, and both diagonals equal √68 units. These equalities establish that ABCD is a square.

How can a right-angle check replace one diagonal calculation?

After proving all four sides equal, calculate AC. Since AD² + DC² = 34 + 34 = 68 = AC², the converse of Pythagoras' theorem gives a right angle at D. A quadrilateral with four equal sides and one right angle is a square.

Either proof must include the condition that distinguishes a square from a general rhombus. State that condition explicitly: equal diagonals in the first method, or a verified right angle in the second.

How are equal-distance conditions converted into equations?

Equidistant means at equal distances. If P is equidistant from A and B, then AP = BP. Since both lengths are non-negative, their squares are also equal, allowing the distance formula to be used without carrying square roots through the algebra.

How is a relation between two coordinates found?

Worked example 9. Find a relation between x and y if P(x, y) is equidistant from A(7, 1) and B(3, 5). Here x and y are the unknown coordinates of P.

Answer: AP² = BP² gives (x − 7)² + (y − 1)² = (x − 3)² + (y − 5)².

Expanding gives x² − 14x + 49 + y² − 2y + 1 = x² − 6x + 9 + y² − 10y + 25.

Cancel the matching x² and y² terms. The remaining equation is −8x + 8y + 16 = 0, which simplifies to x − y = 2.

A relation here is an equation connecting the two coordinates. It does not specify a unique point. Every candidate point must have coordinates satisfying the equation to meet the stated equal-distance condition.

How does a point's position on an axis help?

Worked example 10. Find the point on the y-axis equidistant from A(6, 5) and B(−4, 3).

Answer: Write the unknown point as P(0, y), where y is its unknown vertical coordinate. Equating squared distances gives 36 + (5 − y)² = 16 + (3 − y)².

Expanding gives 36 + 25 − 10y + y² = 16 + 9 − 6y + y². Cancelling and collecting terms gives 4y = 36, so y = 9. The point is P(0, 9).

Check: AP = √[36 + (5 − 9)²] = √52 units, and BP = √[16 + (3 − 9)²] = √52 units. The distances are equal, and the first coordinate is zero as required.

The axis condition supplies part of the ordered pair before the equation is formed. Finish by stating the whole point, not just the value of y. Substitution into both distances then verifies the algebra and the geometric condition together.

Glossary

  • Coordinate geometry — The study of geometrical points and figures using coordinates and algebraic calculations.
  • Cartesian plane — A plane containing two perpendicular coordinate axes used to locate points.
  • Ordered pair — Two coordinates written in a fixed order, horizontal first and vertical second.
  • Abscissa — The horizontal coordinate of a point, written first in its ordered pair.
  • Ordinate — The vertical coordinate of a point, written second in its ordered pair.
  • Origin — The intersection of the coordinate axes, with both coordinates equal to zero.
  • Distance — The non-negative length of the straight line segment joining two given points.
  • Hypotenuse — The side opposite the right angle in a right-angled triangle.
  • Pythagoras' theorem — In a right-angled triangle, the hypotenuse squared equals the sum of the other two sides squared.
  • Square root — A number whose square equals a given number; the distance formula uses the non-negative root.
  • Collinear points — Points that lie on one and the same straight line.
  • Equidistant — At equal distances from the two points under consideration in a problem.
  • Diagonal — A line segment joining two non-adjacent vertices of a quadrilateral.
  • Exact value — A value stated without rounding, such as an unsimplified or simplified square root.

Common errors and misconceptions

  • Misconception: A negative coordinate makes the distance negative. Correct: Coordinates describe position and may be negative, but distance is non-negative. Square each complete coordinate difference and take the non-negative root of their sum.
  • Misconception: Subtracting a negative coordinate means subtracting its positive value. Correct: Retain brackets: 6 − (−5) = 11 in the example with P(6, 4) and Q(−5, −3).
  • Misconception: Horizontal and vertical separations should simply be added. Correct: Their squares are added for straight-line distance. In the town example, the required expression is √(36² + 15²).
  • Misconception: The sum of the squares is the final distance. Correct: That sum is the squared distance. For P(4, 6) and Q(6, 8), PQ² = 8, while PQ = √8 units.
  • Misconception: Collinearity is tested by adding squared distances. Correct: Add actual lengths and compare with the longest distance. An equality between squares is instead used in the right-triangle test.
  • Misconception: Four equal sides are enough to prove a square. Correct: They establish a rhombus. Also verify equal diagonals or a right angle to conclude that the quadrilateral is a square.
  • Misconception: A point on the y-axis has the form (x, 0). Correct: Its first coordinate is zero, so use (0, y). The form (x, 0) describes a point on the x-axis.

Exam-style questions with model answers

Q1. Find the distance between A(4, 0) and B(6, 0), explaining why a single subtraction is sufficient. [2 marks]
  1. Both points lie on the x-axis because each has vertical coordinate zero, so there is no vertical separation.
  2. Their horizontal separation is AB = 6 − 4 = 2 units, which is their complete distance.
Q2. Find the distance between P(6, 4) and Q(−5, −3). Show the coordinate differences and explain the choice of square root. [3 marks]
  1. Using the coordinates of P minus those of Q, the horizontal difference is 6 − (−5) = 11, and the vertical difference is 4 − (−3) = 7.
  2. The distance formula gives PQ² = 11² + 7² = 121 + 49 = 170.
  3. Therefore PQ = √170 units. Choose the non-negative square root because PQ represents a length, even though some of the given coordinates are negative.
Q3. Town B is 36 km east and 15 km north of town A. Using A as the origin and one kilometre per coordinate unit, calculate the straight-line distance AB. [3 marks]
  1. Take east as the positive horizontal direction and north as the positive vertical direction. The towns then have coordinates A(0, 0) and B(36, 15).
  2. Apply the distance formula: AB² = (36 − 0)² + (15 − 0)² = 1296 + 225 = 1521.
  3. Take the non-negative square root to obtain AB = 39 km. This is the straight-line distance represented by the hypotenuse of the triangle formed by the two perpendicular separations.
Q4. Use the distance formula to decide whether A(3, 1), B(6, 4) and C(8, 6) are collinear. Identify the middle point if they are. [4 marks]
  1. Calculate AB = √[(6 − 3)² + (4 − 1)²] = √18 = 3√2 units.
  2. Calculate BC = √[(8 − 6)² + (6 − 4)²] = √8 = 2√2 units.
  3. Calculate AC = √[(8 − 3)² + (6 − 1)²] = √50 = 5√2 units, the largest of the three distances.
  4. Since AB + BC = 3√2 + 2√2 = 5√2 = AC, the points are collinear, and B is the middle point.
Q5. Determine whether P(3, 2), Q(−2, −3) and R(2, 3) form a triangle. If they do, establish whether it is right-angled and identify the right-angle vertex. [5 marks]
  1. The first squared distance is PQ² = (3 + 2)² + (2 + 3)² = 50, giving PQ = √50 units.
  2. The second squared distance is QR² = (−2 − 2)² + (−3 − 3)² = 52, giving QR = √52 units.
  3. The third squared distance is PR² = (3 − 2)² + (2 − 3)² = 2, giving PR = √2 units.
  4. The respective lengths are approximately 7.07, 7.21 and 1.41 units. Each pair has a sum greater than the remaining length, so the points form a triangle.
  5. Using exact squares, PQ² + PR² = 50 + 2 = 52 = QR². The converse of Pythagoras' theorem establishes a right angle at P, opposite the longest side QR.
Q6. Prove using distances that A(1, 7), B(4, 2), C(−1, −1) and D(−4, 4), taken in order, form a square. [6 marks]
  1. Apply the distance formula to AB: AB² = (1 − 4)² + (7 − 2)² = 9 + 25 = 34.
  2. For the next side, BC² = (4 + 1)² + (2 + 1)² = 25 + 9 = 34.
  3. For the remaining sides, CD² = (−1 + 4)² + (−1 − 4)² = 34 and DA² = (1 + 4)² + (7 − 4)² = 34.
  4. The first diagonal satisfies AC² = (1 + 1)² + (7 + 1)² = 4 + 64 = 68.
  5. The second diagonal satisfies BD² = (4 + 4)² + (2 − 4)² = 64 + 4 = 68.
  6. Thus all four sides have length √34 units and both diagonals have length √68 units. Four equal sides together with equal diagonals establish that the quadrilateral ABCD is a square.
Q7. Find the point on the y-axis equidistant from A(6, 5) and B(−4, 3), and verify both distances. [5 marks]
  1. Let the required point be P(0, y), where y is its unknown vertical coordinate. The horizontal coordinate is zero because P lies on the y-axis.
  2. Equidistance gives AP² = BP². Substitution in the distance formula gives 36 + (5 − y)² = 16 + (3 − y)².
  3. Expanding and cancelling y² gives 61 − 10y = 25 − 6y. Hence 4y = 36 and y = 9.
  4. For P(0, 9), calculate AP = √[36 + (5 − 9)²] = √52 units.
  5. Also BP = √[16 + (3 − 9)²] = √52 units. The distances are equal and P is on the y-axis, so the required point is (0, 9).

Key takeaways

  • The distance formula combines the squared horizontal and vertical coordinate differences, then takes the non-negative square root of their sum.
  • Define the coordinates of both endpoints before substitution, and retain brackets around negative coordinates during subtraction.
  • Distance from the origin is √(x² + y²), where x and y are the coordinates of the given point.
  • Reversing the endpoints leaves distance unchanged because reversing each coordinate difference does not change its square.
  • Use exact squared distances to test Pythagoras' converse and identify the vertex opposite the longest side.
  • For three distinct collinear points, the two shorter distances add to the distance joining the outer points.
  • A distance-based square proof needs four equal sides together with equal diagonals or a verified right angle.
  • For an unknown point equidistant from two given points, equate squared distances and use any stated axis condition.

Test yourself

What does the first coordinate in an ordered pair represent?

It is the horizontal coordinate, called the abscissa or x-coordinate of the point.

Why is the distance formula based on Pythagoras' theorem?

The horizontal and vertical separations are perpendicular sides of a right triangle, whose hypotenuse joins the two points.

What is the distance between P(4, 6) and Q(6, 8)?

The differences are 2 and 2, giving PQ = √(2² + 2²) = √8 = 2√2 units.

What changes when the two endpoints are interchanged?

The signs of the coordinate differences reverse, but their squares and the final distance remain unchanged.

For distinct points A, B and C, what does AB + BC = AC establish?

They are collinear, with B lying between A and C on the straight segment AC.

Why are four equal sides insufficient to establish a square?

They establish a rhombus. Equal diagonals or a right-angle check are also needed to establish a square.

A point P lies on the y-axis and is equidistant from A and B. What two conditions begin the calculation?

Write P as (0, y), with y unknown, and set AP² = BP² using the given coordinates of A and B.

For P(x, y) equidistant from A(7, 1) and B(3, 5), what relation connects x and y?

Equating the two squared distances and simplifying gives the coordinate relation x − y = 2.