Two points as opposite corners of a box
Take two points in space, and . Build the box whose edges run parallel to the three axes and which has A and B at opposite corners. Its edges are the gaps between the coordinates: across, along and up. is the Greek capital delta, read “change in”.
The vector from A to B is , the end minus the start. The distance between the points, d, is its length: the long diagonal of the box.
A at one bottom corner and B at the opposite top corner. The floor diagonal, the upright edge and the distance d make the shaded right triangle.
Pythagoras twice
First, across the floor of the box. The floor is a rectangle by , and its diagonal is the hypotenuse of a right triangle with those two legs: floor² .
Second, up. The upright edge is at right angles to the floor, so it is at right angles to every line in the floor, including the floor diagonal. The floor diagonal, the edge and d make a right triangle with d as its hypotenuse: floor² .
Put the first into the second: , so . The third square comes from the second right triangle, not from counting the dimensions.
A worked distance
Find the distance from A(1, 2, 3) to B(7, 10, 27). The gaps are 7 − 1 = 6, 10 − 2 = 8 and 27 − 3 = 24.
Across the floor, . Then up, . In one line, .
The order of the points does not matter. From B to A the gaps are −6, −8 and −24, and the squares are the same: .
A negative gap, and a gap of zero
For P(2, −1, 4) and Q(−1, 3, 4), the gaps are −1 − 2 = −3, 3 − (−1) = 4 and 4 − 4 = 0. So PQ .
The gap in z is 0, because both points are at the same height. The box is then flat, and the distance is the two-dimensional one across the floor.
The midpoint: one average per axis
The midpoint M of AB has position vector , half the sum of the position vectors of the ends. Taken one component at a time, that is the mean of the two coordinates on each axis, z included.
For A(1, 2, 3) and B(7, 10, 27): , and , so M = (4, 6, 15).
Checking the midpoint
From A(1, 2, 3) to M(4, 6, 15) the gaps are 3, 4 and 12, so . From M to B(7, 10, 27) the gaps are 7 − 4 = 3, 10 − 6 = 4 and 27 − 15 = 12, the same three, so MB = 13 as well.
The two halves are equal and add to 13 + 13 = 26, the whole distance, so M is halfway along AB. Each gap from A to M is half of the gap from A to B, which is why every length halves too.
the floor diagonal is √(x² + y²) = 5; stand z = 6 on its end and Pythagoras again gives |v| = √(5² + 6²) = 7.81, which is √(x² + y² + z²)
Make the box 3 by 4 by 12 and read the diagonal
A box 3 by 4 by 6: the floor diagonal is , and the space diagonal is , which is 7.81 to 2 decimal places. Drag the upright edge to 12, the gaps from A to the midpoint, and the space diagonal is , half of 26.
An end from the midpoint
Turned around, the midpoint gives a missing end. Each coordinate of M is the mean of the two ends, so each coordinate of B is twice M’s, minus A’s. With A(1, 2, 3) and M(4, 6, 15), B = (2 × 4 − 1, 2 × 6 − 2, 2 × 15 − 3) = (7, 10, 27).
The usual mistakes
Adding the gaps. 6 + 8 + 24 = 38 is the walk along three edges of the box; squaring each gap first gives the straight line, 26.
Stopping on the floor. is the floor diagonal; the climb of 24 still has to go in.
Giving the gaps or the sums as the midpoint. (6, 8, 24) measures the movement from A to B, and (8, 12, 30) has not yet been halved; the midpoint is (4, 6, 15).
Halving twice. The midpoint is 26 ÷ 2 = 13 from A; 6.5 is a quarter of the way along.
A cable across a warehouse
In the application below, the cable runs from a corner on the floor to the opposite top corner of the room, so its length is the long diagonal of the room. The hook holding it halfway is at the mean of each coordinate, and the distance from a sensor to the hook is one more distance in three dimensions, with a gap that is not a whole number.
Worked example: A Cable Across a Warehouse from a Floor Corner to the Far Top Corner
Question A warehouse is a cuboid 12 m long, 4 m wide and 3 m high. With axes along its edges from the corner O on the floor, a cable runs straight from O to a light L at (12, 4, 3) in the opposite top corner. A sensor S is at (0, 4, 3). (a) Find the length of the cable. (b) A hook holds the cable at its midpoint M. Find the coordinates of M and the distance from the sensor to the hook.
1.The cable is the vector OL = 1243: along the length, across the width, and up the height of the room.
The cable is the vector OL = 1243: along the length, across the width and up the height of the room. 2.(a) In three dimensions the length is √122 + 42 + 32 = √144 + 16 + 9 = √169 = 13 m.
(a) Its length is √122 + 42 + 32 = √169 = 13 m. 3.The midpoint has the mean of each coordinate: M = (0 + 122, 0 + 42, 0 + 32) = (6, 2, 1.5).
The midpoint has the mean of each coordinate: M = (6, 2, 1.5), halfway up the room. 4.From the sensor to the hook: SM = 6 − 02 − 41.5 − 3 = 6−2−1.5.
From the sensor to the hook: SM = 6−2−1.5. 5.(b) M is at (6, 2, 1.5), and SM = √62 + 22 + 1.52 = √36 + 4 + 2.25 = √42.25 = 6.5 m. Check: 6.52 = 42.25.
(b) SM = √36 + 4 + 2.25 = √42.25 = 6.5 m.
Answer: (a) 13 m; (b) M(6, 2, 1.5), and 6.5 m from the sensor
Common mistakes
- Using only the floor: √122 + 42 = √160 ≈ 12.6 m. That is the diagonal of the floor; the cable also climbs 3 m, so the height enters the sum as a third square.
- Putting the hook at a height of 3 m because the light is at the ceiling. The cable starts on the floor, so halfway along it is halfway up, at 1.5 m.