Grade by Grade
Analytic Geometry · Analytic Geometry

The Length of a Line Segment

2.2About 70 minutes
Learning goals
  • I can develop the formula for the length of a line segment from the Pythagorean relationship.
  • I can find exact and approximate lengths of segments.
  • I can solve problems with lengths, including perimeters and segments joining midpoints.
  • I can verify lengths with measurement or dynamic geometry software.

Words to know

length of a line segment
The distance between its endpoints; also called the distance between two points.
hypotenuse
The longest side of a right triangle, opposite the right angle.
Δx, Δy
The change in x and the change in y between two points (Δ is the Greek letter delta).
exact value
A value written without rounding, such as √50.
collinear
Lying on the same straight line.

How far, exactly?

On a map where each grid square is 1 km, a fire hall is at (2, 3) and a cottage is at (8, 11). How far apart are they in a straight line? You could measure with a ruler, but a ruler is never perfectly exact. In this lesson you will develop a formula that gives the exact length of any line segment from its endpoints.

Remember from Grade 9

The Pythagorean relationship: in a right triangle with legs a and b and hypotenuse c, a² + b² = c². In Grade 9 you used it to find unknown lengths in real-life situations and composite shapes. It is the key to the length formula.

Developing the formula

Take A(1, 2) and B(7, 10). Draw a horizontal line through A and a vertical line through B. They meet at C(7, 2), making a right triangle with the right angle at C.

  • The horizontal leg AC is the change in x: 7 − 1 = 6.
  • The vertical leg CB is the change in y: 10 − 2 = 8.
  • The segment AB is the hypotenuse.

By the Pythagorean relationship: AB² = 6² + 8² = 36 + 64 = 100, so AB = √100 = 10.

The same steps work for any two points. The legs are always the change in x and the change in y.

1234567891011123456789100xyA(1, 2)B(7, 10)C(7, 2)run: 7 − 1 = 6rise: 10 − 2 = 8AB = √(6² + 8²)= √100 = 10
Every segment that is not horizontal or vertical is the hypotenuse of a right triangle. The legs are the run (change in x) and the rise (change in y).

The length (distance) formula

The length of the segment joining A(x₁, y₁) and B(x₂, y₂) is

AB = √[(x₂ − x₁)² + (y₂ − y₁)²]

You may subtract in either order, because squaring makes the result positive: (−6)² = 6² = 36. Some books write Δx ("delta x", the change in x) and Δy, so AB = √(Δx² + Δy²).

Worked example

Example 1: A length with a negative change

Find the length of the segment from C(−3, 4) to D(2, −1). Give the exact answer and a decimal to two places.

  1. Δx = 2 − (−3) = 5. Δy = −1 − 4 = −5.
  2. CD = √(5² + (−5)²) = √(25 + 25) = √50.
  3. Using a calculator, √50 ≈ 7.07.

CD = √50, which is about 7.07 units. (√50 is the exact answer; 7.07 is rounded.)

Exact or rounded?

√50 is an exact value. 7.07 is an approximation. When a problem says "exact", leave the square root. When a problem is about a real measurement, round sensibly and include units. In later courses you will learn to simplify square roots, for example √50 = 5√2.

Worked example

Example 2: Which is closer?

On a township map (1 unit = 1 km), the fire hall is at F(2, 3). Farmhouse G is at (−4, 7) and farmhouse H is at (8, −2). Which farmhouse is closer to the fire hall?

  1. FG: Δx = −4 − 2 = −6, Δy = 7 − 3 = 4. FG = √(36 + 16) = √52 ≈ 7.21 km.
  2. FH: Δx = 8 − 2 = 6, Δy = −2 − 3 = −5. FH = √(36 + 25) = √61 ≈ 7.81 km.
  3. √52 < √61, so FG is shorter.

Farmhouse G is closer, by about 0.6 km. (Real fire trucks follow roads, so the driving distance may be different: straight-line distance is a model.)

Worked example

Example 3: Perimeter of a triangle

Find the perimeter of triangle JKL with J(−2, −1), K(4, 3) and L(2, −5), to two decimal places.

  1. JK: Δx = 6, Δy = 4. JK = √(36 + 16) = √52 ≈ 7.211.
  2. KL: Δx = 2 − 4 = −2, Δy = −5 − 3 = −8. KL = √(4 + 64) = √68 ≈ 8.246.
  3. JL: Δx = 2 − (−2) = 4, Δy = −5 − (−1) = −4. JL = √(16 + 16) = √32 ≈ 5.657.
  4. Perimeter ≈ 7.211 + 8.246 + 5.657 = 21.114. (Keep extra decimals until the end, then round.)

The perimeter is about 21.11 units.

Worked example

Example 4: Joining midpoints

Triangle ABC has vertices A(−2, 4), B(6, 8) and C(4, −2). D is the midpoint of AB and E is the midpoint of AC. Find the lengths of DE and BC and compare them.

  1. D = ((−2 + 6)/2, (4 + 8)/2) = (2, 6). E = ((−2 + 4)/2, (4 + (−2))/2) = (1, 1).
  2. DE: Δx = 1 − 2 = −1, Δy = 1 − 6 = −5. DE = √(1 + 25) = √26 ≈ 5.10.
  3. BC: Δx = 4 − 6 = −2, Δy = −2 − 8 = −10. BC = √(4 + 100) = √104 ≈ 10.20.
  4. Compare the squares: BC² = 104 = 4 × 26 = 4 × DE². Since BC² is 4 times DE², BC is 2 times DE (because √4 = 2).
  5. Verify with technology: in GeoGebra, plot the points, use the Midpoint tool and the Distance or Length tool. Drag a vertex: the ratio stays 2 to 1.

DE = √26 ≈ 5.10 and BC = √104 ≈ 10.20, so DE is half of BC. The segment joining the midpoints of two sides is half the length of the third side. You will prove this in general later in the unit.

−3−2−11234567−3−2−11234567890xyA(−2, 4)B(6, 8)C(4, −2)D(2, 6)E(1, 1)BC = √104DE = √26
D and E are the midpoints of AB and AC. The dashed segment DE has length √26, exactly half of BC = √104.
Just for fun

Funny-but-true: in a city laid out in blocks, a taxi cannot drive diagonally through buildings. The "taxicab distance" from (0, 0) to (3, 4) is 3 + 4 = 7 blocks, even though the straight-line distance is only 5. Mathematicians really do call it taxicab geometry.

Hands-on activity

Measure the room with coordinates

You need: a measuring tape (in metres), paper, a pencil, a calculator and two objects on the floor of a room (for example a chair leg and a table leg). A grown-up can help hold the tape.

  1. Choose one corner of the room as the origin (0, 0). The two walls that meet there are your x- and y-axes.
  2. For each object, measure how far it is along one wall (x) and out from that wall (y), to the nearest centimetre. Write each as coordinates in metres, e.g. (1.20, 2.35).
  3. Use the length formula to calculate the distance between the two objects.
  4. Now measure the distance directly with the tape.
  5. Compare. Are they within a few centimetres? What could explain any difference?

What to look for: a correct calculation with the formula, and a sensible explanation of differences (the walls may not be at a perfect right angle, the tape may sag, measurements are rounded).

Your turn

1

Find the length of the segment from (0, 0) to (5, 12).

2

Find the length from (−1, 2) to (5, 10).

3

Find the exact length from (3, −4) to (−1, 2).

4

Find the length from (2, 7) to (2, −3).

5

Which point is farther from the origin: P(6, −7) or Q(−8, 4)?

6

Find the perimeter of the triangle with vertices (0, 0), (6, 0) and (6, 8).

7

A cell tower is at (−3, 1) on a map where 1 unit = 1 km. A cabin is at (4, 5). How far is the cabin from the tower, to the nearest tenth of a kilometre?

More practice: warm-up

1

State the Pythagorean relationship.

2

Find Δx and Δy from (1, 3) to (4, 7).

3

Find the length from (1, 3) to (4, 7).

4

Calculate (−7)².

5

Round √40 to two decimal places.

More practice: on your own

1

Find the exact length of the segment from (−5, −2) to (1, 1).

2

A triangle has vertices A(−3, 0), B(3, 0) and C(0, 5). Find the lengths of its sides. What kind of triangle is it?

3

The point (k, 4) is 5 units from (1, 0). Find the possible values of k.

4

Find the length of the segment joining the midpoints of PQ and PR, where P(0, 6), Q(−4, 0) and R(8, 2).

5

A hiker walks from (0, 0) to (3, 4), then to (9, 12) (units in km). How far did she walk? How far is she from the start in a straight line?

Challenge

1

Find all points on the y-axis that are 10 units from (6, 2).

2

Find the point on the x-axis that is the same distance from A(1, 4) and B(5, 2).

3

Show that the points A(−2, −1), B(1, 1) and C(7, 5) lie on one straight line by using lengths.

Check your understanding

Quiz

1.

What is the length of the segment from (2, 1) to (5, 5)?

2.

The length formula comes from which relationship?

3.

What is the exact length from (−1, −1) to (2, 5)?

4.

Why does it not matter whether you calculate x₂ − x₁ or x₁ − x₂?

5.

Which point is 13 units from the origin?

6.

D and E are midpoints of two sides of a triangle, DE = 4.5 cm, and the third side is 9 cm. What does this suggest?

For parents and teachers

Big idea: the length of a segment is the hypotenuse of a right triangle whose legs are the change in x and the change in y. This lesson teaches expectation 2.2 (develop the formula for the length of a line segment and use it to solve problems, including lengths of segments joining the midpoints of a triangle's sides).

How to help: Ask your teen to draw the right triangle under a segment before using the formula. The room-measuring activity connects the formula to real space. Encourage writing the exact square root first and rounding only at the end.

Common difficulties:

  • Squaring a negative incorrectly: (−5)² = 25, but a calculator typed as −5² gives −25. Use brackets.
  • Adding before squaring, e.g. √(6 + 8)² instead of √(6² + 8²).
  • Thinking √(a² + b²) = a + b. It is not: √(36 + 64) = 10, not 14.
  • Rounding too early when adding several lengths (for a perimeter).