Everybody travels on a daily basis to some location, and throughout this travel, they cover a certain distance. Math can help us calculate the distance between two points. In this article, we will calculate the distance using the distance formula, and many more.
The length of a line connecting two points indicates the distance between the two points. If the two points are on a vertical or horizontal line, the distance can be determined by subtracting the non-identical coordinates.
The distance formula is used in analytic geometry to calculate the distance between two lines, the perimeter and area of polygons on a coordinate plane, and many other things. For example, we can use the distance formula to determine if a triangle is scalene, isosceles, or equilateral by determining the lengths of its sides.
The distance between `2` points `P_1` and `P_2` is represented as `|P_1P_2|`. The distance formula can be used to calculate the distance between two points. The distance formula depends on the dimension of the space where the two points are placed.
Distance between `2` points
For `2D: d= \sqrt{(x_1 - x_0)^2 + (y_1 - y_0)^2}`
For `3D: d= \sqrt{(x_1 - x_0)^2 + (y_1 - y_0)^2 + (z_1 - z_0)^2}`
For `4D: d= \sqrt{(x_1 - x_0)^2 + (y_1 - y_0)^2 + (z_1 - z_0)^2 + (a_1 - a_0)^2}`
For `nD: d= \sqrt{(x_1 - x_0)^2 + (y_1 - y_0)^2 + (z_1 - z_0)^2 + (a_1 - a_0)^2 + \ldots}`
Distance Formula
The distance between two points `(x_1,y_1)` and `(x_2,y_2)` is given by the formula:
`d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}`
The distance formula is derived from the Pythagorean Theorem.
Example: Find the distance between the points `(3,2)` and `(7,5)`?
Solution:
\(\begin{align*}
d &= \sqrt{(7 - 3)^2 + (5 - 2)^2} \\
&= \sqrt{4^2 + 3^2} \\
&= \sqrt{16 + 9} \\
&= \sqrt{25} \\
&= 5
\end{align*}\)
Consider two points on a `3D` plane, `A (x_1,y_1, z_1)` and `B(x_2,y_2, z_2)`. Below is the formula for calculating the distance between two points.
Example: Find the distance between the points `P(2, 3, 1)` and `Q(-3, 4,2)`.
Solution: Plugging into the distance formula:
\(\begin{align*}
d &= \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} \\
&= \sqrt{(-3 - 2)^2 + (4 - 3)^2 + (2 - 1)^2} \\
&= \sqrt{(-5)^2 + (1)^2 + (1)^2} \\
&= \sqrt{25 + 1 + 1} \\
&= \sqrt{27}\\ &\approx 5.2
\end{align*}\)
Consider two points on a `3D` plane, `P (x,y,z)` and `O (0,0,0)`. We can apply the distance formula as shown below:
Consider a point `P (x_0,y_0)` and a line `Ax + By + C = 0`. The formula for calculating the distance between the point and the line is as follows:
`d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}}`
Example: Find the distance of point `A(5, 2)` from the line `3x + 4y + 5 = 0`.
Solution: The distance of point `A(5, 2)` from the line `3x + 4y + 5 = 0` is
\(\begin{align*}
d &= \frac{\left|3 \times 5 + 4 \times 2 + 5\right|}{\sqrt{3^2 + 4^2}} \\
&= \frac{\left|15 + 8 + 5\right|}{\sqrt{9 + 16}} \\
&= \frac{28}{\sqrt{25}} \\
&= \frac{28}{5} \\
&= 5.6
\end{align*}\)
Example`1`: Calculate the distance between the following points:
Solution:
a. Let d be the distance between the two points `(-4, 5)` and `(5, 3)`.
\(\begin{aligned}
d &= \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \\
&= \sqrt{(5 - (-4))^2 + (3 - 5)^2} \\
&= \sqrt{(9)^2 + (-2)^2} \\
&= \sqrt{81 + 4} \\
&= \sqrt{85}\\&\approx 9.2
\end{aligned}\)
b. Let `d` be the distance between the two points `(3, 5, –1)` and `(0, 2, 5)`.
\(\begin{aligned}
d &= \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} \\
&= \sqrt{(0 - 3)^2 + (2 - 5)^2 + (5 - (-1))^2} \\
&= \sqrt{(-3)^2 + (-3)^2 + (6)^2} \\
&= \sqrt{9 + 9 + 36} \\
&= \sqrt{54} \\
&\approx 7.3
\end{aligned}\)
Example `2`: Calculate the distance between the `P(5,12)` and line `3x + 4y + 5 =0`.
Solution:
Let `d` be the distance between the point and the line.
\(\begin{aligned}
d &= \frac{\left|Ax_0 + By_0 + C\right|}{\sqrt{A^2 + B^2}} \\
&= \frac{\left|3 \times 5 + 4 \times 12 + 5\right|}{\sqrt{3^2 + 4^2}} \\
&= \frac{\left|15 + 48 + 5\right|}{\sqrt{9 + 16}} \\
&= \frac{68}{\sqrt{25}} \\
&= \frac{68}{5} \\
&= 13.6
\end{aligned}\)
Q`1`. What is the distance of the point `(4,3)` from the origin.
Answer: a
Q`2`. What is the distance of the line `12x + 5y + 9 = 0` from the origin.
Answer: b
Q`1`: What do you mean by distance in Maths?
Answer: The distance between two points is the length of the line segment joining the two given points.
Q`2`: Is distance a scalar quantity or a vector quantity?
Answer: Distance is a scalar quantity as it does not depend on the direction.
Q`3`: Can the distance between `2` points be negative?
Answer: No, the distance value is always positive.
Q`4`: How can we find the distance between two points `(x_1,y_1)` and `(x_2,y_2)`.
Answer: The distance between two points `(x_1,y_1)` and `(x_2,y_2)` can be calculated using the distance formula.
`d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}`
Plug in the value of the coordinates `x_1, y_1, x_2` and `y_2` in the distance formula to find `d`.
Q`5`: Where do we use distance formula in real life?
Answer: Distance formula has various applications in real life. It is used in navigation system to help pilots measure distance between their plane and other planes. Sailors also use distance formula while navigating their ships. Interior designers, architects, etc. use distance formula for finding length of buildings, home appliances, etc.