Distance Between Two Points in Three-Dimensional Geometry
On this page· 13 sections
Source & scope. Class 11 Mathematics, Chapter 11 Introduction to Three Dimensional Geometry, Section 11.4 Distance between Two Points. Builds on: Coordinates of a Point in Space. Next: sibling articles apply this formula to collinearity, triangle classification, parallelograms and locus problems — s...
Source & scope. Class 11 Mathematics, Chapter 11 Introduction to Three Dimensional Geometry, Section 11.4 Distance between Two Points. Builds on: Coordinates of a Point in Space. Next: sibling articles apply this formula to collinearity, triangle classification, parallelograms and locus problems — see Related articles.
The distance between two points P(x1, y1, z1) and Q(x2, y2, z2) in three-dimensional space is PQ = √[(x2 − x1)² + (y2 − y1)² + (z2 − z1)²] — the natural extension of the two-dimensional distance formula with one extra squared term for the z-coordinates. This single formula underlies almost every subsequent computation in 3D coordinate geometry: checking collinearity, classifying triangles, verifying parallelograms, and setting up loci.
At a glance
- for P(x1,y1,z1) and Q(x2,y2,z2).
- It extends the familiar 2D distance formula by adding one more squared-difference term for the z-coordinate.
- Special case: distance from the origin O to Q(x2,y2,z2) is simply .
- The derivation rests on applying the Pythagorean theorem twice, using a rectangular box with PQ as its space diagonal.
- This formula is the starting point for nearly every later technique in the chapter (collinearity, triangle type, parallelograms, loci).
Learning objectives
- Derive the 3D distance formula from the Pythagorean theorem applied twice.
- State the formula and the origin special case correctly.
- Apply the formula to compute the distance between two given points.
- Recognise this formula as the foundation for collinearity, triangle, parallelogram and locus problems covered in sibling articles.
Prerequisite knowledge
The reader should know the 2D distance formula, the Pythagorean theorem, and how a point's coordinates (x, y, z) are defined as perpendicular distances from the coordinate planes (covered in Coordinates of a Point in Space).
Core explanation
Setting up the derivation
Let P(x1, y1, z1) and Q(x2, y2, z2) be two points referred to the rectangular axes OX, OY, OZ. Through P and Q, draw planes parallel to the three coordinate planes. Because P and Q are two opposite corners of the resulting box, these six planes together form a rectangular parallelepiped (a rectangular box) with PQ as one of its space diagonals.
Applying the Pythagorean theorem twice
Label two of the box's other corners A and N, chosen so that triangle PAQ and triangle ANQ are both right triangles.
In right triangle PAQ, with the right angle at A:
In right triangle ANQ, with the right angle at N:
Substituting (2) into (1):
Identifying the three edge lengths
By the box's construction, these three edges are exactly the coordinate differences between P and Q:
- PA = y2 − y1
- AN = x2 − x1
- NQ = z2 − z1
Substituting these in:
Taking the square root of both sides gives the distance formula:
This is the distance between any two points P(x1, y1, z1) and Q(x2, y2, z2) in three-dimensional space.
The origin special case
If P is taken to be the origin, then x1 = y1 = z1 = 0, and the formula collapses to the distance of any point Q(x2, y2, z2) from the origin:
This special case is used constantly whenever a problem is set up so that one of the two points is the origin, since it saves writing out three "minus zero" terms.
How this formula generalises the 2D case
The structure is identical to the familiar 2D distance formula √[(x2−x1)² + (y2−y1)²] — 3D geometry simply adds one more squared coordinate-difference term, (z2−z1)², because there is one more perpendicular direction to account for. Conceptually, the two uses of the Pythagorean theorem in the derivation mirror the single use of it in the 2D derivation: 3D needs an extra application because the "diagonal" being measured cuts across a solid box rather than a flat rectangle.
Key terms
- Distance formula (3D) — PQ = √[(x2−x1)² + (y2−y1)² + (z2−z1)²], giving the straight-line distance between any two points in space.
- Rectangular parallelepiped — a rectangular box; in the derivation, PQ is one of its space diagonals.
- Space diagonal — a line segment joining two opposite corners of a 3D solid, passing through its interior.
- Origin distance special case — OQ = √(x2²+y2²+z2²), the distance formula when one point is the origin.
Diagram / figure guidance
Draw a rectangular box with P at one corner and Q at the diagonally opposite corner, so PQ is the box's space diagonal. Mark the intermediate corners A and N used in the derivation, and label the three edge lengths PA, AN, NQ with their coordinate-difference values (y2−y1), (x2−x1), (z2−z1). Shade the two right triangles PAQ and ANQ in different colours to visually show the two applications of the Pythagorean theorem.
Worked example
Find the distance between the points P(1, −3, 4) and Q(−4, 1, 2).
Step 1 — identify the coordinates. P(x1, y1, z1) = (1, −3, 4) and Q(x2, y2, z2) = (−4, 1, 2).
Step 2 — compute each coordinate difference. x2 − x1 = −4 − 1 = −5 y2 − y1 = 1 − (−3) = 4 z2 − z1 = 2 − 4 = −2
Step 3 — square each difference and add. PQ² = (−5)² + (4)² + (−2)² = 25 + 16 + 4 = 45
Step 4 — take the square root and simplify. PQ = √45 = √(9 × 5) = 3√5
Conclusion. PQ = 3√5 units.
Common misconceptions
- "The 3D distance formula needs a different Pythagorean argument, unrelated to 2D." It's the same Pythagorean idea applied twice in sequence, not a fundamentally different technique.
- "The order of subtraction (x2−x1 vs x1−x2) changes the final distance." It doesn't — each difference is squared before being added, so the sign of the difference never affects the final (always non-negative) distance.
- "The origin special case needs its own separate formula to memorise." It's just the general formula with x1=y1=z1=0; there's nothing new to learn beyond substituting zero.
- "Distance can be negative if the coordinates are negative." Distance is always a non-negative quantity; negative coordinates affect the intermediate differences but squaring removes the sign before the final square root is taken.
Exam application (JEE)
The 3D distance formula is one of the most frequently used tools in the entire chapter — JEE questions rarely test it as a bare "find the distance" question alone, but instead embed it inside larger tasks: checking collinearity, identifying triangle type, verifying quadrilaterals, or setting up a locus equation (all covered in sibling articles). Speed and accuracy in squaring negative differences correctly (a common silly-mistake zone) matter more here than conceptual depth, since the formula itself is simple to state.
Frequently asked questions
- What is the distance formula between two points in 3D geometry? For P(x1,y1,z1) and Q(x2,y2,z2), the distance is PQ = √[(x2−x1)² + (y2−y1)² + (z2−z1)²].
- How is the 3D distance formula derived? By building a rectangular box with PQ as its space diagonal and applying the Pythagorean theorem twice — once across a face of the box, and once across the resulting right triangle involving the diagonal.
- What is the distance of a point from the origin in 3D? For Q(x2,y2,z2), the distance from the origin is OQ = √(x2² + y2² + z2²), the distance formula with the first point taken as (0,0,0).
- Does the 3D distance formula work for points with negative coordinates? Yes — each coordinate difference is squared before summing, so negative coordinates or negative differences never cause an error; the final distance is always non-negative.
Practice questions (original practice questions)
- Find the distance between A(2, 0, 1) and B(5, 4, 1).
- (a) 5
- (b) 25
- (c) 7
- (d) √41
- Answer: (a) — √[(5−2)²+(4−0)²+(1−1)²] = √[9+16+0] = √25 = 5.
- The distance of the point Q(3, −4, 0) from the origin is:
- (a) 1
- (b) 5
- (c) 7
- (d) 25
- Answer: (b) — OQ = √(3²+(−4)²+0²) = √(9+16) = √25 = 5.
- For P(0, 0, 0) and R(1, 2, 2), the distance PR equals:
- (a) 3
- (b) 5
- (c) 9
- (d) √5
- Answer: (a) — √(1²+2²+2²) = √(1+4+4) = √9 = 3.
- Which expression correctly gives the distance between P(x1,y1,z1) and Q(x2,y2,z2)?
- (a) (x2−x1)+(y2−y1)+(z2−z1)
- (b) √[(x2−x1)²+(y2−y1)²+(z2−z1)²]
- (c) (x2−x1)²+(y2−y1)²+(z2−z1)²
- (d) √[(x2+x1)²+(y2+y1)²+(z2+z1)²]
- Answer: (b) — This is the exact 3D distance formula; (a) omits squaring, (c) omits the square root, and (d) wrongly uses sums instead of differences.
- The distance between M(−1, −1, −1) and N(2, 3, −1) is:
- (a) 5
- (b) 25
- (c) √34
- (d) 7
- Answer: (a) — √[(2+1)²+(3+1)²+(−1+1)²] = √[9+16+0] = √25 = 5.
Quick revision
- PQ = √[(x2−x1)² + (y2−y1)² + (z2−z1)²] for P(x1,y1,z1), Q(x2,y2,z2).
- Derived using the Pythagorean theorem twice, across a rectangular box with PQ as its space diagonal.
- Distance from the origin: OQ = √(x2²+y2²+z2²), the same formula with one point at (0,0,0).
- Distance is always non-negative — squaring removes any sign issues from negative coordinates/differences.
- This formula is the base tool for collinearity, triangle classification, parallelogram checks, and locus problems later in the chapter.
Related articles
- Builds on: Coordinates of a Point in Space
- Next: Proving Collinearity of Three Points Using the Distance Formula
- See also: Classifying Triangles in 3D Using the Distance Formula
- See also: Verifying a Parallelogram in 3D Using the Distance Formula
- See also: Equation of the Set of Points Equidistant From Two Fixed Points in 3D
- Related topics: Centroid of a Triangle in Three-Dimensional Geometry, Coordinate Axes in Three-Dimensional Space, Coordinate Planes in Three-Dimensional Space, Coordinates of Points on the Axes and Coordinate Planes, Locus of Points With a Constant Sum of Distances From Two Fixed Points in 3D, Locus of Points With a Constant Sum of Squared Distances in 3D