Euclidean Distance | Formula, Derivation & Solved Examples (2024)

Euclidean Distance is defined as the distance between two points in Euclidean space. To find the distance between two points, the length of the line segment that connects the two points should be measured.

In this article, we will explore what is Euclidean distance, the Euclidean distance formula, its Euclidean distance formula derivation, Euclidean distance examples, etc.

Euclidean Distance | Formula, Derivation & Solved Examples (1)

Euclidean Distance

Table of Content

  • What is Euclidean Distance?
  • Euclidean Distance Formula
    • Euclidean Distance in 3D
    • Euclidean Distance in nD
  • Euclidean Distance Formula Derivation
  • Euclidean Distance and Manhattan Distance
  • Solved Questions on Euclidean Distance
  • Practice Problems on Euclidean Distance

What is Euclidean Distance?

The measure which gives the distance between any two points in an n-dimensional plane is known as Euclidean Distance. Euclidean distance between two points in the Euclidean space is defined as the length of the line segment between two points.

Euclidean distance is like measuring the straightest and shortest path between two points. Imagine you have a string and you stretch it tight between two points on a map; the length of that string is the Euclidean distance. It tells you how far apart the two points are without any turns or bends, just like a bird would fly directly from one spot to another.

Euclidean Distance Formula

Consider two points (x1, y1) and (x2, y2) in a 2-dimensional space; the Euclidean Distance between them is given by using the formula:

d = √[(x2 – x1)2 + (y2 – y1)2]

Where,

  • d is Euclidean Distance
  • (x1, y1) is Coordinate of the first point
  • (x2, y2) is Coordinate of the second point

Euclidean Distance in 3D

If the two points (x1, y1, z1) and (x2, y2, z2) are in a 3-dimensional space, the Euclidean Distance between them is given by using the formula:

d = √[(x2 – x1)2 + (y2 – y1)2+ (z2 – z1)2]

where,

  • d is Euclidean Distance
  • (x1, y1, z1) is Coordinate of the first point
  • (x2, y2, z2) is Coordinate of the second point

Euclidean Distance in nD

In general, the Euclidean Distance formula between two points (x11, x12, x13, …., x1n) and (x21, x22, x23, …., x2n) in an n-dimensional space is given by the formula:

d = √[∑(x2i – x1i)2]

Where,

  • i Ranges from 1 to n
  • d is Euclidean distance
  • (x11, x12, x13, …., x1n) is Coordinate of First Point
  • (x21, x22, x23, …., x2n) is Coordinate of Second Point

Euclidean Distance Formula Derivation

Euclidean Distance Formula is derived by following the steps added below:

Step 1: Let us consider two points, A (x1, y1) and B (x2, y2), and d is the distance between the two points.

Step 2: Join the points using a straight line (AB).

Step 3: Now, let us construct a right-angled triangle whose hypotenuse is AB, as shown in the figure below.

Euclidean Distance | Formula, Derivation & Solved Examples (2)

Step4: Now, using Pythagoras theorem we know that,

(Hypotenuse)2 = (Base)2 + (Perpendicular)2

d2 = (x2 – x1)2 + (y2 – y1)2

Now, take the square root on both sides of the equation, we get

d = √(x2 – x1)2 + (y2 – y1)2

Check:

  • Distance Between Two Points
  • Distance Formula
  • Horizontal Lines
  • Vertical Lines

Euclidean Distance and Manhattan Distance

Differences between the Euclidean and Manhattan methods of measuring distance are listed in the following table:

AspectEuclidean DistanceManhattan Distance
DefinitionMeasures the shortest straight-line distance between two points.Measures the distance between two points along axes at right angles.
Formula (2D)d = √[(x2 – x1)2 + (y2 – y1)2]d = [|x2 – x1| + |y2 – y1|]
PathDirect straight line.Path that resembles city blocks or a grid pattern.
Metric NameL2 norm or Euclidean norm.L1 norm or Manhattan norm.
Use CasesUsed in scenarios where direct distances are needed (e.g., physics).Commonly used in planning, urban design, and certain optimization algorithms.
Sensitivity to ScalingLess sensitive to scaling of axes.More sensitive to scaling of axes since it adds absolute differences.

Conclusion

Euclidean Distance is a metric for measuring the distance between two points in Euclidean space, reflecting the length of the shortest path connecting them, which is a straight line. The formula for calculating Euclidean Distance depends on the dimensionality of the space. In a 2-dimensional plane, the distance d between points is, d = d = √[(x2 – x1)2 + (y2 – y1)2]. In 3D, d = √[(x2 – x1)2 + (y2 – y1)2+ (z2 – z1)2].

Read More,

  • Distance Formula
  • 3D Distance Formula
  • Section Formula
  • Cartesian Coordinate System

Solved Questions on Euclidean Distance

Here are some sample problems based on the distance formula.

Question 1: Calculate the distance between the points (4,1) and (3,0).

Solution:

Using Euclidean Distance Formula:

d = √(x2 – x1)2 + (y2 – y1)2

d = √(3 – 4)2 + (0 – 1)2

⇒ d = √(1 + 1)

⇒ d = √2 = 1.414 unit

Question 2: Show that the points A (0, 0), B (4, 0), and C (2, 2√3) are the vertices of an Equilateral Triangle.

Solution:

To prove that these three points form an equilateral triangle, we need to show that the distances between all pairs of points, i.e., AB, BC, and CA, are equal.

Distance between points A and B:

AB = √[(4– 0)2 + (0-0)2]

⇒ AB = √16

AB = 4 unit

Distance between points B and C:

BC = √[(2-4)^2 + (2√3-0)^2]

⇒ BC = √[4+12] = √16

BC = 4 unit

Distance between points C and A:

CA = √[(0-2)2 + (0-2√3)2]

⇒ CA = √[4 + 12] = √16

CA = 4 unit

Here, we can observe that all three distances, AB, BC, and CA, are equal.

Therefore, the given triangle is an Equilateral Triangle

Question 3: Mathematically prove Euclidean distance is a non negative value.

Solution:

Consider two points (x1, y1) and (x2, y2) in a 2-dimensional space; the Euclidean Distance between them is given by using the formula:

d = √(x2 – x1)2 + (y2 – y1)2

We know that squares of real numbers are always non-negative.

⇒(x2 – x1)2 >= 0 and (y2 – y1)2 >= 0

√(x2 – x1)2 + (y2 – y1)2 >= 0

As square root of a non-negative number gives a non-negative number,

Therefore Euclidean distance is a non-negative value. It cannot be a negative number.

Question 4: A triangle has vertices at points A(2, 3), B(5, 7), and C(8, 1). Find the length of the longest side of the triangle.

Solution:

Given, the points A(2, 3), B(5, 7), and C(8, 1) are the vertices of a triangle.

Distance between points A and B:

AB = √[(5-2)2 + (7-3)2]

⇒ AB = √9+16= √25

AB = 5 unit

Distance between points B and C:

BC = √[(8-5)2 + (1-7)2]

⇒ BC = √[9+36] = √45

BC = 6.708 unit

Distance between points C and A:

CA = √[(8-2)2 + (1-3)2]

⇒ CA = √[36+4] = √40

CA = 6.325 unit

Therefore, the length of the longest side of triangle is 6.708 unit.

Practice Problems on Euclidean Distance

P1: Calculate the Euclidean distance between points P(1, 8, 3) and Q(6, 6, 8).

P2: A car travels from point A(0, 0) to point B(5, 12). Calculate the distance traveled by the car?

P3: An airplane flies from point P(0, 0, 0) to point Q(100, 200, 300). Calculate the distance traveled by the airplane.

P4: A triangle has vertices at points M(1, 2), N(4, 6), and O(7, 3). Find the perimeter of the triangle.

P5: On a graph with points K(2, 3) and L(5, 7), plot these points and calculate the Euclidean distance between them.

P6: A drone needs to fly from point A(1, 1) to point B(10, 10). Find the shortest path the drone should take to conserve battery?

P7: A robotic arm moves from position J(1, 2, 3) to position K(4, 5, 6). Calculate the total distance traveled by the robotic arm.

Euclidean Distance – FAQs

Define Euclidean Distance.

Euclidean distance measures the straight-line distance between two points in Euclidean space.

What is the distance formula for a 2D Euclidean Space?

Euclidean Distance between two points (x1, y1) and (x2, y2) in using the formula:

d = √[(x2 – x1)2 + (y2 – y1)2]

What are some properties of Euclidean Distance?

  • Euclidean distance is always non-negative because it represents a physical distance in space, which cannot be a negative value.
  • Distance between a point and itself is always zero

Can Euclidean Distance be negative?

Euclidean Distance can’t be negative as it represents a physical distance. It can be a zero value but can’t be a negative value.

How can Euclidean Distance be extended to higher dimensions?

In general, the Euclidean Distance formula between two points (x11, x12, x13, …., x1n) and (x21, x22, x23, …., x2n) in an n-dimensional space is given by the formula:

d = √[∑(x2i – x1i)2]

What is the difference between Euclidean Distance and Manhattan Distance?

Consider two points (x1, y1) and (x2, y2) in a 2-dimensional space;

Euclidean Distance between them is given by using the formula:

d = √[(x2 – x1)2 + (y2 – y1)2], (Calculates the square root of the sum of squared differences)

Manhattan Distance between them is given by using the formula:

d = [|x2 – x1| + |y2 – y1|], (Calculates the distance between two points as the sum of the absolute differences in their coordinates)



`; tags.map((tag)=>{ let tag_url = `videos/${getTermType(tag['term_id__term_type'])}/${tag['term_id__slug']}/`; tagContent+=``+ tag['term_id__term_name'] +``; }); tagContent+=`
Euclidean Distance | Formula, Derivation & Solved Examples (2024)

FAQs

How do you derive the Euclidean distance? ›

The formula for Euclidean distance in two dimensions is D = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 , where D is the Euclidean distance, and ( x 1 , y 1 ) and ( x 2 , y 2 ) are the Cartesian coordinates of the two points.

How do you find the Euclidean distance example? ›

The Euclidean distance formula is used to find the distance between two points on a plane. This formula says the distance between two points (x1 1 , y1 1 ) and (x2 2 , y2 2 ) is d = √[(x2 – x1)2 + (y2 – y1)2].

What is the concept of Euclidean distance? ›

In mathematics, the Euclidean distance between two points in Euclidean space is the length of the line segment between them. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, and therefore is occasionally called the Pythagorean distance.

What is the Euclidean distance formula for one dimension? ›

In one dimension, the distance of two points present on the real line is the absolute value of the arithmetic difference of the coordinates. Learn more about Euclidean distance here. d ( p , q ) = | p − q | .

What is the formula for Euclidean distance in 3 dimensions? ›

Similarly, to calculate the distance between two objects (or points) in space, the knowledge and formula of three dimensions – the distance between two points is required. PQ = d = √ [(x2 – x1)2 + (y2 – y1)2 + (z2 – z1)2].

What is another name for the Euclidean distance? ›

Euclidean distance
TitleEuclidean distance
Synonymstandard metric
Synonymstandard topology
SynonymEuclidean
Synonymcanonical topology
19 more rows
Mar 22, 2013

What is the Pythagorean theorem for Euclidean distance? ›

From the Pythagorean theorem, in which the square of the length of the hypotenuse of a right triangle is equal to the sum of the squares of the lengths of the other two sides, the distance between the points (a, b) and (c, d) is given by Square root of√(a − c)2 + (b − d)2.

What is Euclidean in simple terms? ›

relating to the geometry (= the study of angles and shapes formed by the relationships between lines) described by Euclid. Compare. non-Euclidean.

Why is Euclidean distance good? ›

In a one-dimensional space, the Euclidean distance is not only intuitive, but it's also easy to calculate. If the plots on a line are 3, 5 and 7, the distance between 3 and 5 is 2, and between 3 and 7 is 4.

What is the difference between Manhattan distance and Euclidean distance? ›

Manhattan Distance is the L1 norm form (L1 norm is the sum of the magnitude of vectors in space), while Euclidean Distance is L2 Norm form (The L2 norm calculates the distance of the vector coordinate from the origin of the vector space.

What is the maximum Euclidean distance? ›

In theory, maximum Euclidean distance is unbounded ( ), but in practice its range depends on the distribution of input values. If the input values are bounded between zero and one, the theoretical maximum is equal to the square root of the number of variables ( ) being compared.

How to interpret Euclidean distance? ›

The distance between vectors X and Y is defined as follows: In other words, euclidean distance is the square root of the sum of squared differences between corresponding elements of the two vectors. Note that the formula treats the values of X and Y seriously: no adjustment is made for differences in scale.

How do you derive distance? ›

Distance Between Two Points in 2D

To derive the formula, let us consider two points in 2D plane A(x1,y1) ( x 1 , y 1 ) , and B(x2,y2) ( x 2 , y 2 ) . Assume that 'd' is the distance between A and B. Then the distance formula is d = √[(x2 2 – x1 1 )2 + (y2 2 – y1 1 )2].

What is the formula for Euclidean distance in data science? ›

In a one-dimensional space, the Euclidean distance is not only intuitive, but it's also easy to calculate. If the plots on a line are 3, 5 and 7, the distance between 3 and 5 is 2, and between 3 and 7 is 4. However, rather than following the above formula, we would be using the following: d(a, b) = sqrt((a - b)²)

What is the distance formula in Euclidean geometry? ›

The formula for calculating Euclidean Distance depends on the dimensionality of the space. In a 2-dimensional plane, the distance d between points is, d = d = √[(x2 – x1)2 + (y2 – y1)2]. In 3D, d = √[(x2 – x1)2 + (y2 – y1)2+ (z2 – z1)2].

Top Articles
WWE Rumors on Mandy Rose's Release, WrestleMania 39 Plans and Shotzi's Injury Status
Mick Foley on WWE Raw Absence; Mandy Rose Explains Release; FTR Reveals WWE Contract
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
Red Dead Redemption 2 Legendary Fish Locations Guide (“A Fisher of Fish”)
What's the Difference Between Halal and Haram Meat & Food?
R/Skinwalker
Rugged Gentleman Barber Shop Martinsburg Wv
Jennifer Lenzini Leaving Ktiv
Justified - Streams, Episodenguide und News zur Serie
Epay. Medstarhealth.org
Olde Kegg Bar & Grill Portage Menu
Cubilabras
Half Inning In Which The Home Team Bats Crossword
Amazing Lash Bay Colony
Juego Friv Poki
Dirt Devil Ud70181 Parts Diagram
Truist Bank Open Saturday
Water Leaks in Your Car When It Rains? Common Causes & Fixes
What’s Closing at Disney World? A Complete Guide
New from Simply So Good - Cherry Apricot Slab Pie
Fungal Symbiote Terraria
modelo julia - PLAYBOARD
Poker News Views Gossip
Abby's Caribbean Cafe
Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
Tri-State Dog Racing Results
Navy Qrs Supervisor Answers
Trade Chart Dave Richard
Lincoln Financial Field Section 110
Free Stuff Craigslist Roanoke Va
Wi Dept Of Regulation & Licensing
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Dan Stracke

Last Updated:

Views: 6428

Rating: 4.2 / 5 (63 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Dan Stracke

Birthday: 1992-08-25

Address: 2253 Brown Springs, East Alla, OH 38634-0309

Phone: +398735162064

Job: Investor Government Associate

Hobby: Shopping, LARPing, Scrapbooking, Surfing, Slacklining, Dance, Glassblowing

Introduction: My name is Dan Stracke, I am a homely, gleaming, glamorous, inquisitive, homely, gorgeous, light person who loves writing and wants to share my knowledge and understanding with you.