G7 · Develop and use the distance formula for line segments
Learn to develop and use the distance formula for line segments through clear examples and targeted practice.
Ontario Grade 10 Mathematics
Analytic Geometry
Develop and use the distance formula for line segments
A map uses coordinates to show where places are. If two places are marked by points, their straight-line distance is the length of the line segment joining them. This lesson develops a way to find that length from the points' coordinates. You will first review how to count horizontal and vertical changes, then connect those changes to a right triangle.
What you will learn
Recall how horizontal and vertical changes are found from coordinates.
Explain how the Pythagorean theorem connects those changes to the length of a line segment.
Use the distance formula to find the length of a segment between two points.
Check that a distance is reasonable and report it with suitable units when units are given.
1. Grade 9 bridge: coordinate changes
A point on a coordinate grid is named by an ordered pair, such as (2,3). The first number tells the horizontal position, and the second tells the vertical position. The horizontal axis is the left-to-right number line. The vertical axis is the up-and-down number line.
To find how far apart two points are horizontally, compare their first coordinates. To find their vertical separation, compare their second coordinates. For instance, points (1,2) and (5,5) have a horizontal change of 4 and a vertical change of 3.
A change can be negative if it points left or down. For distance, however, we need the size of each change. Squaring a number makes its square positive whether the original change was positive or negative.
Δx=x2−x1,Δy=y2−y1
The first coordinate gives horizontal position; the second gives vertical position.
Subtract matching coordinates to find the changes.
A distance is a length, so it cannot be negative.
2. From a right triangle to a distance formula
Imagine drawing a horizontal segment and a vertical segment from the endpoints of a slanted segment. These three segments make a right triangle. The slanted segment is the triangle's hypotenuse. The hypotenuse is the side opposite the right angle and is the longest side of a right triangle.
The Pythagorean theorem says that, in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. Here, the horizontal and vertical changes are the two shorter sides. Their lengths are ∣x2−x1∣ and ∣y2−y1∣. The absolute value bars mean the positive size of a number.
If the endpoints are (x1,y1) and (x2,y2), the distance d between them follows from the Pythagorean theorem. The squares remove the need to worry about whether a coordinate change was negative. The square root gives the segment's length rather than its squared length.
The order of the points does not change the distance. Reversing the subtraction changes the signs of both coordinate differences, but their squares stay the same.
d=(x2−x1)2+(y2−y1)2
The coordinate differences form the legs of a right triangle.
Use the Pythagorean theorem to combine the two changes.
The distance formula works for horizontal, vertical, and slanted segments.
3. Guided example: calculate and check
Find the length of the line segment joining A(−2,1) and B(4,9). The labels A and B simply name the two points. Match the first coordinates with each other and the second coordinates with each other.
The horizontal change is 4−(−2)=6. The vertical change is 9−1=8. These values are the two legs of the right triangle. Substitute them into the distance formula, square each change, add, and take the square root.
The result is 10. This is reasonable: the horizontal and vertical changes are 6 and 8, so the slanted length should be greater than either change. If the coordinates represented metres, the segment would be 10 metres long.
d=(4−(−2))2+(9−1)2=36+64=10
Keep each point's coordinates together when substituting.
Subtract first, then square the differences.
Check that the answer is at least as large as either individual change.
4. Use the formula carefully
For any pair of endpoints, choose one point to be (x1,y1) and the other to be (x2,y2). Write the values into the formula in matching positions. You may swap the endpoint labels, but do not mix the first coordinate of one point with the second coordinate of the other.
If two points share the same first coordinate, the segment is vertical. Its length is the size of the difference between the second coordinates. If they share the same second coordinate, the segment is horizontal, and its length is the size of the difference between the first coordinates. The distance formula gives the same result in either case.
Keep the square root until the end of the calculation. If the number inside is a perfect square, the distance is a whole number. Otherwise, a decimal approximation may be useful. Follow the instructions of the question about rounding. Include units if the problem provides them.
Now try these independently. Find the distance between (1,−2) and (4,2). Then find the distance between (−3,5) and (5,5). For each one, identify the horizontal and vertical changes before calculating. Check your answers by considering whether the segment is horizontal, vertical, or slanted.
Use the same coordinate order for both endpoints.
A shared coordinate makes one of the changes zero.
Do not round before the final answer.
Coordinate changes for the guided example
Direction
Coordinate subtraction
Change
Horizontal
4−(−2)
6
Vertical
9−1
8
Segment length
62+82
10
Worked example
Distance between two slanted-segment endpoints
Find the distance between A(−2,1) and B(4,9).
Find the coordinate changes
Subtract the first coordinates to get the horizontal change. Subtract the second coordinates to get the vertical change. These changes are the legs of the right triangle formed by the segment.
Δx=4−(−2)=6,Δy=9−1=8
Substitute into the distance formula
The formula combines the squares of the two leg lengths. This is the Pythagorean theorem applied to the triangle between the points.
d=62+82
Calculate the length
Square each change, add the results, and take the square root. The distance is the positive length of the segment.
d=36+64=100=10
Answer: The distance between A and B is 10 units.
Check: The answer is greater than both the horizontal change, 6, and the vertical change, 8, as expected for a slanted segment.
Common mistakes and how to avoid them
Adding the coordinates instead of finding the changes.
Correction: Subtract matching coordinates to find the horizontal and vertical changes. Then square those changes.
Leaving a negative distance because one coordinate change is negative.
Correction: The changes are squared in the formula, so their signs do not make the distance negative.
Forgetting the square root and reporting the sum of the squared changes.
Correction: The sum gives the square of the distance. Take its square root to find the length.
Mixing the coordinates of the two endpoints.
Correction: Subtract first coordinates from first coordinates, and second coordinates from second coordinates.
Lesson summary
Find the horizontal and vertical changes by subtracting matching coordinates.
Use the Pythagorean theorem to combine the changes into the segment length.
Take the square root after adding the squared changes.
Check that the answer is non-negative and makes sense compared with the coordinate changes.
Check your understanding
Question 1
What is the distance between (2,1) and (2,7)?
6
8
36
13
Show answer and explanation
6
The first coordinates are the same, so the segment is vertical. Its length is the difference between the second coordinates: 7−1=6.
Question 2
What is the distance between (0,0) and (5,12)?
7
13
17
169
Show answer and explanation
13
The changes are 5 and 12. The distance is 52+122=169=13.
Question 3
Why does the distance formula square each coordinate change?
To use the two changes as the sides of a right triangle and remove any negative signs
To make the horizontal change twice as large
To avoid taking a square root
To show that every segment is vertical
Show answer and explanation
To use the two changes as the sides of a right triangle and remove any negative signs
The changes are the legs of a right triangle, so their squares are added by the Pythagorean theorem. Squaring also makes each contribution non-negative.
Key terms
Coordinate
A number that tells a point's position along one axis of a grid.
Line segment
A straight part of a line with two endpoints.
Hypotenuse
The side opposite the right angle in a right triangle.
Distance formula
A rule that uses the coordinates of two points to calculate the length of the segment between them.
Tutor support for G7 · Develop and use the distance formula for line segments
Working on G7 · Develop and use the distance formula for line segments in MPM2D? Bring the question and your own attempt. In a live session, you can show each step of your attempt and compare it with a worked example. Ask about the first step that does not make sense, then try a similar question yourself.
برای مبحث G7 · بهدستآوردن و بهکارگیری فرمول فاصله در درس MPM2D، سؤال و تلاش خود را همراه بیاورید. در جلسه میتوانید گامهای تلاش خود را نشان دهید و آن را با یک نمونهٔ حلشده مقایسه کنید. راهنمای معلم ریاضی را ببینید یا جلسهٔ معارفهٔ رایگان ۳۰ دقیقهای درخواست کنید. زمان جلسه پس از پذیرش معلم قطعی میشود.
About this lesson and its review
Published by DoAssignment. This reviewed lesson follows Ontario Grade 10 Mathematics (MPM2D), study topic G7. It is a study resource, not an official curriculum publication.
Before publication, content is checked for structure, mathematical or chemical notation, calculations, course boundaries, and readability. Errors can still occur, so corrections are welcomed.