Given two points in the coordinate plane, we often need to find the distance between them or to locate a point that divides the segment between them in a prescribed ratio. Both tasks reduce to straightforward formulas derived from the Pythagorean theorem.
Distance Formula
⚡Theorem — Distance Formula (Theorem 9.1)
The distance between points A(xA,yA) and B(xB,yB) is
∣AB∣=(xB−xA)2+(yB−yA)2
Proof. Drop perpendiculars from A and B to the coordinate axes to form a right triangle ACB, where C=(xB,yA) is the corner point. The legs of this right triangle have lengths ∣xB−xA∣ (horizontal) and ∣yB−yA∣ (vertical). By the Pythagorean theorem:
∣AB∣2=∣AC∣2+∣CB∣2=(xB−xA)2+(yB−yA)2
Taking the positive square root gives the formula. ◀
Special cases:
If A and B lie on a horizontal line (yA=yB), then ∣AB∣=∣xB−xA∣.
If A and B lie on a vertical line (xA=xB), then ∣AB∣=∣yB−yA∣.
The distance from the origin O(0,0) to a point P(x,y) is ∣OP∣=x2+y2.
Midpoint Formula
A direct corollary of the section formula (below) is the midpoint formula: if M is the midpoint of segment AB, then
M=(2xA+xB,2yA+yB)
Proof. A midpoint divides the segment in ratio 1:1. Setting m=n=1 in the section formula gives this result immediately. ◀
Section (Division) Formula
⚡Theorem — Section Formula (Theorem 9.2)
Let C be a point on segment AB (between A and B) that divides it internally in the ratio AC:CB=m:n, where m,n>0. Then the coordinates of C are:
xC=m+nnxA+mxB,yC=m+nnyA+myB
Proof. Since C lies on segment AB with AC:CB=m:n, the parameter t=m+nm gives the fraction of the way from A to B. The coordinates of C are therefore:
Memory aid: The coordinate corresponding to endpoint A carries weight n (the ratio part near B), and vice versa — the numerator “crosses over.”
Worked Examples
✎Example — Example 1 — Distance Between Two Points
Find the distance between P(−3,4) and Q(5,−2).
Solution. Apply the distance formula with xA=−3, yA=4, xB=5, yB=−2:
∣PQ∣=(5−(−3))2+(−2−4)2=82+(−6)2=64+36=100=10
Answer:∣PQ∣=10. ◀
✎Example — Example 2 — Section Formula
Point C divides segment AB, where A(1,−1) and B(7,5), in the ratio AC:CB=2:1. Find the coordinates of C.
Solution. Here m=2, n=1. Apply the section formula:
xC=m+nn⋅xA+m⋅xB=2+11⋅1+2⋅7=31+14=315=5
yC=m+nn⋅yA+m⋅yB=31⋅(−1)+2⋅5=3−1+10=39=3
Verification:∣AC∣=(5−1)2+(3−(−1))2=16+16=42 and ∣CB∣=(7−5)2+(5−3)2=22. Indeed ∣AC∣:∣CB∣=2:1. ✓
Answer:C(5,3). ◀
✎Example — Example 3 — Midpoint Application
The midpoint of segment PQ is M(2,−3). If P=(−4,1), find Q.
Solution. Let Q=(x,y). By the midpoint formula:
2−4+x=2⟹x=8,21+y=−3⟹y=−7
Answer:Q(8,−7). ◀
Exercises
✏Exercise
Find the distance between each pair of points.
A(0,0) and B(5,12)
A(−2,3) and B(4,−5)
A(1,1) and B(4,5)
Hint for (3): Form the right triangle and apply the Pythagorean theorem directly to check your answer.
✏Exercise
Point D divides segment EF, where E(−5,2) and F(7,−4), in the ratio ED:DF=1:3. Find the coordinates of D.
Then verify your answer by computing ∣ED∣ and ∣DF∣ and checking their ratio.
✏Exercise
Three vertices of a rhombus are A(0,0), B(4,0), and C(5,3). Find the fourth vertex D, given that ABCD is a rhombus (diagonals of a parallelogram bisect each other).
Hint: Use the midpoint formula — the diagonals of a parallelogram share the same midpoint.