
The distance between two points

Upgrade for more content
What unit do we use in a coordinate system?
Here are two points. How far are they from each other? How do we measure the distance between A and B? We can use a ruler or a measuring tape. If you watch this movie on a cellphone and use a ruler you get two and a half centimeters.
When you watch this movie on a projection screen and use a ruler you get 55 centimeters. It was not the same result. Is there a better way? We can calculate the distance instead of measuring it. To calculate the distance we need a coordinate system.
Aha! Now the points are in a coordinate system. Point A's x-value is read immediately below the point on the x-axis: 5. The same with point B. Immediately under B, we read 1 on the x-axis.
The difference is 5 minus 1 which equals 4. The distance is 4. Now we don’t know if it is centimeters, meters, or any other length unit, so we simply say that the answer is 4 units of length. But what if the points are placed like this though? If we look at the difference in x-value for the points the answer will be: zero length units.
On the other hand, we see that on the y-axis, point A gets the value two, and point B the value minus one. The difference will be two minus minus one and since minus and minus become plus then it will be 2 plus 1 which equals 3 length units. That was quite easy. But what if the line between the points isn’t parallel to the x-axis, nor the y-axis? If, for example, they are here?
One of the points lies over the x axis, and the other is underneath diagonally. Try reading on the x-axis. Four. No. It will be too short, right?
On the y-axis then? Three? No, too short. How? Here’s a trick!
Create a right-angled triangle. Mark the distance to be measured with a line between the points. From A to B. Then from B, a line to the right, parallel to the x-axis. And a line from A down to where it meets the first line.
The distance between the points is the long side of the right-angled triangle. This side is called the hypotenuse. And these two distances, we can easily read on the x- and y-axes. The short sides of the right-angled triangle are called legs. But this seems familiar doesn't it?
Hypotenuse, legs, right-angled triangle. Pythagorean theorem! We can calculate the hypotenuse, the length we’re looking for, with the Pythagorean theorem. Point A has the value 5 on the x-axis and 2 on the y-axis. We show it by typing 5 and 2 in parentheses where the first value is x and second is the y-value.
At point B, x = 1 and y = -1. The length of one of the legs, let’s call it ‘a’, we already calculated as 4. The length of the other leg, let’s say ‘b’, we already know is 3. According to Pythagoras’ theorem, c squared equals a squared plus b squared. The squares of sides a and b are: 4 times 4 which equals 16, and 3 times 3, which equals 9.
c squared then becomes 16 plus 9, which equals 25. Calculate the square root of c squared to get the distance c, which is the distance between the points. The root of 25 is 5. The distance between point A and point B is 5 units of length. That's good!
Now we can measure any distance between two points in a coordinate system. What should we use this for? Well, look here. We can use this method to calculate the distance on a map. A map is a huge coordinate system.
But on the map we call the x-value longitude and the y-value latitude.