What do we mean by distance?


Distance is a tricky concept. Distance in a plane, like a chess board, is the straight-line distance between two points. But what is a straight line? Is it the shortest distance between two points? Doesn't that definition involve the concept of distance that we're trying to define in the first place?

It turns out that the concept of a straight line is one we have to take for granted — a postulate, a thing that must be assumed to exist or to be true in order for anything else to be built upon it. A straight line is a "line of zero curvature" or "the path of a point traveling in a constant direction." So we accept the definition that the distance between two points on a plane is the length of the straight line (line segment) that joins them.

Distance in a plane

The distance between two points on a plane is the length of the straight-line segment that connects them.

boston to beijing

It gets strange when we move off of the plane. Consider: How far is it from one side of a room to another? From one part of a city to another? From one city to another? How far is it from Boston to Beijing? That one is tricky, because we know Earth is roughly a sphere, and when we travel from Boston to China, we take a curved path, not the straight one that drills through the middle of the planet.

How far apart are the two cities? There are two answers, right? So we have to be specific, at least in mathemiatics, about what we mean by distance. For most of our purposes, we'll be talking about distance on a plane.


Distance on the plane: The Pythagorean Theorem


To determine the distance between any two points on a coordinate plane (just a plane to which we've assigned a coordinate system and some units, like cm), we use the Pythagorean theorem.

The figure at right shows two points with coordinates (x1, y1) and (x2, y2). The distances along the axes, y2-y1 and x2-x1 are parallel to the coordinate axes and therefore orthogonal (form a right angle).

Because the line segment representing the distance of interest makes a right triangle with these two differences, we can easily calculate the length of that segment (the distance between the points) using the Pythagorean Theorem:

d2 = (x2 - x1)2 + (y2 - y1)2

The distance formula

The distance between two points in a plane, (x1, y1) and (x2, y2) is

This is just a re-statement of the Pythagorean theorem.

Practice problems

Find the distance between the following sets of points on the 2D plane:

1.   (-1, -1) and (2, 2)


2.   (4, 3) and (3, 2)


3.   (-2, -9) and (2, 2)

4.   (6, 1) and (9, 3)


5.   (-4, -3) and (22, 8)


6.   (-10, 100) and (6, 19)


Extension to three dimensions


To determine the distance between any two points on a 3-Dimensional coordinate grid, we just extend our formula with a term that brings in the z-components of the ordered triples of the endpoints.

The figure at right shows two points with coordinates (x1, y1, z1) and (x2, y2, z2). The distances along the axes, y2-y1, x2-x1, and z2-z1 are parallel to the coordinate axes.

Because the line segment representing the distance of interest makes a right triangle with these two differences, we can easily calculate the length of that segment (the distance between the points) using the Pythagorean Theorem:

d2 = (x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2

3D distance definition

Distance in n dimensions

We can easily extend the 2-d or 3-d distance formula to any number of dimensions:

Creative Commons License   optimized for firefox
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2016, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.