Distance formula is based on the  'Pythagorean theorem'  where the hypotenuse of the triangle will give the distance between the two points.
To find the distance between the two points $(x_{1},y_{1})$ and $(x_{2},y_{2})$ of the ordered pairs use the following formula.

d = $\sqrt{({x_{2}-x_{1}})^{2}+({y_{2}-y_{1}})^{2}}$
Where, d : Distance between the two points.

Pythagorean Distance Formula

Pythagorean theorem states that "The distance of a point from the origin is equal to the square root of the sum of the squares of the coordinates." ($a^{2} + b^{2} = c^{2}$)

The pythagorean distance formula between the two points $(x_{1},y_{1})$ and $(x_{2},y_{2})$ is

d = $\sqrt{({x_{2}-x_{1}})^{2}+({y_{2}-y_{1}})^{2}}$
$\Rightarrow$ d = $\sqrt{Difference\ of\ x\ coordinates + Difference\ of\ y\ coordinates}$

This can be written as d = $\sqrt{\bigtriangleup x^{2}+\bigtriangleup y^{2}}$

($\because$   $\bigtriangleup x$ =  $x_{2} - x_{1}$  and  $\bigtriangleup y$ =  $y_{2} - y_{1}$

Solved Example

Question: Find the distance between the points (-5, 5) and (2, -9)
Solution:

Distance between x -coordinates : $\bigtriangleup$ x  =  2 - (-5) = 7
Distance between y -coordinates : $\bigtriangleup$ y =   -9 - 5 = -14
d =   $\sqrt{ 7^{2}+14^{2}}$

= $\sqrt{49 + 196}$

= $\sqrt{245}$

= 15.65

Polar Distance Formula

If ($r_{1}$, $\theta_{1}$) and ($r_{2}$, $\theta_{2}$) are the two points in polar coordinates then the distance between the two points is given by

D = $\sqrt{r_{1}^{2}+r_{2}^{2}-2r_{1}r_{2}cos(\theta_{1} - \theta_{2}})$
The above formula is found by using distance formula for rectangular coordinates and by taking x = r cos$\theta$ and y = r sin$\theta$.

Point Line Distance Formula

The distance from a point to a line is the shortest distance between point to a line in the euclidean geometry. The distance from a point to a straight line is the length of the perpendicular line segment from the line to the point.

Let equation of the given line is A$x_1$ + B$x_2$ + C. Then

d(L, r) = $\vec{|LM|}$

d(L, r) = $\frac{|A.l_{1}+ B .l_{2} + C| }{\sqrt{A^{2}+B^{2}}}$

Slope Distance Formula

Consider the two points ($x_{1}$, $y_{1}$) and ($x_{2}$, $y_{2}$) then the slope of the line passing through the points ($x_{1}$, $y_{1}$) and ($x_{2}$, $y_{2}$) is

Slope = m = $\frac{(y_{2}-y_{1})}{(x_{2}-x_{1})}$

Horizontal Distance Formula

If ($x_{1},y_{1}$) and ($x_{2},y_{2}$) are the two points considered in the x-y plane then the horizontal distance between them is

d = Difference in x -coordinates = (|$x_{2} - x_{1}$|).

Vertical Distance Formula

If ($x_{1},y_{1}$) and ($x_{2},y_{2}$) are the two points considered in the x-y plane then the vertical distance between them is

d = Difference in y -coordinates = (|$y_{2} - y_{1}$|).

Distance Formula Problems

Solved Examples

Question 1: Find the distance between the points (5, -8) and (3, 4)
Solution:

Distance between x -coordinates : $\bigtriangleup$ x  =  3 - (5) = -2
Distance between y -coordinates : $\bigtriangleup$ y =  4 - (-8) = 12
d =   $\sqrt{ 2^{2}+12^{2}}$
=  $\sqrt{4+ 144}$
= $\sqrt{148}$
= 12.16

Question 2: Find the distance from the point (2, 5) to the line y = $\frac{8}{7}$ x + 5.
Solution:

Express the given line in the standaard form
y = $\frac{8}{7}$ x + 5

7y = 8x + 35
$\Rightarrow$ 8x - 7y + 35 = 0

The formula to find the distance from a point to a line is
d(L,r) = $\frac{|A.l_{1}+ B .l_{2} + C| }{\sqrt{A^{2}+B^{2}}}$

d(L,r) = $\frac{|8.2 -7 .5 + 35| }{\sqrt{8^{2}+(-7)^{2}}}$

d(L,r) = $\frac{|16 -35 + 35| }{\sqrt{64+49}}$

= 1.5051

Distance Formula Word Problems

Solved Examples

Question 1: John was traveling from his house to his friend's house. Polar coordinate for john's house is (7, -45$^{0}$) and his friend's house is (-5, 70$^{0}$). Find the distance between the two houses using polar distance formula.
Solution:

The point (7, -45$^{0}$) will be plotted in fourth quadrant so it is equivalent to (7, 315). The second point
(-5, 70$^{0}$) would be (-5, 250) as the given second point will be in second quadrant.
Now using the formula of polar distance,

D = $\sqrt{r_{1}^{2}+r_{2}^{2}-2r_{1}r_{2}cos(\theta_{1} - \theta_{2}})$

Plugging the values we get
d = $\sqrt{(7)^{2} + (-5)^{2} - 2(7)(-5)cos(315-250)^{0}}$
d = $\sqrt{49 + 25 + 70(-0.5624)}$
d = 34.632

Question 2: What is the slope of the segment connecting the points (2, -9) and (5, 3). Find the slope distance between the given points.
Solution:

Let ($x_{1} , y_{1}$)  = (2, -9) and ($x_{2} , y_{2})$ = (5, 3)
Slope of the line passing through the given points is

Slope =  m  = $\frac{(y_{2}-y_{1})}{(x_{2}-x_{1})}$

m = $\frac{ 3+9}{5-2}$

m = $\frac{12}{3}$

m = 4