Distance Formula

JANUARY 23, 2024

What is Distance Formula in Maths?

In mathematics, the distance formula is used to determine the distance between two points in the Cartesian plane. Given two points, $ P_1(x_1, y_1) $ and $ P_2(x_2, y_2) $, the distance $ d $ between them is calculated by using the Pythagorean theorem, which states that in a right-angled triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides. For the two points in a two-dimensional space, this translates to the formula: $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $ This formula is derived from the coordinates of the points and represents the length of the segment connecting the two points (the hypotenuse of a right triangle formed by the horizontal and vertical distances between the points).

How to Find the Distance between Two Points?

Finding the distance between two points is a fundamental concept in geometry, especially in coordinate geometry where these points are placed on a Cartesian plane. The process involves using the Distance Formula, which is derived from the Pythagorean theorem. Here's how it's done:

Step 1: Identify Coordinates of Two Points

Firstly, determine the coordinates of the two points between which you want to find the distance. Let's call the first point $ P_1 $ with coordinates $ (x_1, y_1) $, and the second point $ P_2 $ with coordinates $ (x_2, y_2) $.

Step 2: Apply the Distance Formula

With your two points defined, use the Distance Formula:

$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $

Step 3: Calculate the Differences in Coordinates

Subtract the x-coordinate of $ P_1 $ from the x-coordinate of $ P_2 $ to find the horizontal difference, and do the same for the y-coordinates to find the vertical difference:

  • Horizontal difference: $ x_2 - x_1 $
  • Vertical difference: $ y_2 - y_1 $

Step 4: Square the Differences

Square both differences to eliminate any negative values, which would not make sense in the context of distance (which is always positive or zero):

$(x_2 - x_1)^2 $ $(y_2 - y_1)^2 $

Step 5: Sum Squared Differences and Take Square Root

Add the squared differences together and take the square root of the sum to find the distance $ d $:

$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $

Step 6: Interpret the Result

The result $ d $ is the straight-line distance (also known as Euclidean distance) between the two points in the Cartesian plane.

Example

Suppose you have two points $ A(1, 3) $ and $ B(4, 7) $, and you want to find the distance between them.

  1. Identify the coordinates: $ P_1(x_1, y_1) = A(1, 3) $ $ P_2(x_2, y_2) = B(4, 7) $

  2. Apply the formula: $ d = \sqrt{(4 - 1)^2 + (7 - 3)^2} $

  3. Calculate the differences and substitute: $ d = \sqrt{3^2 + 4^2} $

  4. Perform the calculations: $ d = \sqrt{9 + 16} $ $ d = \sqrt{25} $ $ d = 5 $

So, the distance between points $ A $ and $ B $ is 5 units.

This method can be extended to find distances in three dimensions as well, where you would also include the difference in the z-coordinates and adjust the Distance Formula accordingly:

$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} $

for points with coordinates $ (x_1, y_1, z_1) $ and $ (x_2, y_2, z_2) $.

Distance between Parallel Lines.

The distance between two parallel lines in a plane is constant throughout. To find the distance between two parallel lines, you can use the formula derived from the equation of a line in its standard form or the point-slope form.

Standard Form Equation of a Line

For lines in the form $ Ax + By + C = 0 $, the distance between two parallel lines $ L_1: Ax + By + C_1 = 0 $ and $ L_2: Ax + By + C_2 = 0 $ can be calculated as follows:

$\text{Distance} = \frac{|C_2 - C_1|}{\sqrt{A^2 + B^2}} $

Point-Slope Form Equation of a Line

For lines with equations based on the point-slope form, $ y - y_1 = m(x - x_1) $, where $ m $ is the slope and $ (x_1, y_1) $ is a point on the line, the distance formula is not directly applicable. We must first convert it to the standard form.

Steps to Find Distance Between Parallel Lines

  1. Ensure the equations of both lines are in standard form, $ Ax + By + C = 0 $. If not, rearrange the equations to this form.
  2. Make sure the lines are parallel, which means they have the same $ A $ and $ B $ coefficients in their equations. The slopes of the lines must be equal, and the $ A $ and $ B $ coefficients are related to the slope ($ -A/B $).
  3. Use the coefficients from the standard form along with the constants of each line to plug into the distance formula for parallel lines.

Example

Consider two parallel lines:

$ L_1: 3x + 4y - 5 = 0 $ $ L_2: 3x + 4y + 8 = 0 $

The distance between $ L_1 $ and $ L_2 $ can be calculated as follows:

$\text{Distance} = \frac{|8 - (-5)|}{\sqrt{3^2 + 4^2}} = \frac{|13|}{\sqrt{9 + 16}} = \frac{13}{\sqrt{25}} = \frac{13}{5} = 2.6 $

So, the distance between the two parallel lines $ L_1 $ and $ L_2 $ is 2.6 units.

The method to find the distance between parallel lines is straightforward as long as their equations are known and they are in the correct form. Since the distance is the same at any point along the parallel lines, it does not matter which specific points you consider on the lines when using this approach.

Solved Example Problems and step by step solution about Distance Formula.

Here are three example problems involving the distance formula, with step-by-step solutions.

Example 1: Distance Between Two Points

Problem: Find the distance between the points $ A(-1, 2) $ and $ B(3, -4) $.

Solution: Use the Distance Formula:

$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $

  1. Identify coordinates $ A(-1, 2) $ as $ (x_1, y_1) $ and $ B(3, -4) $ as $ (x_2, y_2) $.
  2. Substitute the coordinates into the formula:

$d = \sqrt{(3 - (-1))^2 + (-4 - 2)^2} $

  1. Calculate the differences:

$d = \sqrt{(3 + 1)^2 + (-6)^2} $ $d = \sqrt{4^2 + (-6)^2} $

  1. Square the differences:

$d = \sqrt{16 + 36} $ $d = \sqrt{52} $

  1. Simplify the square root (if necessary, you can leave the answer in radical form or approximate it using a calculator):

$d = \sqrt{4 \cdot 13} $ $d = 2\sqrt{13} $ $d \approx 7.211 $

Answer: The distance between points $ A $ and $ B $ is $ 2\sqrt{13} $ or approximately 7.211 units.

Example 2: Distance From a Point to the Origin

Problem: Calculate the distance from the point $ C(4, -3) $ to the origin $ O(0, 0) $.

Solution: Apply the Distance Formula where one point is the origin:

$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $

  1. Identify coordinates $ C(4, -3) $ as $ (x_2, y_2) $ and the origin $ O(0, 0) $ as $ (x_1, y_1) $.
  2. Substitute the coordinates into the formula:

$d = \sqrt{(4 - 0)^2 + (-3 - 0)^2} $

  1. Calculate the differences:

$d = \sqrt{4^2 + (-3)^2} $

  1. Square the differences:

$d = \sqrt{16 + 9} $ $d = \sqrt{25} $

  1. Simplify the square root:

$d = 5 $

Answer: The distance from point $ C $ to the origin $ O $ is 5 units.

Example 3: Distance Between Points on a Vertical Line

Problem: Find the distance between the points $ D(2, 5) $ and $ E(2, -1) $ that lie on a vertical line.

Solution: Using the Distance Formula is not necessary since the points are on a vertical line; the distance is the difference in the y-coordinates. However, we'll use the Distance Formula for consistency:

$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $

  1. Identify coordinates $ D(2, 5) $ as $ (x_1, y_1) $ and $ E(2, -1) $ as $ (x_2, y_2) $.
  2. Substitute the coordinates:

$d = \sqrt{(2 - 2)^2 + (-1 - 5)^2} $

  1. Calculate the differences:

$d = \sqrt{0^2 + (-6)^2} $

  1. Square the differences:

$d = \sqrt{0 + 36} $ $d = \sqrt{36} $

  1. Simplify the square root:

$d = 6 $

Answer: The distance between points $ D $ and $ E $ is 6 units.

These examples demonstrate how the Distance Formula is used to calculate the straight-line distance between two points in a coordinate plane, considering both horizontal and vertical separations.

Practice problems and method hints about Distance Formula.

Here are a few practice problems involving the distance formula, along with hints on which method to use:

Practice Problem 1:

Find the distance between the points $ P(8, -2) $ and $ Q(-4, 6) $.

Hint: Use the distance formula to calculate the distance between these two points. Since the points have both x and y coordinates, the standard distance formula will give you the exact length of the line segment connecting the two points.

Practice Problem 2:

A rectangle has opposite corners at $ A(-3, 4) $ and $ C(5, -6) $. What is the length of the diagonal $ AC $?

Hint: The diagonal of a rectangle forms a line segment between two opposite corners. Apply the distance formula using the coordinates of points $ A $ and $ C $ to find the length of the diagonal.

Practice Problem 3:

If point $ A $ is at $ (2, 1) $ and point $ B $ is at $ (2, y) $, and the distance between $ A $ and $ B $ is 5 units, find the value of $ y $.

Hint: Given that the x-coordinates of both points are the same, you're working with a vertical line. You can still utilize the distance formula with $ x_1 = x_2 $, which simplifies to using the difference in y-coordinates. Solve for $ y $ after setting the distance to 5 units.

Practice Problem 4:

Determine the distance between the origin $ O(0, 0) $ and the point $ R(7, -24) $.

Hint: When one point is the origin, the distance formula simplifies to finding the magnitude of the position vector of the other point. Effectively, you're finding the hypotenuse of a right triangle with sides equal to the x and y coordinates of point $ R $.

Practice Problem 5:

Calculate the distance between two points that lie on the horizontal line $ y = 3 $, where the x-coordinates of these points are $ 9 $ and $ -4 $, respectively.

Hint: For points with the same y-coordinate, the distance between them is the absolute difference of their x-coordinates. Although you can apply the distance formula, the calculation simplifies because $ y_1 = y_2 $.

Practice Problem 6:

What is the distance from the point $ T(-10, 15) $ to the point $ U(-10, y) $ if the distance between them is known to be 17 units?

Hint: Since both points share the same x-coordinate, the line segment joining them is vertical. Use the distance formula, set the distance to 17 units, and solve for $ y $.

When solving these problems, don't forget to square the differences of the coordinates, sum these squares, and then take the square root of this sum to get the distance. This process stems directly from the Pythagorean theorem, where you are effectively finding the hypotenuse of a right triangle formed by the difference in the x and y coordinates as the legs of the triangle.

Frequently Asked Questions and Answers about Distance Formula.

What is the Distance Formula?

Answer: The distance formula is used to calculate the straight-line distance between two points in a coordinate plane. It is $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $, derived from the Pythagorean theorem applied to the coordinates of the points.

When should I use the Distance Formula?

Answer: Use the distance formula whenever you need to find the precise distance between two points on a Cartesian plane. This could be in geometry, when determining the length of the side of a polygon, or in real-world applications like finding the distance between two locations on a map.

How do I find the distance between two points on the same horizontal or vertical line?

Answer: For points on the same horizontal line ($ y $-coordinate is the same), the distance is simply the absolute difference between their $ x $-coordinates. For points on the same vertical line ($ x $-coordinate is the same), it is the absolute difference between their $ y $-coordinates. While you can still use the distance formula, the calculation simplifies because one set of coordinates will cancel out.

Can the Distance Formula be used in three dimensions?

Answer: Yes, the distance formula can be extended to three dimensions to find the distance between points $ P(x_1, y_1, z_1) $ and $ Q(x_2, y_2, z_2) $ using the 3D distance formula: $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} $.

What is the difference between the Distance Formula and the Midpoint Formula?

Answer: The distance formula calculates the length of the line segment between two points, whereas the midpoint formula finds the point that is exactly halfway between them. The midpoint formula is $\left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right) $.

How is the Distance Formula derived from the Pythagorean Theorem?

Answer: The distance formula is derived by creating a right triangle from two points on a plane, using the $ x $ and $ y $ differences as the legs. The Pythagorean theorem states that the square of the hypotenuse (the distance between the points) is equal to the sum of the squares of the legs. The distance formula is essentially the Pythagorean theorem solved for the hypotenuse.

What if the Distance Formula gives me a negative number under the square root?

Answer: The distance formula will never give a negative number under the square root because the differences are squared, ensuring all values inside the square root are non-negative. If you believe you've encountered a negative value, recheck your calculations for errors.

Can the Distance Formula only be used for points with integer coordinates?

Answer: No, the distance formula can be used for any pair of points, whether their coordinates are integers, fractions, irrational numbers, or real numbers in any form.

Is it possible for the Distance Formula to give an irrational number as an answer?

Answer: Yes, it is quite common for the distance between two points to be an irrational number, which occurs when the sum under the square root is not a perfect square.

These are some of the common questions asked about the distance formula, which is a versatile tool for calculating distances in various branches of mathematics and beyond.