Mathwords logoMathwords

Distance & Midpoint Formulas — Complete Reference Sheet

A complete reference for distance and midpoint formulas in coordinate geometry. Includes the 2D distance and midpoint formulas, their 3D extensions, partition (section) formulas, distance to a line, and number-line distance.

Distance Formulas

d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
3D Distance Formula
d=(x2x1)2+(y2y1)2+(z2z1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Distance on Number Line
d=x2x1d = |x_2 - x_1|
Distance from Origin
d=x2+y2d = \sqrt{x^2 + y^2}
Distance from Origin (3D)
d=x2+y2+z2d = \sqrt{x^2 + y^2 + z^2}

Midpoint Formulas

M=(x1+x22, y1+y22)M = \left(\tfrac{x_1 + x_2}{2},\ \tfrac{y_1 + y_2}{2}\right)
3D Midpoint
M=(x1+x22, y1+y22, z1+z22)M = \left(\tfrac{x_1 + x_2}{2},\ \tfrac{y_1 + y_2}{2},\ \tfrac{z_1 + z_2}{2}\right)
Number-Line Midpoint
M=a+b2M = \tfrac{a + b}{2}

Partition (Section) Formulas

Internal Division (Ratio m:n)
P=(mx2+nx1m+n, my2+ny1m+n)P = \left(\tfrac{m x_2 + n x_1}{m + n},\ \tfrac{m y_2 + n y_1}{m + n}\right)
External Division (Ratio m:n)
P=(mx2nx1mn, my2ny1mn)P = \left(\tfrac{m x_2 - n x_1}{m - n},\ \tfrac{m y_2 - n y_1}{m - n}\right)
Centroid of Triangle
G=(x1+x2+x33, y1+y2+y33)G = \left(\tfrac{x_1 + x_2 + x_3}{3},\ \tfrac{y_1 + y_2 + y_3}{3}\right)

Distance to a Line

Point to Line (general form)
d=Ax0+By0+CA2+B2d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}}
Point to Line (slope-intercept)
d=mx0y0+bm2+1d = \frac{|m x_0 - y_0 + b|}{\sqrt{m^2 + 1}}
Distance Between Parallel Lines
d=C1C2A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}

Related Identities & Theorems

Pythagorean Theorem (derivation)
a2+b2=c2a^2 + b^2 = c^2
Magnitude of a Vector
v=vx2+vy2|\vec{v}| = \sqrt{v_x^2 + v_y^2}
Magnitude of 3D Vector
v=vx2+vy2+vz2|\vec{v}| = \sqrt{v_x^2 + v_y^2 + v_z^2}
Circumradius (from sides)
R=abc4AreaR = \frac{abc}{4 \cdot \text{Area}}

Common Applications

Diameter of a Circle (from points on circle)
d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Side Length of a Square (vertices given)
s=(x2x1)2+(y2y1)2s = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Perimeter of Triangle (3 vertices)
P=dAB+dBC+dCAP = d_{AB} + d_{BC} + d_{CA}
Find Center of a Circle (3 points)
Use perpendicular bisectors of two chords\text{Use perpendicular bisectors of two chords}

Related Pages