Skip to main content
Next exam on November 14 – 15, 2026:
Back to glossary
geometryDifficulty: Basicgeometryanalytic-geometrydistance
Share

两点间距离公式liǎng diǎn jiān jùlí gōngshì

distance formula
4 min read
Updated August 25, 2026
Complete

Core Concept

The distance formula (两点间距离公式) gives the straight-line distance between any two points in the coordinate plane. It is the single most frequently used formula in CSCA analytic geometry — it underpins the equation of a circle, the definitions of the ellipse and hyperbola, and every "find the length of segment ABAB" question.

Mathematical Definition

For points P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2):

∣P1P2∣=(x2−x1)2+(y2−y1)2|P_1P_2| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Why It Works

The formula is the Pythagorean theorem in disguise. Draw a right triangle with the segment P1P2P_1P_2 as its hypotenuse and legs parallel to the axes:

  • Horizontal leg: ∣x2−x1∣|x_2 - x_1|
  • Vertical leg: ∣y2−y1∣|y_2 - y_1|

Then ∣P1P2∣2=∣x2−x1∣2+∣y2−y1∣2|P_1P_2|^2 = |x_2-x_1|^2 + |y_2-y_1|^2. Because both legs are squared, the absolute-value signs are unnecessary — which is why the formula is usually written without them.

The Three-Dimensional Version

In space, with P1(x1,y1,z1)P_1(x_1, y_1, z_1) and P2(x2,y2,z2)P_2(x_2, y_2, z_2), add one more squared term:

∣P1P2∣=(x2−x1)2+(y2−y1)2+(z2−z1)2|P_1P_2| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}

This appears in CSCA space-coordinate questions.

Related Formulas

Midpoint Formula

The midpoint MM of segment P1P2P_1P_2 is the coordinate-wise average:

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

Distance from a Point to a Line

The distance from P(x0,y0)P(x_0, y_0) to the line Ax+By+C=0Ax + By + C = 0 is:

d=∣Ax0+By0+C∣A2+B2d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}}

This is a separate formula and a separate exam favourite — note the absolute value in the numerator, which many students drop.

Distance from the Origin

A useful special case when P1P_1 is the origin:

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

Worked Applications

Application 1: Classifying a Triangle

Is the triangle with vertices A(0,0)A(0,0), B(4,0)B(4,0), C(2,23)C(2, 2\sqrt{3}) equilateral?

  • ∣AB∣=42+02=4|AB| = \sqrt{4^2 + 0^2} = 4
  • ∣AC∣=22+(23)2=4+12=4|AC| = \sqrt{2^2 + (2\sqrt{3})^2} = \sqrt{4 + 12} = 4
  • ∣BC∣=(2−4)2+(23)2=4+12=4|BC| = \sqrt{(2-4)^2 + (2\sqrt{3})^2} = \sqrt{4 + 12} = 4

All three sides equal 44, so the triangle is equilateral.

Application 2: Deriving the Circle Equation

A circle is the set of points at fixed distance rr from centre C(a,b)C(a, b). Writing that condition with the distance formula:

(x−a)2+(y−b)2=r\sqrt{(x-a)^2 + (y-b)^2} = r

Squaring both sides gives the standard equation (x−a)2+(y−b)2=r2(x-a)^2 + (y-b)^2 = r^2. The circle equation is the distance formula.

CSCA Practice Problems

💡 Note: These problems follow the CSCA exam syllabus and Chinese standardized test formats.

Example 1: Basic (Difficulty ★☆☆☆☆)

The distance between A(−2,1)A(-2, 1) and B(1,5)B(1, 5) is:

Options:

  • A. 33
  • B. 44
  • C. 55
  • D. 77

Detailed Solution:

∣AB∣=(1−(−2))2+(5−1)2=32+42=9+16=25=5|AB| = \sqrt{(1 - (-2))^2 + (5 - 1)^2} = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5

Recognising the 33-44-55 triple saves time. CSCA questions overwhelmingly use Pythagorean triples (3,4,53,4,5 / 5,12,135,12,13 / 6,8,106,8,10) so the answer comes out as a whole number — if your answer is an ugly surd, re-check the subtraction.

Answer: C


Example 2: Intermediate (Difficulty ★★★☆☆)

Point PP lies on the xx-axis and is equidistant from A(1,2)A(1, 2) and B(5,6)B(5, 6). Find the coordinates of PP.

Options:

  • A. (5,0)(5, 0)
  • B. (6,0)(6, 0)
  • C. (7,0)(7, 0)
  • D. (8,0)(8, 0)

Detailed Solution:

  1. Since PP lies on the xx-axis, write P(x,0)P(x, 0).

  2. Set ∣PA∣=∣PB∣|PA| = |PB|. Square both sides immediately to clear the radicals: (x−1)2+(0−2)2=(x−5)2+(0−6)2(x-1)^2 + (0-2)^2 = (x-5)^2 + (0-6)^2

  3. Expand both sides: x2−2x+1+4=x2−10x+25+36x^2 - 2x + 1 + 4 = x^2 - 10x + 25 + 36

  4. The x2x^2 terms cancel — this is what makes the equation linear and easy: −2x+5=−10x+61-2x + 5 = -10x + 61

  5. Solve: 8x=56  ⟹  x=78x = 56 \implies x = 7

  6. Verify by substituting back: ∣PA∣2=(7−1)2+22=36+4=40|PA|^2 = (7-1)^2 + 2^2 = 36 + 4 = 40 and ∣PB∣2=(7−5)2+62=4+36=40|PB|^2 = (7-5)^2 + 6^2 = 4 + 36 = 40. ✓

Answer: C

Method note: Any point equidistant from AA and BB lies on the perpendicular bisector of ABAB. You could also find that line and intersect it with y=0y = 0 — but squaring the distance equation is faster when only one intersection is needed.

Common Mistakes

❌ Mistake 1: Forgetting to take the square root

(x2−x1)2+(y2−y1)2(x_2-x_1)^2 + (y_2-y_1)^2 is the square of the distance. Half-finished answers like "2525" instead of "55" are the single most common error on this topic.

❌ Mistake 2: Subtracting coordinates across the pair

Writing (x2−y1)2+(y2−x1)2\sqrt{(x_2 - y_1)^2 + (y_2 - x_1)^2} mixes the axes. Always subtract xx from xx, and yy from yy.

❌ Mistake 3: Dropping the absolute value in point-to-line distance

d=∣Ax0+By0+C∣A2+B2d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2+B^2}} can produce a negative numerator without the bars — and a negative distance is meaningless.

Study Tips

  1. ✅ Understand it as the Pythagorean theorem, not as a formula to memorise
  2. ✅ Square both sides early when setting two distances equal — it kills the radicals
  3. ✅ Learn the common triples (3,4,53,4,5 / 5,12,135,12,13) to spot clean answers
  4. ✅ Keep the midpoint formula next to it — they appear together in perpendicular-bisector questions
  5. ✅ Substitute your answer back into the original condition to verify

💡 Exam Tip: 求平面两点间的距离 is the highest-frequency knowledge point in CSCA analytic geometry. It is rarely the whole question — it is usually step 1 of a longer circle or conic problem, so speed here buys time later.

Practice Exercises

Practice to reinforce your understanding