What is Distance Formula in Maths

The distance between two points is the length of the interval joining the two points. If the two points lie on the same horizontal or same vertical line, the distance can be found by subtracting the coordinates that are not the same.

In analytic geometry, distance formula used to find the distance measure between two lines, the sum of the lengths of all the sides of a polygon, perimeter of polygons on a coordinate plane, the area of polygons and many more. For example, we can find the lengths of sides of a triangle using the distance formula and determine whether the triangle is scalene, isosceles or equilateral.

Table of Contents:

How to Find the Distance Between Two Points

The distance between two points of the xy-plane can be found using the distance formula. An ordered pair (x, y) represents co-ordinate of the point, where x-coordinate (or abscissa) is the distance of the point from the centre and y-coordinate (or ordinate) is the distance of the point from the centre.

Formula to find Distance Between Two Points in 2d plane:

Consider two points A(x1,y1) and B(x2,y2) on the given coordinate axis. The distance between these points is given as:

Distance Formula Definition

Formula to find Distance Between Two Points in 3d plane:

Below formula used to find the distance between two points, Let P(x1, y1, z1) and Q(x2, y2, z2) are the two points in three dimensions plane.

So, PQ=(x2x1)2+(y2y1)2+(z2z1)2PQ=\sqrt{(x_2-x_1 )^2+(y_2-y_1 )^2+(z_2-z_1 )^2}

Distance Formula From Point To Line

Distance from a Point to a Line

Consider Ax + By + C = 0 be an equation of line and P be any point in the cartesian-coordinate plane having coordinates P(x1, y1).

The distance formula from a point to line is as given below:,

PQPQ =Ax1+By1+CA2+B2= \frac{\left | Ax_{1} + By_{1} + C \right |}{\sqrt{A^{2} + B^{2}}}

Distance between Two Parallel Lines

The distance between parallel lines is the shortest distance from any point on one of the lines to the other line.

Also defined as, The distance between two parallel lines = Perpendicular distance between them.

Consider two parallel lines, y = mx + c1 and y = mx + c2

Let d be the distance between both the lines.

Distance Between two Parallel Lines

Formula to find the shortest distance between two non-intersecting lines as given below:

d=C1  C2A2 + B2d=\frac{|C_1 ~- ~C_2|}{\sqrt{A^2~ +~ B^2}}

Distance between two points in polar co-ordinates

Let O be the pole and OX be the initial line. Let P and Q be two given points whose polar coordinates are (r1, θ1) and (r2, θ2) respectively. Then the distance formula between the points is given by,

PQ=r12+r222r1r2cos(θ1θ2)PQ=\sqrt{r_{1}^{2}+r_{2}^{2}-2{{r}_{1}}{{r}_{2}}\cos ({{\theta }_{1}}-{{\theta }_{2}})}

where θ1 and θ2 in radians.

Example Problems

Example 1: Find the distance between P (3, -4) and Q(-5, -1).

Solution:

Applying distance formula:

d=(x2x1)2+(y2y1)2d=\sqrt{\left(x_{2}-x_{1}\right)^{2}+\left(y_{2}-y_{1}\right)^{2}}

= (5(3))2+((1)(4))2\sqrt{\left(-5-(-3)\right)^{2}+\left((-1)-(-4)\right)^{2}}

= √(65 + 9)

= √73 or 8.54 (approx)

Example 2: Find the distance between the parallel lines -3x + 10y + 5 = 0 and -3x + 10y + 10 = 0.

Solution:

Comparing given equation with the general equation of parallel lines Ax + By + C1 = 0 and Ax + By + C2 = 0, we get

Here, A = -3, B = 10, C1 = 5 and C2 = 10.

Applying formula: d=C1  C2A2 + B2d=\frac{|C_1 ~- ~C_2|}{\sqrt{A^2~ +~ B^2}}

The required distance is, d = |10–5|/√(-3)^2+(10)^2 = 5/√109.

Example 3: Find the distance of line 2x + 3y – 13 = 0 from the point (1, –2).

Solution:

Given line is 2x + 3y – 13 = 0

Let d be the required distance.

Comparing given equation with the general equation of line Ax + By + C = 0, we get

A = 2, B = 3 and C = –13

We know, the formula to find the distance between a point and a line is

dd =Ax1+By1+CA2+B2= \frac{\left | Ax_{1} + By_{1} + C \right |}{\sqrt{A^{2} + B^{2}}}

Given point is (x1, y1) = (1, –2).

Therefore, d = |2(1) + 3(-2) + (-13)|/√(22+32) = 17/√13.

Example 4: Find the equations of the straight lines parallel to 5x – 12y + 26 = 0 and at a distance of 4 units from it.

Solution: Given lines is 5x – 12y + 26 = 0

Equations of any line parallel to given equation is 5x – 12y + m = 0

Distance between both the lines is 4 units (given)

Now,

|m-26|/√(25+144) = 4

=> ±\pm (m – 26) = 52

or m = -26, 78

Required equations of lines are: 5x – 12y – 26 = 0 and 5x – 12y + 78 = 0

Example 5: If the distance between the points (a, 2) and (3, 4) be 8, then find the value of a.

Solution:  (a3)2+(24)2=82(a3)2=60a3=±215a=3±215{{(a-3)}^{2}}+{{(2-4)}^{2}}={{8}^{2}}\,\,\\\Rightarrow \,\,{{(a-3)}^{2}}=60 \\\Rightarrow \,\,a-3=\pm \,2\sqrt{15}\,\,\\\Rightarrow \,\,a=3\,\,\pm \,2\sqrt{15}

Example 6:  The distance between the points (am12,2am1)(am_{1}^{2},\,2a{{m}_{1}}) and (am22,2am2)(am_{2}^{2},\,2a{{m}_{2}}) is ____.

Solution: s=(am12am22)2+(2am12am2)2=a(m1m2)(m1+m2)2+4s=\sqrt{{{(am_{1}^{2}-am_{2}^{2})}^{2}}+{{(2a{{m}_{1}}-2a{{m}_{2}})}^{2}}} \\=\,a\,({{m}_{1}}-{{m}_{2}})\,\,\sqrt{{{({{m}_{1}}+{{m}_{2}})}^{2}}+4}

Example 7: The distance of the middle point of the line joining the points (asinθ, 0)and (0, acosθ) from the origin is _______.

Solution: Mid-point will be (asinθ2,acosθ2)\left( \frac{a\,\sin \theta }{2},\,\frac{a\,\cos \theta }{2} \right) and distance from origin will be (asinθ20)2+(acosθ20)2=a2\sqrt{{{\left( \frac{a\,\sin \theta }{2}-0 \right)}^{2}}+{{\left( \frac{a\,\cos \theta }{2}-0 \right)}^{2}}}=\frac{a}{2}.

Related Video:

BOOK

Free Class