A point on a plane can be located exactly with just two numbers, (x, y). But the world we live in isn't flat — it's three-dimensional. To describe where a drone is in a room, you need more than "how far left, how far forward" — you also need "how high off the floor." That's why, in space, a third number z gets added, giving position as (x, y, z).

The easiest way to picture space coordinates is to imagine one corner of a room as the origin. Treat two edges along the floor as the x-axis and y-axis, and the edge rising from that corner to the ceiling as the z-axis, and you can pinpoint any point in the room exactly with three numbers. Point P(2, 3, 2) is the position you reach by moving "2 to the right, 3 further in, and 2 up."

P(x,y,z) x y z
Space coordinates work just like treating one corner of a room as the origin

How do you find the distance from the origin to a point P(x, y, z)? The Pythagorean theorem shows up here twice. First find the diagonal length along the floor (the xy-plane) from the origin to (x, y, 0), and you get √(x²+y²). Now consider the right triangle formed by that diagonal and the height z, and applying the Pythagorean theorem once more gives the final distance: √((√(x²+y²))²+z²) = √(x²+y²+z²). It's the plane distance formula with a z² term naturally added on.

The distance between two points A(x₁,y₁,z₁) and B(x₂,y₂,z₂) works the same way. Find the difference along each axis (x₂−x₁, y₂−y₁, z₂−z₁), square them, add them up, and take the square root. This exact same formula shows up again later, in exactly the same shape, when you learn how to find a vector's magnitude (length) — space coordinates and vectors are really just the same idea expressed in two different ways.

When studying this with kids, it helps to build an actual cube or rectangular box, pick one corner as the origin, and have them write down the coordinates of the remaining corners one by one. Holding an actual object in their hands makes it click far more naturally why a third coordinate is even needed. On our activity page, you can freely move a point with the x, y, and z sliders to check the distance to the origin, and verify the distance formula between two points yourself.