A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Distance Formula and Metric in 3D Space

College Depth 67 in the knowledge graph ☐ I know this ☆ Set as goal
5,230topics build on this
296prerequisites beneath it
See this on the map →
3D Cartesian Coordinate SystemsPythagorean Theorem→→Spatial Interaction and the Gravity ModelSpatial Interaction and the Gravity Model+3 more
distance metric 3d-space

Core Idea

The distance between two points in 3D space (x₁, y₁, z₁) and (x₂, y₂, z₂) is √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²]. This formula extends the 2D distance formula by including the z-component and defines the Euclidean metric in ℝ³.

Explainer

You already know the 2D distance formula from the Pythagorean theorem: the distance between (x₁, y₁) and (x₂, y₂) is √[(x₂−x₁)² + (y₂−y₁)²]. This is just the length of the hypotenuse of a right triangle whose legs have lengths |x₂−x₁| and |y₂−y₁|. Extending to 3D requires one more application of the same theorem. Think of it as a two-step process: first find the horizontal distance in the xy-plane (ignoring z), then treat that horizontal distance and the vertical displacement |z₂−z₁| as the legs of a new right triangle. Applying Pythagoras again gives the full 3D distance.

Explicitly: the horizontal distance in the xy-plane is √[(x₂−x₁)² + (y₂−y₁)²]. Call this d_xy. Now the 3D diagonal from the first point to the second is the hypotenuse of a right triangle with legs d_xy and |z₂−z₁|, giving distance = √[d_xy² + (z₂−z₁)²] = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²]. The 3D coordinate system you studied as a prerequisite provides exactly the framework for this decomposition: the three axes are mutually perpendicular, so the three coordinate differences contribute independently and orthogonally to the total displacement.

This formula defines the Euclidean metric on ℝ³ — the standard way to measure distance in three-dimensional space. The word "metric" means a function that measures distance and satisfies three axioms: d(A, A) = 0, d(A, B) = d(B, A), and the triangle inequality d(A, C) ≤ d(A, B) + d(B, C). The Euclidean metric satisfies all three, and it is the natural notion of "straight-line distance" in physical space.

The distance formula also provides the equation of a sphere: all points (x, y, z) at distance r from a center (a, b, c) satisfy (x−a)² + (y−b)² + (z−c)² = r². This is just the distance formula squared, set equal to r². From here, the same ideas generalize: replacing the equality with an inequality describes the interior or exterior of a sphere, and the notion of distance is the foundation for limits, continuity, and convergence in three-dimensional calculus — all of which build directly on this formula.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Making 10 as an Addition Strategy → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts Through 10 → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Pythagorean Theorem → Distance Formula and Metric in 3D Space

Longest path: 68 steps · 296 total prerequisite topics

Prerequisites (2)

Leads To (5)