Distance and Section in the Plane

⚡ Key Takeaways

Distance and Section in the Plane are the two foundational metric formulas of coordinate geometry: the distance formula gives the straight-line length between two points from their coordinates, and the section formula gives the coordinates of a point dividing a line segment in a given ratio. Both follow directly from the Pythagorean theorem and similar triangles. They apply throughout analytic geometry, vector algebra, computer graphics, and physics. Systematized by René Descartes (1637) and used by every student of coordinate geometry since.

💡 The Core Insight

Coordinates turn the plane into a grid of numbers. Once a point is a pair (x,y)(x, y), horizontal and vertical separations become subtractions (Δx=x2−x1\Delta x = x_2 - x_1, Δy=y2−y1\Delta y = y_2 - y_1), the Pythagorean theorem converts those separations into a straight-line distance, and proportional reasoning (similar triangles) lets us weight coordinates to find any dividing point. Distance is "Pythagoras in coordinates"; section is "weighted average in coordinates."

Formal Statement

DefinitionDistance Between Two Points

Let A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2) be points in the Cartesian plane. The distance d(A,B)d(A,B) between them is the length of the straight segment joining them:

1
d(A,B)=(x2−x1)2+(y2−y1)2\quad d(A,B) = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Derivation hint: Form a right triangle with horizontal leg ∣x2−x1∣|x_2-x_1| and vertical leg ∣y2−y1∣|y_2-y_1|; apply the Pythagorean theorem to the hypotenuse ABAB. Symbols: x1,y1x_1, y_1 are the coordinates of the first point; x2,y2x_2, y_2 of the second; d(A,B)≥0d(A,B) \ge 0 is the resulting length, in the same units as the coordinate axes.

A useful special case is the distance from the origin O(0,0)O(0,0) to a point P(x,y)P(x,y):

2
OP=x2+y2\quad OP = \sqrt{x^2 + y^2}

Derivation hint: Set x1=y1=0x_1 = y_1 = 0 in equation [1].

DefinitionInternal Section Formula

Let PP divide the segment joining A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2) internally in the ratio m:nm:n, meaning AP:PB=m:nAP:PB = m:n with PP between AA and BB. Then the coordinates of PP are:

3
P=(mx2+nx1m+n,  my2+ny1m+n)\quad P = \left( \frac{m x_2 + n x_1}{m+n}, \; \frac{m y_2 + n y_1}{m+n} \right)

Derivation hint: Drop perpendiculars from AA, PP, BB to the xx-axis; the resulting similar triangles give AP:PB=(xP−x1):(x2−xP)=m:nAP:PB = (x_P - x_1):(x_2 - x_P) = m:n, then solve for xPx_P (and likewise yPy_P). Symbols: mm and nn are positive numbers giving the ratio of the two parts; the part nearer to BB carries the weight mm on x2,y2x_2, y_2. Note the cross-pattern: mm multiplies the second point's coordinates.

DefinitionMidpoint Formula

The midpoint MM of segment ABAB is the special case m:n=1:1m:n = 1:1:

4
M=(x1+x22,  y1+y22)\quad M = \left( \frac{x_1 + x_2}{2}, \; \frac{y_1 + y_2}{2} \right)

Derivation hint: Substitute m=n=1m = n = 1 into equation [3].

TheoremExternal Section Formula

If PP divides ABAB externally in the ratio m:nm:n (so PP lies on the line ABAB but outside the segment, with AP:PB=m:nAP:PB = m:n measured with opposite signs), then:

5
P=(mx2−nx1m−n,  my2−ny1m−n)\quad P = \left( \frac{m x_2 - n x_1}{m - n}, \; \frac{m y_2 - n y_1}{m - n} \right)

Derivation hint: Replace the ratio nn by −n-n in the internal formula [3], since external division reverses the sign of one directed segment.

TheoremCentroid of a Triangle

The centroid GG of a triangle with vertices A(x1,y1)A(x_1,y_1), B(x2,y2)B(x_2,y_2), C(x3,y3)C(x_3,y_3) is the average of the three vertices:

6
G=(x1+x2+x33,  y1+y2+y33)\quad G = \left( \frac{x_1 + x_2 + x_3}{3}, \; \frac{y_1 + y_2 + y_3}{3} \right)

Derivation hint: The centroid divides each median in ratio 2:12:1 from the vertex; apply the section formula [3] with m:n=2:1m:n = 2:1 to the vertex and the opposite midpoint.

Why It Holds / Derivation

ProofDistance Formula from the Pythagorean Theorem

Step 1. Take points A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2). Construct the point C(x2,y1)C(x_2, y_1) — directly below or above BB and level with AA — so that ABCABC forms a right triangle with the right angle at CC.

Step 2. The horizontal leg ACAC runs from x1x_1 to x2x_2 at the same height, so its length is ∣x2−x1∣|x_2 - x_1|.

Step 3. The vertical leg CBCB runs from y1y_1 to y2y_2 at the same xx-value, so its length is ∣y2−y1∣|y_2 - y_1|.

Step 4. By the Pythagorean theorem, AB2=AC2+CB2=(x2−x1)2+(y2−y1)2AB^2 = AC^2 + CB^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2. The squares remove the need for absolute-value signs.

Step 5. Taking the non-negative square root gives equation [1]. ■\blacksquare

∎
ProofInternal Section Formula from Similar Triangles

Step 1. Let P(x,y)P(x, y) lie on ABAB with AP:PB=m:nAP:PB = m:n. Drop perpendiculars from AA, PP, BB to the xx-axis, meeting it at A′(x1,0)A'(x_1,0), P′(x,0)P'(x,0), B′(x2,0)B'(x_2,0).

Step 2. Lines AA′AA', PP′PP', BB′BB' are all vertical, hence parallel. By the basic proportionality theorem, the parallels cut the transversal ABAB and the xx-axis in equal ratios: A′P′:P′B′=AP:PB=m:nA'P' : P'B' = AP : PB = m:n.

Step 3. Therefore (x−x1):(x2−x)=m:n(x - x_1) : (x_2 - x) = m : n, giving n(x−x1)=m(x2−x)n(x - x_1) = m(x_2 - x).

Step 4. Expand: nx−nx1=mx2−mxnx - nx_1 = mx_2 - mx, so nx+mx=mx2+nx1nx + mx = mx_2 + nx_1, hence x=mx2+nx1m+nx = \dfrac{mx_2 + nx_1}{m+n}.

Step 5. Repeating with perpendiculars to the yy-axis gives y=my2+ny1m+ny = \dfrac{my_2 + ny_1}{m+n}. Together these give equation [3]. ■\blacksquare

∎
Figure
Right triangle for the distance formula and a dividing point P on segment AB
x y A(x₁,y₁) B(x₂,y₂) C(x₂,y₁) |x₂−x₁| |y₂−y₁| P (m:n) d = √((x₂−x₁)²+(y₂−y₁)²)
mathematician · René Descartes | 1596–1650

The French philosopher and mathematician introduced the system of coordinates in La Géométrie (1637), an appendix to his Discourse on Method. By labeling points with number pairs, Descartes made it possible to study curves through equations and lengths through arithmetic — the move that created analytic geometry. The distance and section formulas are immediate consequences of his framework, though Descartes himself wrote in a less symbolic notation than ours. The Cartesian plane bears his Latinized name, Cartesius.

Building Intuition

🧠 Intuition

Think of going from AA to BB as a walk on a city grid. You can only count blocks east-west (Δx\Delta x) and blocks north-south (Δy\Delta y). The distance formula answers: "If instead of walking the streets I could fly straight, how far is it?" — and the answer is the diagonal hypotenuse of the right triangle the two legs make. For the section formula, picture a tug-of-war on the segment. The ratio m:nm:n is how strongly each end pulls. Equilibrium lands the point closer to the stronger pull. Crucially the heavier weight mm sits on the far endpoint BB: a 3:13:1 split puts PP three-quarters of the way to BB, because three parts of the journey are behind PP and one ahead. The midpoint is the perfectly balanced 1:11:1 case — just average the coordinates.

Worked Examples

ExampleDistance Between Two Given Points

Given: A(2,3)A(2, 3) and B(7,15)B(7, 15), coordinates in metres.

Find: the distance ABAB.

Step 1 — horizontal separation: Δx=x2−x1=7−2=5\Delta x = x_2 - x_1 = 7 - 2 = 5.

Step 2 — vertical separation: Δy=y2−y1=15−3=12\Delta y = y_2 - y_1 = 15 - 3 = 12.

Step 3 — apply equation [1]:

d=52+122=25+144=169.d = \sqrt{5^2 + 12^2} = \sqrt{25 + 144} = \sqrt{169}.

Step 4 — evaluate: 169=13\sqrt{169} = 13.

AB=13 m\boxed{AB = 13 \text{ m}}

(This is a 5–12–13 Pythagorean triple, a clean integer result.)

ExampleInternal Division in a Given Ratio

Given: A(−1,4)A(-1, 4) and B(5,−2)B(5, -2); point PP divides ABAB internally in ratio m:n=2:1m:n = 2:1.

Find: the coordinates of PP, and verify with the midpoint as a check.

Step 1 — identify weights: m=2m = 2 (on BB), n=1n = 1 (on AA), so m+n=3m + n = 3.

Step 2 — x-coordinate via equation [3]:

xP=mx2+nx1m+n=2(5)+1(−1)3=10−13=93=3.x_P = \frac{m x_2 + n x_1}{m+n} = \frac{2(5) + 1(-1)}{3} = \frac{10 - 1}{3} = \frac{9}{3} = 3.

Step 3 — y-coordinate:

yP=my2+ny1m+n=2(−2)+1(4)3=−4+43=03=0.y_P = \frac{m y_2 + n y_1}{m+n} = \frac{2(-2) + 1(4)}{3} = \frac{-4 + 4}{3} = \frac{0}{3} = 0.
P=(3, 0)\boxed{P = (3, \, 0)}

Check: PP should be two-thirds of the way from AA to BB. The midpoint of ABAB is (−1+52,4−22)=(2,1)\left(\frac{-1+5}{2}, \frac{4-2}{2}\right) = (2, 1), and P(3,0)P(3,0) lies beyond it toward B(5,−2)B(5,-2) — consistent with the heavier pull at BB. ✓

Common Misconceptions

⚠️ Mixing Up Which Endpoint Gets Which Weight

A frequent error is writing P=(mx1+nx2m+n,… )P = \left(\frac{m x_1 + n x_2}{m+n}, \dots\right) — putting mm on the first point. The formula uses the cross-pattern: the weight mm (the first number in the ratio m:n=AP:PBm:n = AP:PB) multiplies the coordinates of the second point BB. Reason: a larger mm means APAP is larger, so PP sits farther from AA and nearer to BB, which requires BB to be weighted more heavily. Always re-derive from "PP near BB ⟹ big weight on BB."

⚠️ Forgetting to Square — or Square-Root

Two slips ruin the distance formula. First, some students compute (x2−x1)+(y2−y1)(x_2 - x_1) + (y_2 - y_1) without squaring; that is the grid (taxicab) distance, not the straight-line distance. Second, some stop at d2d^2 and forget the final square root. The correct chain is: subtract, square, add, then take the square root.

CounterexampleThe Distance Formula Is Not Additive Along Coordinates

One might guess that the distance from A(0,0)A(0,0) to B(3,4)B(3,4) equals ∣3∣+∣4∣=7|3| + |4| = 7. The actual straight-line distance is 32+42=25=5\sqrt{3^2 + 4^2} = \sqrt{25} = 5, not 7. The value 7 is the path length along the axes (3 across, then 4 up). The gap (7 vs. 5) is exactly why "as the crow flies" beats walking the grid — and it shows distance is governed by Pythagoras, never by plain addition of separations.

Connections

connection

The distance formula is the two-dimensional shadow of the Pythagorean Theorem and generalizes directly to three dimensions as d=Δx2+Δy2+Δz2d = \sqrt{\Delta x^2 + \Delta y^2 + \Delta z^2}, and to the abstract notion of a Metric Space. The section formula is a special case of the Vector Position Formula: P⃗=nA⃗+mB⃗m+n\vec{P} = \frac{n\vec{A} + m\vec{B}}{m+n}, linking it to Vectors in the Plane and to the Convex Combination of two points. The centroid formula [6] feeds into Coordinate Geometry of Triangles and the study of Lines in the Plane, where the same coordinates determine slopes and equations.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- c. 300 BCE — Euclid's Elements establishes the Pythagorean theorem (Book I, Proposition 47), the geometric ancestor of the distance formula, without any coordinate system.
- c. 1370 — Nicole Oresme uses proto-coordinate "latitudes and longitudes" to graph qualities, an early hint of plotting points by pairs.
- 1637 — René Descartes publishes La Géométrie, introducing coordinates and founding analytic geometry; distances and divisions become computable from numbers.
- 1637 — Pierre de Fermat, independently, develops coordinate methods in his Ad Locos Planos et Solidos Isagoge, sharing credit for the analytic approach.
- 1748 — Leonhard Euler, in Introductio in analysin infinitorum, systematizes analytic geometry and standardizes much modern notation.
- 1799 — Caspar Wessel and (1806) Jean-Robert Argand represent complex numbers as points in the plane, where ∣z2−z1∣|z_2 - z_1| is the distance formula in disguise.
- 1827 — August Möbius introduces barycentric (weighted) coordinates, generalizing the section and centroid formulas.
- 1906 — Maurice Fréchet abstracts distance into the general concept of a metric space, with the Euclidean distance [1] as the prototype.

Subtleties & Limits

open-problem

The distance and section formulas as stated assume a flat, Euclidean plane with perpendicular axes and equal unit scales. Several subtleties deserve thought. (1) Non-Euclidean settings: on the surface of a sphere (the Earth), straight-line "chord" distance differs from the geodesic (great-circle) distance, and equation [1] is only a local approximation. (2) Oblique axes: if the coordinate axes are not perpendicular, the distance formula acquires extra cross terms involving the angle between them. (3) The external division degenerate case: when m=nm = n in equation [5], the denominator m−n=0m - n = 0 and the "external dividing point" runs off to infinity — geometrically the point that would divide ABAB externally in ratio 1:11:1 is the point at infinity in the direction of ABAB, a notion made rigorous in projective geometry. (4) Choice of metric: the Euclidean distance is one of infinitely many valid metrics; the taxicab (L1L^1) and Chebyshev (L∞L^\infty) distances obey the metric axioms too, and which distance is "right" depends entirely on the problem.

See Also

Pythagorean Theorem · Cartesian Coordinate System · Equation of a Circle · Vectors in the Plane · Coordinate Geometry of Triangles · Midpoint Formula · Metric Spaces