Find the distance between the two points 𝐴 with coordinates negative seven, 12, three and 𝐵 with coordinates negative four, negative one, negative eight. To solve this question, we can use a formula, the distance between two arbitrary points in three dimensional space.
𝑃 with coordinates 𝑥1, 𝑦1, 𝑧1, and 𝑄 with coordinates 𝑥2, 𝑦2, 𝑧2 is the square root of
𝑥 [𝑥1] minus 𝑥1 [𝑥2] squared plus 𝑦1 minus 𝑦2 squared plus 𝑧1 minus 𝑧2 squared. This is very similar to the formula for distance in two-dimensional space. The only difference is that because in three dimensions we also have a 𝑧-coordinate; we have a term involving the 𝑧-coordinates in our formula.
Substituting the values of the coordinates in, we get negative seven minus negative four squared plus 12 minus negative one squared plus three minus negative eight squared. We find that negative seven minus negative four is negative three, 12 minus negative one is 13, and three minus negative eight is 11.
So the distance is the square root of nine plus 169 plus 121, which is the square root of 299 length units. And looking at the prime factorization of 299, it’s 13 times 23. We can see that we can’t simplify this radical any further, so this is our final answer. So that was just applying a formula, but where did that formula come from? I’m not going to derive the general formula; I’m just going to solve the problem without using the general formula.
But it turns out the solution can be generalized quite easily to give the general formula for the distance between two points in 3D space. I’ve drawn something that looks very much like the two-dimensional plane, but in fact this is 3D space just with the 𝑧-axis pointing straight out of the screen at you from the origin.
In this orientation of 3D space, you can’t actually see the 𝑧-axis but trust me it’s there. I’ve marked on the point 𝐴 which has coordinates negative seven, 12, three, and I’ve also marked on the auxiliary point 𝑃 with coordinates negative four, negative one, three.
Notice that the point 𝑃 is not the same as the point 𝐵; although it’s 𝑥- and 𝑦-coordinates are the same, its 𝑧-coordinate is three and not negative eight. It does, however, have the same 𝑧-coordinate as the point 𝐴, and so both points lie in the plane with equation 𝑧 equals three.
We can add another auxiliary point, 𝑄, with coordinates negative seven, negative one, and three. It is in the same plane as the other two points, 𝑧 equals three. Furthermore, it has the same 𝑥-coordinate as the point 𝐴. The only difference between the points 𝐴 and 𝑄 is in their 𝑦-coordinates: 𝐴 has a 𝑦-coordinate of 12, whereas 𝑄 has a 𝑦-coordinate of negative one. And so to get from 𝐴 to 𝑄, you have to move 13 units in the opposite direction to the 𝑦-axis, so the distance between 𝐴 and 𝑄 is 13 length units.
In a similar way, we can see that getting from 𝑄 to 𝑃 requires moving three units in the 𝑥-direction. And of course the angle formed at 𝑄 is a right angle; remember that we’re working in the plane with equation 𝑧 equals three here, so this really is a right angle and not just something that looks like a right angle because of the way that we’ve oriented our three-dimensional space. And so using the Pythagorean theorem, we see that the distance from 𝐴 to 𝑃 is the square root of 178 length units.
Of course this is the same answer that we would get by using the two-dimensional distance formula and just ignoring the third coordinate, the 𝑧-coordinate. And that’s great and all, but we’re not looking for the distance from 𝐴 to 𝑃; we’re looking for the distance from 𝐴 to 𝐵. If you remember, the 𝑧-axis is pointing straight out of the screen at us. And so the point 𝐵 which has the same 𝑥 and 𝑦 coordinates as the point 𝑃, but a different 𝑧-coordinate, would look like it occupies the same space as the point 𝑃 on our two-dimensional representation of the 3D space.
Of course as discussed before, it isn’t at the same place as 𝑃. In fact, it is a distance of three minus negative eight units away in the 𝑧-direction. So if we now draw another representation of our three-dimensional space — this one where you can’t see the 𝑥-axis because it’s actually going down into the screen away from us marking 𝐴, 𝑃, and 𝐵 on this diagram — we can see that 𝐵 and 𝑃 are definitely not the same. And in fact because 𝑄 and 𝑃 have the same 𝑦- and 𝑧- coordinates, if we marked 𝑄 on this diagram as well, it would look like 𝑄 is at the same place as 𝑃.
To get from 𝐵 to 𝑃, you have to move 11 units in the 𝑧-direction, so the distance from 𝐵 to 𝑃 is 11. We can also mark on the length of AP that we found using the left-hand diagram; it is the square root of 178 length units. We have to be careful here, if we look only at the right-hand diagram, it’s very tempting to believe that the only difference between 𝐴 and 𝑃 is in their 𝑦- co-ordinate, and so the length of AP is 12 minus negative one equals 13.
But of course their 𝑥 coordinates are also different. It’s just that because the 𝑥-axis is pointing down into the screen, we can’t see this easily. The difficult thing to see here is that the angle at 𝑃 is a right angle. These two dimensional diagrams can sometimes misrepresent 3D angles, but in this case it really is a right angle, and we can prove this for example using vectors.
But having convinced ourselves of this fact, we can apply the Pythagorean theorem. The length of AB, the distance between 𝐴 and 𝐵, is the square root of 11 squared plus the square root of 178 squared, which is the square root of 121 plus 178, which as before is the square root of 299 length units.
It is quite common that you have to find the distance between two points in three-dimensional space. Three-dimensional space, after all, is the space that we live in. And so rather than going through this process every time you want to find the distance between two points in three- dimensional space, it makes sense to do this only once in the general case and just derive a formula that we can then substitute the numbers into when required.