Euclidean distance

Euclidean distance formula: √((x2 - x1)² + (y2 - y1)²)

Euclidean distance

Euclidean distance formula: √((x2 - x1)² + (y2 - y1)²)

The Euclidean distance formula is derived from the Pythagorean theorem, which states that in a right-angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. This theorem is applied to calculate the distance between two points in a Euclidean space by treating the difference in their coordinates as the legs of a right triangle, and the distance as the hypotenuse.

The formula for Euclidean distance between two points (x1, y1) and (x2, y2) in a Cartesian plane is √((x2 - x1)² + (y2 - y1)²). This equation calculates the straight-line distance between the points, reflecting the shortest path connecting them. The square root function ensures that the distance is non-negative, as distances cannot be negative.

Understanding the Euclidean distance formula is crucial for various applications in mathematics, physics, and computer science. It is used in fields such as geometry, navigation, and machine learning for tasks like clustering, classification, and optimization. The formula provides a fundamental tool for measuring and comparing distances in a Euclidean space.

Example

Calculate the Euclidean distance between points A(3, 4) and B(7, 1). Using the formula: √((7 - 3)² + (1 - 4)²) = √(4² + (-3)²) = √(16 + 9) = √25 = 5

The Euclidean distance formula is essential for accurately determining the straight-line distance between two points in a Euclidean space, which is fundamental in various scientific and mathematical applications.

Related concepts

One email a day: 5 concepts + the 5 stories that matter →

Swipe through 100 ML concepts daily

Open TickerNews