Distance Formula - Derivation, Examples | All Distance Formulas in Maths (2024)

Any distance formula, as its name suggests, gives the distance (the length of the line segment). For example, the distance between two points is the length of the line segment connecting them. We use the Pythagoras theorem to derive the formula for distance between two points in a two-dimensional plane which can be extended to find the distance between two points in a three-dimensional plane as well. There are different types of distance formulas in coordinate geometry.

  • Distance between two points in a 2D plane
  • Distance between two points in a 3D plane
  • Distance from a point to a line in 2D
  • Distance between two parallel lines in 2D
  • Distance from a point to a line in 3D
  • Shortest distance between two skew lines
  • Distance from a point to a plane
  • Distance between two parallel planes

Let us learn all these distance formulas in detail along with a few solved examples and practice questions.

1.What is Distance Formula?
2.Formula For Distance Between Two Points
3.Distance From a Point To a Line
4.Formula for Distance Between Two Lines
5.Distance From a Point To a Plane
6.Formula for Distance Between Two Parallel Planes
7.Applications of Distance Formula
8.FAQs on Distance Formula

What is Distance Formula?

We have a list of distance formulas in coordinate geometry that can be used to find the distance between two points, distance between a point to a line, the distance between two parallel lines, the distance between two parallel planes, etc. All the distance formulas are listed below and we will study each formula separately in the upcoming sections.

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (1)

Distance Formula to Calculate Distance Between Two Points

We will see the distance between two points in a two-dimensional plane and a three-dimensional space. Both distance formulas are derived by using the Pythagoras theorem.

Distance Between Two Points in 2D

The distance formula which is used to find the distance between two points in a two-dimensional plane is also known as the Euclidean distance formula. To derive the formula, let us consider two points in 2D plane A\((x_1, y_1)\), and B\((x_2, y_2)\). Assume that 'd' is the distance between A and B. Then the distance formula is d = √[(x\(_2\) – x\(_1\))2 + (y\(_2\) – y\(_1\))2].

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (2)

Derivation of Distance Formula

From the above figure:

  • AC = \(x_2-x_1\)
  • BC = \(y_2-y_1\)

By the Pythagoras theorem,

AB2 = AC2 + BC2

d2 = (x\(_2\) – x\(_1\))2 + (y\(_2\) – y\(_1\))2

Taking the square root on both sides,

d = √[(x\(_2\) – x\(_1\))2 + (y\(_2\) – y\(_1\))2]

This is called the distance between two points formula.

Distance Between Two Points in 3D

To find the distance formula for 2 points in 3-D plane, let us consider two points in a three-dimensional plane A\((x_1, y_1, z_1)\), and B\((x_2, y_2, y_3)\). Let 'd' is the distance between A and B. By applying the same logic (as explained in the previous section) of finding distance between two points in 2D, the distance between two points in 3D is,

d = √[(x\(_2\) – x\(_1\))2 + (y\(_2\) – y\(_1\))2 + (z\(_2\) – z\(_1\))2]

Distance From a Point To a Line

In this section, we will see the distance formula for the distance from a point to a line in 2D and 3D. Note that these two formulas do not look similar.

Distance From a Point To a Line in 2D

The distance formula to calculate the distance from a point to a line is the length of the perpendicular line segment that is drawn from the point to the line. Let us consider a line L in a two-dimensional plane with the equation ax + by + c =0 and consider a point P\((x_1,y_1)\). Then the distance (d) from P to L is,

d = \(\dfrac{\left|a x_{1}+b y_{1}+c\right|}{\sqrt{a^{2}+b^{2}}}\)

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (3)

If you want to know how this formula is derived, click here.

Distance From a Point To a Line in 3D

To find distance formula to calculate the distance from a point to a line in 3D, consider a point P \((x_0, y_0, z_0)\) and a line (L) in 3D whose equation is \(\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{z-z_1}{c}\). Then the distance (d) from the point P to L is,

\(d=\dfrac{| \overline{PQ} \times \bar{s} |}{|\bar{s}|}\), where

  • P = \((x_0, y_0, z_0)\) is the given point from which we are finding the distance to the line L
  • Q = \((x_1,y_1,z_1)\) is a point on the line (which is from the equation of the line)
  • \(\overline{PQ} = (x_1-x_0, y_1-y_0, z_1-z_0)\)
  • \(\bar{s}\) = <a, b, c> is the direction vector of the line
  • \(\overline{PQ} \times \bar{s}\) is the cross product of \(\overline{PQ}\) and \(\bar{s}\).

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (4)

Distance Between Two Lines

Distance Between Two Parallel Lines in 2D

We know that the slopes of two parallel lines are always the same. So we can assume the two parallel lines to be L\(_1\): ax + by + c\(_1\) = 0 and L\(_2\): ax + by + c\(_2\) = 0. Then the distance formula (d) between the parallel linesL\(_1\) and L\(_2\) is:

d = \(\dfrac{\left|c_2-c_1\right|}{\sqrt{a^{2}+b^{2}}}\)

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (5)

If you want to know how to derive this formula, click here.

Shortest Distance Between Two Skew Lines in 3D

Two lines in three-dimensional space are said to be skew lines if they are non-parallel and non-intersecting. The distance formula to calculate the shortest distance between them can be found using one of the following formulas depending on whether they are given in cartesian form or in vector form.

  • The distance between two lines given in cartesian form L\(_1\): \(\dfrac{x-x_1}{a_1}=\dfrac{y-y_1}{b_1}=\dfrac{z-z_1}{c_1}\) and L\(_2\): \(\dfrac{x-x_2}{a_2}=\dfrac{y-y_2}{b_2}=\dfrac{z-z_2}{c_2}\) is:
    \(d = \left| \dfrac{\begin{vmatrix} x_2 – x_1 & y_2 – y_1 & z_2 – z_1\\ a_1 & b_1 & c_1\\ a_2 & b_2 & c_2 \end{vmatrix} }{ {[(b_1c_2 – b_2c_1)^2 + ( c_1a_2 – a_2c_1)^2 + (a_1b_2– b_2a_1)^2}]^{1/2}}\right|\)
  • The distance between two lines given in vector form L\(_1\):\( \overrightarrow{r_1} = \overrightarrow{a_1} + t \overrightarrow{b_1} \) and L\(_2\): \(\overrightarrow{r_2} = \overrightarrow{a_2} + t \overrightarrow{b_2}\) is,
    \(d = \dfrac{ \left|(\overrightarrow{a_2} - \overrightarrow{a_1}).(\overrightarrow{b_1}\times \overrightarrow{b_2})\right|}{|\overrightarrow{b_1}\times \overrightarrow{b_2}|}\)

Distance From a Point To a Plane

The distance from a point to a plane formula resembles the distance formula to find the distance from a point to a line (which is discussed in one of the previous sections). The distance (D) from a point \((x_1,y_1,z_1)\) to a plane ax + by + cz + d = 0 is given by:

D = \(\dfrac{\left|a x_{1}+b y_{1}+cz_1+d\right|}{\sqrt{a^{2}+b^{2}+c^2}}\)

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (6)

Distance Between Two Parallel Planes

The distance between two parallel lines formula resembles the distance between two parallel lines formula. We know that the normal vectors of two parallel planes are either equal or in proportion. Thus, to find the distance formula between two parallel planes, we can consider the equations of two parallel planes to be ax + by + cz + d\(_1\) = 0 and ax + by + cz + d\(_2\) = 0. Then the distance (d) between two parallel planes is,

d = \(\dfrac{\left|d_2-d_1\right|}{\sqrt{a^{2}+b^{2}+c^2}}\)

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (7)

Applications of Distance Formula

The distance formula has numerous applications in other areas of mathematics and also in many real-life situations. Some of the uses of the distance formula are as follows.

  • The distance of any point from the origin can be calculated using the distance formula.
  • The complex number is represented in the arg-and plane, and the formula to find the magnitude of a complex number has been derived from the distance formula.
  • The distance formula can also be used to find the distance between two points in three-dimensional and also in n-dimensional planes.
  • The distance formula can be used to derive the magnitude formula, to find the magnitude of a vector.
  • The distance between two points in a sea can be found by identifying the geographic coordinates of the two points and then applying the distance formula.
  • The distance between two cities for the purpose of travel by air is the shortest distance and is calculated using the distance formula.

Important Points on Distance Formula:

The following are the important points related to the distance formula.

  1. The distance calculated through the distance formula always takes a positive sign.
  2. The distance calculated is the shortest linear distance between the two points.
  3. The distance formula gives the same answer for the points located in any of the four quadrants.

Related Topics:

  • Distance Between Two Points Calculator
  • x and y axis
  • Coordinate Geometry
  • Coordinate Plane

Distance Formula Examples

  1. Example 1: Find the distance between the points (-2, 3), and (5, 6).

    Solution:

    The given two points are \((x_1, y_1)\) = (-2, 3), and \((x_2, y_2)\) = (5, 6)

    Using the Euclidean distance formula,

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

    = \(\sqrt{(5 + 2)^2 + (6 - 3)^2}\)

    = \(\sqrt{7^2 + 3^2}\)

    = \(\sqrt{49 + 9}\)

    = \(\sqrt{58}\)

    Answer: Therefore the distance between the points is \(\sqrt{58}\).

  2. Example 2: Find the distance from the point (3, -5) to the line 3x - 4y = 5.

    Solution:

    The given point is, \((x_1,y_1)\) = (3, -5).

    The given line can be written as 3x - 4y - 5 = 0. Comparing this with ax + by + c = 0, we get a = 3, b = -4, and c = -5.

    Using one of the distance formulas:

    d = \(\dfrac{\left|a x_{1}+b y_{1}+c\right|}{\sqrt{a^{2}+b^{2}}}\)

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

    d = 24 / 5.

    Answer: The distance from the given point to the given line = 24 / 5 units.

  3. Example 3: Find the distance from the point (-1, 2, 5) to the line \(\dfrac{x-2}{1}=\dfrac{y+1}{2}=\dfrac{z- 3}{3}\) and round your answer to the nearest hundredths.

    Solution:

    The given point is P \((x_0, y_0, z_0)\) = (-1, 2, 5).

    Comparing the given line with \(\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{z-z_1}{c}\), we get:

    Q = \((x_1,y_1,z_1)\) = (2, -1, 3).

    \(\bar{s}\) = <1, 2, 3>.

    Then \(\overline{PQ} = (x_1-x_0, y_1-y_0, z_1-z_0)\) = (2+1, -1-2, 3-5) = (3, -3, -2).

    Now we will find the cross-product.

    \(\overline{PQ} \times \bar{s}\) = \(\left|\begin{array}{rrr}

    \mathrm{i} & \mathrm{j} & \mathrm{k} \\

    3 & -3 & -2 \\

    1 & 2 & 3

    \end{array}\right|\)

    = < (-9 + 4), 9 + 2, (6 + 3)>

    = <-5, 11, 9>

    Its magnitude is,

    \(| \overline{PQ} \times \bar{s} |\) = \(\sqrt{(-5)^2+11^2+9^2}\) = \(\sqrt{227}\)

    Also, \(|\bar{s}|\) = \(\sqrt{1^2+2^2+3^2}\) = \(\sqrt{14}\)

    Using the distance formula to find the distance from a point to a line,

    \(d=\dfrac{| \overline{PQ} \times \bar{s} |}{|\bar{s}|}\)

    \(d = \dfrac{\sqrt{227}}{\sqrt{14}}\) ≈ 4.03

    Answer: The distance from the given point to the given line = 4.03 units.

View More >

go to slidego to slidego to slide

Distance Formula - Derivation, Examples | All Distance Formulas in Maths (8)

Great learning in high school using simple cues

Indulging in rote learning, you are likely to forget concepts. With Cuemath, you will learn visually and be surprised by the outcomes.

Book a Free Trial Class

Practice Questions on Distance Formula

Check Answer >

go to slidego to slide

FAQs on Distance Formula

What is the Distance Formula in Coordinate Geometry?

The distance formula in coordinate geometry is used to calculate the distance between two given points. The distance formula to calculate the distance between two points \((x_1, y_1)\), and \((x_2, y_2)\) is given as, \(D = \sqrt{(x_2 -x_1)^2 + (y_2-y_1)^2}\).

What is 2D Distance Formula?

The 2D distance formula gives the shortest distance between two points in a two-dimensional plane. The formula says the distance between two points \((x_1, y_1)\), and \((x_2, y_2)\) is \(D = \sqrt{(x_2 -x_1)^2 + (y_2-y_1)^2}\).

What are Different Distance Formulas in Maths?

We have different distance formulas in maths which are as follows:

  • Distance between two points formula in 2D: \(D = \sqrt{(x_2 -x_1)^2 + (y_2-y_1)^2}\).
  • Distance between two points formula in 3D: \(D=\sqrt{(x_2 - x_1)^2 + (y_2 -y_1)^2 + (z_2 - z_1)^2}\).
  • Distance from a point to a line formula in 2D: D = \(\dfrac{\left|a x_{1}+b y_{1}+c\right|}{\sqrt{a^{2}+b^{2}}}\)
  • Distance from a point to a line formula in 3D: \(D=\dfrac{| \overline{PQ} \times \bar{s} |}{|\bar{s}|}\)
  • Distance between two parallel lines formula in 2D: D = \(\dfrac{\left|c_2-c_1\right|}{\sqrt{a^{2}+b^{2}}}\)
  • Shortest distance formula between two skew lines: \(D = \left| \dfrac{\begin{vmatrix} x_2 – x_1 & y_2 – y_1 & z_2 – z_1\\ a_1 & b_1 & c_1\\ a_2 & b_2 & c_2 \end{vmatrix} }{ {[(b_1c_2 – b_2c_1)^2 + ( c_1a_2 – a_2c_1)^2 + (a_1b_2– b_2a_1)^2}]^{1/2}}\right|\)
  • Distance from a point to a plane formula: D = \(\dfrac{\left|a x_{1}+b y_{1}+cz_1+d\right|}{\sqrt{a^{2}+b^{2}+c^2}}\)
  • Distance between two parallel planes formula: D = \(\dfrac{\left|d_2-d_1\right|}{\sqrt{a^{2}+b^{2}+c^2}}\)

What is Manhattan Distance Formula?

The distance between two points measured along the right angular axis is called the manhattan distance. The manhattan distance formula between the points \((x_1, y_1)\), and \((x_2, y_2)\) is |\(x_2 - x_1\)| + |\(y_2 - y_1\)|.

What is 3D Distance Formula?

The distance formula is three-dimensional geometry is similar to the distance between two points in two-dimensional geometry. The distance between two points \((x_1, y_1, z_1)\), and \((x_2, y_2, z_2)\) in a three dimensional space is equal to \(\sqrt{(x_2 - x_1)^2 + (y_2 -y_1)^2 + (z_2 - z_1)^2}\).

How to Derive Distance Formula?

The distance formula can be derived using the Pythagoras theorem. The distance between two points \((x_1, y_1)\) and \((x_2, y_2)\) is calculated by first finding the distance between the x coordinates of the points, \(x_1\) and \(x_2\) which represents the base of the right triangle, then finding the distance between the y coordinates of the points \(y_1\) and \(y_2\) which represents the altitude, and the distance between these two given points represents the hypotenuse of the right triangle. Finally, applying the Pythagoras formula we get

Hypotenuse2 = Base2 + Altitude2

Distance2 = \((x_2 - x_1)^2 + (y_2 - y_1)^2 \)

Taking square root on both sides,

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

What is Distance Formula To Find Distance From a Point To a Line?

The distance from a point to a line is nothing but the length of the perpendicular drawn from the point to the line. The distance from a point \((x_1,y_1)\) to the line ax + by + c =0 is, d = \(\dfrac{\left|a x_{1}+b y_{1}+c\right|}{\sqrt{a^{2}+b^{2}}}\).

How is the Pythagorean Theorem Related to the Distance Formula?

Pythagorean formula is used to find the derivation of the distance formula. The distance between two points \((x_1, y_1)\) and \((x_2, y_2)\) is calculated by, Distance2 = \((x_2 - x_1)^2 + (y_2 - y_1)^2 \), or, Distance = \(\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\), where, \((x_1, y_1)\) and \((x_2, y_2)\) are two vertices of a right angled triangle that form its hypotenuse when joined.

What is Distance Formula To Find Distance Between Two Parallel Planes?

Two parallel planes are of the form ax + by + cx + d\(_1\) = 0 and ax + by + cx + d\(_2\) = 0. The distance formula to find the distance (d) between these two parallel lines is d = \(\dfrac{\left|d_2-d_1\right|}{\sqrt{a^{2}+b^{2}+c^2}}\).

What is Distance Formula To Find Distance From a Point To a Line in 3D?

The distance formula to find the distance from a point P \((x_0, y_0, z_0)\) to a line \(\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{z-z_1}{c}\) is \(d=\dfrac{| \overline{PQ} \times \bar{s} |}{|\bar{s}|}\), where

  • Q = \((x_1,y_1,z_1)\)
  • \(\bar{s}\) = <a, b, c>
Distance Formula - Derivation, Examples | All Distance Formulas in Maths (2024)

FAQs

Distance Formula - Derivation, Examples | All Distance Formulas in Maths? ›

The formula for distance is the square root of the difference of the two x-values squared plus the difference of the two y-values squared. If there is a need for the three-dimensional plane, then the formula would add an additional sum of the difference of the two z-values squared.

How do you derive the distance formula? ›

The formula for distance is the square root of the difference of the two x-values squared plus the difference of the two y-values squared. If there is a need for the three-dimensional plane, then the formula would add an additional sum of the difference of the two z-values squared.

What are the three formulas of distance? ›

Most distance problems can be solved with the equations d = savg × t where d is distance, savg is average speed, and t is time, or using d = √((x2 - x1)2 + (y2 - y1)2), where (x1, y1) and (x2, y2) are the x and y coordinates of two points.

What is the formula for total distance in maths? ›

You calculate distance traveled by using the formula d=rt. You will need to know the rate at which you are traveling and the total time you traveled. You can then multiply these two numbers together to determine the distance traveled.

How do you derive an expression for the distance? ›

S=ut+12at2 . where S is the distance covered bu a body in time t, having initial velocity u and acceleration a.

What is the derivative of distance? ›

The derivative of distance with respect to time is velocity.

What is the famous distance formula? ›

In two- and three-dimensional Euclidean space, the distance formulas for points in rectangular coordinates are based on the Pythagorean theorem. The distance between the points (a,b) and (c,d) is given by Square root of√(a − c)2 + (b − d)2.

What are the 3 types of distance? ›

The four types of distance metrics are Euclidean Distance, Manhattan Distance, Minkowski Distance, and Hamming Distance.

What is the distance formula in calculus? ›

Learn how to find the distance between two points by using the distance formula, which is an application of the Pythagorean theorem. We can rewrite the Pythagorean theorem as d=√((x_2-x_1)²+(y_2-y_1)²) to find the distance between any two points.

What is the distance full formula? ›

The distance formula to calculate the distance between two points (x1,y1) ( x 1 , y 1 ) , and (x2,y2) ( x 2 , y 2 ) is given as, D=√(x2−x1)2+(y2−y1)2 D = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 .

What is the formula for calculating far? ›

Floor area ratio (FAR) is the measurement of a building's floor area in relation to the size of the lot/parcel that the building is located on. FAR is expressed as a decimal number, and is derived by dividing the total area of the building by the total area of the parcel (building area ÷ lot area).

What is the distance formula used for in math? ›

The distance formula, in coordinate geometry or Euclidean geometry, is used to find the distance between the two points in an XY plane. The distance of a point from the y-axis is called its x-coordinate, or abscissa.

How is distance derived? ›

Distance can be calculated using the formula derived from Pythagoras theorem. In coordinate geometry, the distance formula is √[(x2 – x1)^2 + (y2 – y1)^2].

What is the distance formula origin? ›

As a special case of the distance formula, suppose we want to know the distance of a point (x,y) to the origin. According to the distance formula, this is √(x−0)2+(y−0)2=√x2+y2.

How was the distance formula created? ›

Derived from the Pythagorean Theorem, the distance formula is used to find the distance between two points in the plane. The Pythagorean Theorem, a2+b2=c2 a 2 + b 2 = c 2 , is based on a right triangle where a and b are the lengths of the legs adjacent to the right angle, and c is the length of the hypotenuse.

What is the source of the distance formula? ›

In two- and three-dimensional Euclidean space, the distance formulas for points in rectangular coordinates are based on the Pythagorean theorem. The distance between the points (a,b) and (c,d) is given by Square root of√(a − c)2 + (b − d)2.

Top Articles
Authentic Scottish Porridge Recipe
Joanna Gaines Crew's Cookie Recipe - Into the Cookie Jar
Gasbuddy Joliet
Msc Open House Fall 2023
Harry Potter Magic Awakened best cards tier list – July 2023
80 For Brady Showtimes Near Cinemark At Harlingen
Costco Fuel Price Today Near Me
Walmart Front Door Wreaths
Craigslist Worcester Massachusetts: Your Guide to the City's Premier Marketplace - First Republic Craigslist
Msu Ro
Best Conjuration Spell In Skyrim
Dd Codeshare
How Nora Fatehi Became A Dancing Sensation In Bollywood 
6023445010
Myzmanim Edison Nj
803 Castroville Road, San Antonio, TX 78237
Haverhill, MA Obituaries | Driscoll Funeral Home and Cremation Service
Mo Money Login
Nascar Espn Schedule
Corporate Clash Group Tracker
Trizzle Aarp
Mynorthwoodtech
Craigslist Quad Cities
Sufficient Velocity Quests
Experience the Convenience of Po Box 790010 St Louis Mo
Alvin Isd Ixl
Accuweather Mold Count
Pole Barns 101: Everything You Need to Know - Big Buildings Direct
What Does FYP Mean on TikTok?
Fortnite Fap Hero
Dayinew
Watch ESPN - Stream Live Sports & ESPN Originals
Andhrajyoti
Fedex Passport Locations Near Me
Roblox Roguelike
Journal articles: 'New York (State). First Congregational Church' – Grafiati
Stark Cjis Court Docket
Lagniappemobile
Rockin That Orange Jumpsuit Columbia County
Sam's Club Hiring Near Me
[PDF] Canada - Free Download PDF
Personapay/Glens Falls Hospital
Extraordinary Life: He Was A Feminist, Concerned With Power And Privilege
Computer Repair Arboretum North Carolina
Ava Kayla And Scarlet - Mean Bitches Humiliate A Beta
Dollar General Penny List July 18 2023
Sharon Sagona Obituary
El Pulpo Auto Parts Houston
Guy Ritchie's The Covenant Showtimes Near Century 16 Eastport Plaza
How Long Ago Was February 28 2023
Cb2 South Coast Plaza
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 6156

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.