SOLVETUTORMATH SOLVER

Instrument MI-01-621 · Mathematics

Three-Dimensional Distance Calculator

Two points, three coordinates each. This sheet lifts the flat distance formula off the page and into space, applying the Pythagorean theorem twice to get one straight-line length.

Instrument MI-01-621
Sheet 1 OF 1
Rev A
Verified
Type 05 — Geometry SER. 2026-01621

Distance

13.00000000

d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)

The working Every figure verified twice
  1. distance = √((3 − 0)^2 + (4 − 0)^2 + (12 − 0)^2) = 13.00000000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The formula d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²) is the ordinary 2D distance formula with one more squared term bolted on, and that extra term is doing exactly the same job as the other two. Picture a rectangular box, edges parallel to the axes, with the two points sitting at opposite corners. The distance this formula reports is the length of that box's space diagonal — the straight line cutting through the interior from corner to corner, not the longer path along three edges.

The derivation is the Pythagorean theorem used back to back. First flatten the problem: treat the x and y differences as legs of a right triangle lying in the ground plane, which gives the flat separation √(Δx² + Δy²). Then stand a second right triangle on that flat distance, with the z difference as its other leg. Its hypotenuse is √((flat distance)² + Δz²), which expands to exactly √(Δx² + Δy² + Δz²). Nothing about the formula is specific to three dimensions — repeat the trick once more and you have the four-coordinate version used in spacetime and in machine-learning feature spaces.

One property is easy to miss until it's pointed out: because every difference is squared, the answer never depends on which point is labelled first. (x₂−x₁)² and (x₁−x₂)² are the same number, so swapping the two points leaves the result untouched — a symmetry that a formula built from a single unsquared difference would not have. The formula also collapses gracefully at its edge case: set z₁ equal to z₂ and the third term vanishes, leaving the plain 2D formula for two points that happen to share a height.

d=(x2x1)2+(y2y1)2+(z2z1)2d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}d=Δx2+Δy2+Δz2d = \sqrt{\Delta x^2+\Delta y^2+\Delta z^2}
x₁, y₁, z₁ — first point · x₂, y₂, z₂ — second point · Δx, Δy, Δz — the three coordinate differences · d — the straight-line distance between the points, in whatever unit the coordinates use.
  • Enter the first point's coordinates in the x₁, y₁, and z₁ fields, using any unit you like — metres, miles, or grid squares.
  • Enter the second point's coordinates in x₂, y₂, and z₂, in that same unit.
  • Read Distance for the straight-line separation between the two points, reported in whatever unit you entered.
  • Swap the two points if it's more convenient — because each difference is squared, the order never changes the answer.

Worked example — chaining two Pythagorean triples

Take the point (3, 4, 12) and measure how far it sits from the origin (0, 0, 0). Enter x₁ = 0, y₁ = 0, z₁ = 0 and x₂ = 3, y₂ = 4, z₂ = 12. Squaring and summing the three differences gives 3² + 4² + 12² = 9 + 16 + 144 = 169, and the square root of 169 is exactly 13 — Distance reads 13, with no rounding anywhere in the arithmetic.

That clean 13 is not a coincidence of the calculator; it falls straight out of the derivation. Flatten the problem into the ground plane first: the origin and (3, 4, 0) are separated by √(3² + 4²) = √25 = 5, the familiar 3-4-5 triangle. Lift that flat distance of 5 up to meet z = 12, and a second right triangle appears with legs 5 and 12, giving a hypotenuse of √(5² + 12²) = √169 = 13 — the equally familiar 5-12-13 triangle, chained onto the first.

Questions

How is the 3D distance formula derived from the Pythagorean theorem?

It applies the theorem twice. First, the x and y differences act as legs of a flat right triangle, giving the separation across the ground plane, √(Δx²+Δy²). Then that flat distance and the z difference become the legs of a second right triangle standing upright, whose hypotenuse simplifies to √(Δx²+Δy²+Δz²) — the full three-dimensional distance.

How does the 3D formula differ from the 2D distance formula?

It adds exactly one squared term. The 2D formula, √(Δx²+Δy²), measures separation on a flat plane; the 3D version tacks on a squared Δz to account for height or depth. Set z₁ equal to z₂ and the two formulas agree exactly, since the added term becomes zero.

Does it matter which point I subtract first?

No. Each coordinate difference is squared before it is added, and squaring erases the sign, so (x₂−x₁)² and (x₁−x₂)² are identical. Either point can be treated as 'first' and Distance comes out the same — a property that a formula built from an unsquared difference would not have.

What does the 3D distance represent geometrically?

Picture a rectangular box, edges parallel to the axes, with the two points at opposite corners. The formula returns the length of that box's space diagonal — the straight line through its interior — which is always shorter than the sum of the three edges, a solid-geometry echo of the ordinary triangle inequality.

Can the same idea extend beyond three dimensions?

Yes. Adding one more squared difference per extra coordinate gives the general Euclidean distance formula used for any number of dimensions, including the higher-dimensional feature spaces common in statistics and machine learning. Three terms are simply the case met first, in ordinary physical space.

What is the most common mistake when computing this by hand?

Dropping the z term and solving it as a flat 2D problem, which happens often when two points look close in x and y but differ in height. A smaller slip is summing the plain differences before squaring rather than after; squaring first is what makes the negative signs disappear correctly.

References