What is the distance formula? The distance formula calculates the straight-line distance between any two points in a coordinate plane. If P($x_1$, $y_1$) and Q($x_2$, $y_2$) are two points, the distance PQ is given by:
$PQ=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$
This formula comes directly from the Pythagorean theorem. Drop a horizontal line from P and a vertical line from Q; they meet at a right angle at the point R$(x_2, y_1)$. The horizontal leg PR has length $|x_2-x_1|$ and the vertical leg QR has length $|y_2-y_1|$. Since PQ is the hypotenuse, $PQ^2=(x_2-x_1)^2+(y_2-y_1)^2$, and taking the positive square root gives the formula above. Because we square the differences, the order in which you subtract does not matter — $(x_2-x_1)^2=(x_1-x_2)^2$.
Distance of a point from the origin. The origin is O$(0,0)$, so the distance of any point P$(x,y)$ from the origin is the special case
$OP=\sqrt{(x-0)^2+(y-0)^2}=\sqrt{x^2+y^2}$.
Why the distance formula is so useful. Almost every "type of figure" question in coordinate geometry is solved by computing a few distances and comparing them. The table below lists what to check.
| To prove the figure is a… | Condition on side / diagonal lengths |
|---|
| Isosceles triangle | Exactly two sides equal |
| Equilateral triangle | All three sides equal |
| Right triangle | Pythagoras holds: (longest side)$^2$ = sum of squares of the other two |
| Square | All four sides equal and both diagonals equal |
| Rhombus | All four sides equal, but diagonals unequal |
| Rectangle | Opposite sides equal and both diagonals equal |
| Parallelogram | Opposite sides equal (diagonals need not be equal) |
Testing collinearity with distances. Three points A, B, C are collinear when one of the three distances equals the sum of the other two — for example AB + BC = AC means B lies between A and C on a straight line. If no such sum holds, the points form a genuine triangle.
Finding an unknown coordinate. When you are told a distance and one coordinate is unknown, set up the equation $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}=d$, square both sides to clear the root, and solve. Squaring often gives a quadratic, so be ready for two answers — both may be valid points.
Key properties.
- Distance is always non-negative; we keep only the positive square root.
- Distance is symmetric: PQ = QP.
- If the points share the same $y$ (a horizontal line), distance $=|x_2-x_1|$.
- If the points share the same $x$ (a vertical line), distance $=|y_2-y_1|$.
Common mistakes to avoid.
- Forgetting to square the differences, or forgetting the square root at the end.
- Sign slips with negative coordinates: $(-2)-(3)=-5$, and $(-5)^2=25$ — keep the minus inside the bracket until you square.
- Declaring a square too early — equal sides alone give a rhombus; you must also check the diagonals are equal.
- For a right triangle, always square the largest side and test it against the sum of the other two squares.
Find the distance between the points A(2, 3) and B(5, 7).
Solution- Step 1: Write $x_1=2,\ y_1=3,\ x_2=5,\ y_2=7$.
- Step 2: $x_2-x_1=5-2=3$ and $y_2-y_1=7-3=4$.
- Step 3: $AB=\sqrt{3^2+4^2}=\sqrt{9+16}=\sqrt{25}$.
Answer: $AB=5$ units
Find the distance of the point P(−6, 8) from the origin.
Solution- Step 1: Distance from origin $=\sqrt{x^2+y^2}$.
- Step 2: Substitute $x=-6,\ y=8$: $OP=\sqrt{(-6)^2+8^2}=\sqrt{36+64}$.
- Step 3: $OP=\sqrt{100}=10$.
Answer: $OP=10$ units
Find the distance between A(−3, −2) and B(2, 10).
Solution- Step 1: $x_2-x_1=2-(-3)=5$ and $y_2-y_1=10-(-2)=12$.
- Step 2: $AB=\sqrt{5^2+12^2}=\sqrt{25+144}=\sqrt{169}$.
- Step 3: $\sqrt{169}=13$.
Answer: $AB=13$ units
Show that the points A(7, 10), B(−2, 5) and C(3, −4) are the vertices of an isosceles right triangle.
Solution- Step 1: $AB^2=(-2-7)^2+(5-10)^2=81+25=106$.
- Step 2: $BC^2=(3+2)^2+(-4-5)^2=25+81=106$.
- Step 3: $CA^2=(7-3)^2+(10+4)^2=16+196=212$.
- Step 4: $AB^2=BC^2$, so AB = BC — the triangle is isosceles.
- Step 5: $AB^2+BC^2=106+106=212=CA^2$, so by the converse of Pythagoras the angle at B is a right angle.
Answer: Isosceles right triangle (AB = BC, right angle at B)
Show that the points (1, 5), (2, 3) and (−2, −11) are NOT collinear.
Solution- Step 1: Let A(1, 5), B(2, 3), C(−2, −11).
- Step 2: $AB=\sqrt{(2-1)^2+(3-5)^2}=\sqrt{1+4}=\sqrt5$.
- Step 3: $BC=\sqrt{(-2-2)^2+(-11-3)^2}=\sqrt{16+196}=\sqrt{212}$.
- Step 4: $AC=\sqrt{(-2-1)^2+(-11-5)^2}=\sqrt{9+256}=\sqrt{265}$.
- Step 5: $AB+BC=\sqrt5+\sqrt{212}\approx2.24+14.56=16.80$, while $AC\approx16.28$. No single distance equals the sum of the other two.
Answer: The points are not collinear (they form a triangle)
Find a point on the x-axis which is equidistant from A(5, 4) and B(−2, 3).
Solution- Step 1: A point on the x-axis has the form P$(x, 0)$.
- Step 2: $PA^2=(x-5)^2+(0-4)^2=(x-5)^2+16$.
- Step 3: $PB^2=(x+2)^2+(0-3)^2=(x+2)^2+9$.
- Step 4: Set $PA^2=PB^2$: $(x-5)^2+16=(x+2)^2+9$.
- Step 5: Expand: $x^2-10x+25+16=x^2+4x+4+9$.
- Step 6: Cancel $x^2$: $-10x+41=4x+13\Rightarrow -14x=-28\Rightarrow x=2$.
Answer: P(2, 0)
Find the value of $y$ for which the distance between P(2, −3) and Q(10, $y$) is 10 units.
Solution- Step 1: $PQ=\sqrt{(10-2)^2+(y+3)^2}=10$.
- Step 2: Square: $64+(y+3)^2=100$.
- Step 3: $(y+3)^2=36\Rightarrow y+3=\pm6$.
- Step 4: $y+3=6\Rightarrow y=3$, or $y+3=-6\Rightarrow y=-9$.
Answer: $y=3$ or $y=-9$
If the point P($x$, $y$) is equidistant from A(3, 6) and B(−3, 4), find a relation between $x$ and $y$.
Solution- Step 1: $PA^2=PB^2$ since P is equidistant from A and B.
- Step 2: $(x-3)^2+(y-6)^2=(x+3)^2+(y-4)^2$.
- Step 3: Expand: $x^2-6x+9+y^2-12y+36=x^2+6x+9+y^2-8y+16$.
- Step 4: Cancel $x^2,y^2$ and the 9: $-6x-12y+36=6x-8y+16$.
- Step 5: $-12x-4y+20=0\Rightarrow 3x+y-5=0$.
Answer: $3x+y-5=0$
Show that the points A(1, 7), B(4, 2), C(−1, −1) and D(−4, 4) are the vertices of a square.
Solution- Step 1: $AB=\sqrt{(4-1)^2+(2-7)^2}=\sqrt{9+25}=\sqrt{34}$.
- Step 2: $BC=\sqrt{(-1-4)^2+(-1-2)^2}=\sqrt{25+9}=\sqrt{34}$.
- Step 3: $CD=\sqrt{(-4+1)^2+(4+1)^2}=\sqrt{9+25}=\sqrt{34}$ and $DA=\sqrt{(1+4)^2+(7-4)^2}=\sqrt{25+9}=\sqrt{34}$.
- Step 4: All four sides equal $\sqrt{34}$.
- Step 5: Diagonals: $AC=\sqrt{(-1-1)^2+(-1-7)^2}=\sqrt{4+64}=\sqrt{68}$ and $BD=\sqrt{(-4-4)^2+(4-2)^2}=\sqrt{64+4}=\sqrt{68}$.
- Step 6: Both diagonals equal $\sqrt{68}$, so the equal-sided quadrilateral is a square.
Answer: ABCD is a square (sides $\sqrt{34}$, diagonals $\sqrt{68}$)
Show that A(−3, 2), B(−5, −5), C(2, −3) and D(4, 4) are the vertices of a rhombus, and check whether it is a square.
Solution- Step 1: $AB=\sqrt{(-5+3)^2+(-5-2)^2}=\sqrt{4+49}=\sqrt{53}$.
- Step 2: $BC=\sqrt{(2+5)^2+(-3+5)^2}=\sqrt{49+4}=\sqrt{53}$.
- Step 3: $CD=\sqrt{(4-2)^2+(4+3)^2}=\sqrt{4+49}=\sqrt{53}$ and $DA=\sqrt{(-3-4)^2+(2-4)^2}=\sqrt{49+4}=\sqrt{53}$.
- Step 4: All four sides equal $\sqrt{53}$, so ABCD is a rhombus.
- Step 5: Diagonals: $AC=\sqrt{(2+3)^2+(-3-2)^2}=\sqrt{25+25}=\sqrt{50}$ and $BD=\sqrt{(4+5)^2+(4+5)^2}=\sqrt{81+81}=\sqrt{162}$.
- Step 6: The diagonals are unequal ($\sqrt{50}\ne\sqrt{162}$), so it is a rhombus but NOT a square.
Answer: Rhombus (all sides $\sqrt{53}$), not a square because diagonals differ
Find a point equidistant from the three points A(3, 0), B(−1, 0) and that also lies such that its distance from each equals 5 — actually, find the centre of the circle through A(6, −6), B(3, −7) and C(3, 3).
Solution- Step 1: Let the centre be P$(x, y)$. Then $PA=PB=PC$.
- Step 2: From $PA^2=PB^2$: $(x-6)^2+(y+6)^2=(x-3)^2+(y+7)^2$.
- Step 3: Expand and cancel: $-12x+36+12y+36=-6x+9+14y+49$, giving $-6x-2y+14=0\Rightarrow 3x+y=7$.
- Step 4: From $PB^2=PC^2$: $(x-3)^2+(y+7)^2=(x-3)^2+(y-3)^2$, so $(y+7)^2=(y-3)^2$.
- Step 5: $14y+49=-6y+9\Rightarrow 20y=-40\Rightarrow y=-2$.
- Step 6: Substitute in $3x+y=7$: $3x-2=7\Rightarrow x=3$.
Answer: Centre P(3, −2)
Determine whether the points A(−2, −1), B(1, 0), C(4, 3) and D(1, 2) form a parallelogram.
Solution- Step 1: $AB=\sqrt{(1+2)^2+(0+1)^2}=\sqrt{9+1}=\sqrt{10}$.
- Step 2: $CD=\sqrt{(1-4)^2+(2-3)^2}=\sqrt{9+1}=\sqrt{10}$, so AB = CD.
- Step 3: $BC=\sqrt{(4-1)^2+(3-0)^2}=\sqrt{9+9}=\sqrt{18}$ and $DA=\sqrt{(-2-1)^2+(-1-2)^2}=\sqrt{9+9}=\sqrt{18}$, so BC = DA.
- Step 4: Both pairs of opposite sides are equal.
- Step 5: Diagonals $AC=\sqrt{(4+2)^2+(3+1)^2}=\sqrt{36+16}=\sqrt{52}$ and $BD=\sqrt{(1-1)^2+(2-0)^2}=\sqrt{0+4}=2$; the diagonals are unequal, so it is a parallelogram (not a rectangle).
Answer: ABCD is a parallelogram