In this explainer, we will learn how to find the distance between two points on the coordinate plane using the Pythagorean theorem.
We can begin by recalling the Pythagorean theorem, which relates the length of the longest side of a right triangle to the lengths of the other two sides. A right triangle has one right angle and always one longest side, called the hypotenuse.
Definition: The Pythagorean Theorem
The Pythagorean theorem states that, in any right triangle, the square of the hypotenuse is equal to the sum of the squares of the two shorter sides.
For a hypotenuse, , and the two shorter sides, and , the Pythagorean theorem states that
We can apply this theorem to find the distance between two points on a coordinate grid. Let us consider the following example with the points and . We observe how we can form a right triangle with the hypotenuse as the line joining these two points. A right angle is created at the coordinates , where the vertical line from and the horizontal line from meet.
We can observe that the horizontal distance from to is 5 units, and the vertical distance from to is 3 units.
We could then apply the Pythagorean theorem, , to find the hypotenuse, , with and , which gives
Therefore, the hypotenuse, which is the distance between the two points, can be written as units.
So, at a basic level, we can count the squares, or units, to find the horizontal and vertical distances between two coordinates and then apply the Pythagorean theorem. This may be a satisfactory method for lower-value, or easier-to-graph, coordinates. However, we can use the Pythagorean theorem to do this for any points without graphing, by considering the values of their coordinates and deriving a general formula.
We consider a more general situation, where we seek to find the distance, , between two coordinates, and .
We can create a right triangle with these two coordinates, using the line between them as the hypotenuse, along with a third vertex, . This creates a right triangle. The length of the hypotenuse will be equal to the distance, , between the two coordinates.
In the diagram above, the horizontal distance between the points is and the vertical distance is . The value of these distances must always be positive in order for our method to work. Therefore, in order to generalize for any arbitrary positive or negative values of , , , or , we will need to use absolute value symbols to indicate that the length is a positive number. The absolute value of any number is positive. So, the horizontal distance between the coordinates can be represented by and the vertical distance by .
We can then apply the Pythagorean theorem to find the hypotenuse, , as
Note that when using this formula, we do not need to use the absolute value symbols because the terms and are being squared. Any squared number will be positive; hence, we will not have any issues with “negative distances.”
We have now derived a formula to calculate the distance between any two points on the coordinate plane, which we can define formally below. This formula is often referred to as the distance formula.
Definition: The Distance between Two Points on the Coordinate Plane
The distance, , between two points with coordinates and is given by
We will now see how we can apply this formula in the following examples.
Example 1: Finding the Distance between a Point and the Origin
Find the distance between the point and the point of origin.
To find the distance between these two points, we can recall the distance formula, which allows us to find a distance, , between two points, and . This distance is given by
Substituting , the origin, as coordinates and as into the distance formula, gives
We can further simplify this value as
We can note that the choice of which coordinates we designate as and does not matter. For example, if we had chosen the coordinates the other way round, the calculation would have been given as
This is a result of the process of squaring each of the values of and , which produces a positive result.
Using either calculation produces the solution that the distance between and the point of origin is
In the next example, we will solve a word problem by finding the distance between two points on the coordinate plane.
Example 2: Solving a Real-World Problem by Finding the Distance between Two Points
Fares is making a map of his local area measured in yards. The coffee shop is at and the Italian restaurant is at . Find the distance between the coffee shop and the Italian restaurant giving the answer to one decimal place.
We can find the distance between the coffee shop and the Italian restaurant by finding the distance between their coordinates. We can recall that to find the distance, , between two points, and , we calculate
We can assign either of the coordinates to either of the and values. So, setting and , we can substitute these into the distance formula, giving
As we are asked for an answer to one decimal place, we can find a decimal equivalent to the value of and approximate, which gives
Therefore, the distance between the coffee shop and the Italian restaurant, to one decimal place, is
In the next example, we will see how to find a missing coordinate given the distance between two points.
Example 3: Finding an Unknown Coordinate Using the Distance between Two Points
The distance between and is 5. What are the possible values of ?
To calculate the value of , we can use the given information about the distance between the two coordinates. The distance, , between two points, and , is given by
In this question, we have the value and the coordinates , which we can substitute for the values. We can use the coordinates as the values. Substituting these into the distance formula gives
We can square both sides and simplify, which gives
Since the square of a negative number is still positive, we must account for both the positive and the negative roots. We can do this using the sign. The equation can now be written as
We now have two equations, and , which we can solve for :
Thus, the solutions for are
We can understand this solution by representing the problem in a sketch. We were given the complete coordinates . We were also given , which we could think of as a point with an unknown -coordinate but a -coordinate of 5. That means that the missing coordinate must lie somewhere on the line with the equation .
We are given that the distance of from is 5 units, so there are two possibilities.
The coordinates of the two points at a distance of 5 units from and that lie on the line are and . Note that there are infinite possible coordinates that lie at a distance of 5 units from ; all these coordinates would form a circle of radius 5 units from this coordinate. However, since we are constrained by the fact that the -coordinate is 5, there are just two possible solutions. Therefore,
So far, we have established how to find the distance between two points on the coordinate plane. We can now move forward to finding a number of lengths within one problem, for example, finding the lengths of sides of geometric shapes plotted on a grid. In the next example, we will see how we can find the perimeter of a shape given its coordinates.
Example 4: Finding the Perimeter of a Triangle given Its Vertices’ Coordinates Using the Pythagorean Theorem
Given , , and , what is the perimeter of ?
It can often be helpful to begin a problem such as this by sketching a diagram. Plotting the three coordinates and joining them, we create .
The perimeter of a shape is a distance around the outside edge. Hence, we will need to find the sum of the lengths of , , and . We can find the lengths of these line segments by considering the distance between the coordinates of their endpoints.
We recall that the distance, , between two points, and , is given by
Let us begin with finding the length of . In this case, rather than needing to apply the distance formula above, we observe that this is a horizontal line segment. As the coordinates do not differ in the -direction, the distance between them is the absolute value of the difference in the -coordinates, length units. Thus,
Next, we can find the length of by substituting and into the distance formula. This gives us
For the final length, , we substitute and into the distance formula. Thus, we have
Finally, to find the perimeter of , we add the lengths of its 3 sides. This gives us
Hence, we can give the answer that the perimeter of is
In the next example we will see a problem involving a circle. The information that the circle is plotted on the coordinate plane, along with facts about the center and a point on the circumference, means that we can apply the distance formula to calculate its radius.
Example 5: Finding the Position of a Point with respect to a Circle
Point is on the circle with center . Decide whether point is on, inside, or outside the circle.
In this problem, we are given a point representing the position of the center of a circle and a coordinate lying on the circle. The distance from the center to this point would be the radius of the circle.
We can calculate the radius by using the distance formula. We recall that the distance, , between two points, and , is given by
Substituting and , we can calculate the radius as
Now, for any other given point, we can determine whether it is on the circle if its distance from the center, which we can define as , is the same as the radius, . If this distance is less than the value of the radius, then the point is inside the circle; if it is equal to the radius, then the point is on the circle; and if it is larger than the radius, then the point is outside the circle.
Therefore, let us determine the distance of the given point, , from the center, . Substituting these values for and , respectively, in the distance formula, we have
We observe that this distance is exactly equal to the radius, so we can give the answer that the point must be on the circle.
To help us visualize the solution, we could sketch the diagram below, noting that the two coordinates lie at an equal distance of length units from the center, .
Although these two coordinates are collinear, they need not be in order for both to lie on the circumference of the circle.
We now summarize the key points.
- The Pythagorean theorem states that in any right triangle, the square of the hypotenuse is equal to the sum of the squares of the two shorter sides. For a hypotenuse, , and the two shorter sides, and , the Pythagorean theorem states that
- The distance, , between two points with coordinates and is given by
- When using the distance formula above with two given coordinates, we can substitute either set of coordinates for the and values.
- When using the distance formula to find an unknown coordinate at a given distance from another set of coordinates, there may be more than one solution.