<meta http-equiv="refresh" content="1; url=/nojavascript/"> Distance Formula ( Read ) | Algebra | CK-12 Foundation
Skip Navigation
You are viewing an older version of this Concept. Go to the latest version.

Distance Formula

Best Score
Practice Distance Formula
Best Score
Practice Now
Distance Formula
 0  0  0

Suppose you and your friend were on a scavenger hunt. Starting out from the same place, you walked 5 blocks east and 3 blocks north. Your friend walked 7 blocks west and 2 blocks south. If each block were a tenth of a mile long, could you calculate how far apart you and your friend were? How would you do it? In this Concept, you'll learn how to use the distance formula to determine how far two points are from each other so that you can solve this type of problem.


To understand the distance formula, we will first look at an example:

Example A

Find the length of the segment connecting (1, 5) and (5, 2).


The question asks you to identify the length of the segment. Because the segment is not parallel to either axis, it is difficult to measure given the coordinate grid.

However, it is possible to think of this segment as the hypotenuse of a right triangle. Draw a vertical line and a horizontal line. Find the point of intersection. This point represents the third vertex in the right triangle.

You can easily count the lengths of the legs of this triangle on the grid. The vertical leg extends from (1, 2) to (1, 5), so it is |5-2|=|3|=3 \ units long. The horizontal leg extends from (1, 2) to (5, 2), so it is |5-1|=|4| = 4 \ units long. Use the Pythagorean Theorem with these values for the lengths of each leg to find the length of the hypotenuse.

a^2+b^2&=c^2\\3^2+4^2&=c^2\\9+16&=c^2\\25&=c^2\\\sqrt{25} & = \sqrt{c^2}\\5 & =c

The segment connecting (1, 5) and (5, 2) is 5 units long.

Mathematicians have simplified this process and created a formula that uses these steps to find the distance between any two points in the coordinate plane. If you use the distance formula, you don’t have to draw the extra lines.

Distance formula: Given points (x_1, y_1) and (x_2, y_2) , the length of the segment connecting those two points is d=\sqrt{(y_2-y_1)^2+(x_2-x_1 )^2} .

Example B

Find the distance between (–3, 5) and (4, –2).


Use the distance formula. Let (x_1,y_1)=(-3,5) and (x_2,y_2)=(4,-2) .

d&=\sqrt{(-2-5)^2+(4-(-3))^2} \rightarrow \sqrt{(-7)^2+7^2}\\d& =\sqrt{98}=7\sqrt{2} \ units

Example C

At 8 a.m. one day, Amir decides to walk in a straight line on the beach. After two hours of making no turns and traveling at a steady rate, Amir was two miles east and four miles north of his starting point. How far did Amir walk and what was his walking speed?


Plot Amir’s route on a coordinate graph. We can place his starting point at the origin, A=(0, 0) . Then, his ending point will be at the point B=(2, 4) . The distance can be found with the distance formula.

d&=\sqrt{(4-0)^2 + (2-0)^2} = \sqrt{(4)^2 + (2)^2} + \sqrt{16+4}=\sqrt{20}\\d&=4.47 \ miles.

Since Amir walked 4.47 miles in 2 hours, his speed is:

\text{Speed} = \frac{4.47 \ miles}{2 \ hours}= 2.24 \ mi/h

Video Review

Guided Practice

Point A=(6, -4) and point B=(2, k) . What is the value of k such that the distance between the two points is 5?


Use the distance formula.

d = \sqrt{(y_1-y_2)^2 + (x_1-x_2)^2} \Rightarrow 5 = \sqrt{(4-k)^2 + (6-2)^2}

\text{Square both sides of the equation.} \qquad 5^2&= \left [ \sqrt{(4-k)^2 + (6-2)^2} \right ]^2\\\text{Simplify}. \qquad 25 &= (-4-k)^2 + 16\\\text{Eliminate the parentheses}. \qquad 0 & = k^2+8k+16 -9\\\text{Simplify}. \qquad 0 & = k^2+8k+7\\\text{Find} \ k \ \text{using the quadratic formula}. \qquad k&= \frac{-8\pm \sqrt{64-28}}{2}= \frac{-8\pm \sqrt{36}}{2} = \frac{-8 \pm 6}{2}

k=-7 or k=-1 . There are two possibilities for the value of k . Let’s graph the points to get a visual representation of our results.


Sample explanations for some of the practice exercises below are available by viewing the following videos. Note that there is not always a match between the number of the practice exercise in the videos and the number of the practice exercise listed in the following exercise set. However, the practice exercise is the same in both. CK-12 Basic Algebra: Distance Formula (9:39)

CK-12 Basic Algebra: Pythagorean Theorem 3 (3:00)

In 1–10, find the distance between the two points.

  1. (x_1,y_1) and (x_2,y_2)
  2. (7, 7) and (–7, 7)
  3. (–3, 6) and (3, –6)
  4. (–3, –1) and (–5, –8)
  5. (3, –4) and (6, 0)
  6. (–1, 0) and (4, 2)
  7. (–3, 2) and (6, 2)
  8. (0.5, –2.5) and (4, –4)
  9. (12, –10) and (0, –6)
  10. (2.3, 4.5) and (–3.4, –5.2)
  1. Find all points having an x -coordinate of –4 and whose distance from point (4, 2) is 10.
  2. Find all points having a y -coordinate of 3 and whose distance from point (–2, 5) is 8.
  3. Michelle decides to ride her bike one day. First she rides her bike due south for 12 miles, and then the direction of the bike trail changes and she rides in the new direction for a while longer. When she stops, Michelle is 2 miles south and 10 miles west of her starting point. Find the total distance that Michelle covered from her starting point.

Mixed Review

  1. Solve (x-4)^2=121 .
  2. What is the GCF of 21ab^4 and 15a^7 b^2 ?
  3. Evaluate _{10}C_7 and explain its meaning.
  4. Factor 6x^2+17x+5 .
  5. Find the area of a rectangle with a length of (16+2m) and a width of (12+2m) .
  6. Factor x^2-81 .

Image Attributions


Email Verified
Well done! You've successfully verified the email address .
Please wait...
Please wait...
ShareThis Copy and Paste

Original text