According to mathematics, the Euclidean distance between two points in Euclidean space is the length of the line segment between the two points. It is denoted by e.
It is calculated by cartesian coordinates of the points using the Pythagorean theorem. That’s why it’s occasionally called Pythagorean distance. The distance between two objects which are not points is usually said to be the smallest distance among pairs of points from the two objects. For computing distances from a point to a line, formulas are used.
The concept of distance was generalized to abstract metric spaces and other distances. It corresponds with everyday experience and perceptions. The names come from Greek mathematicians Euclid and Pythagoras although Euclid didn’t represent the distance as numbers and the connection of it from the Pythagoras theorem was not made until the 18th century.
In some applications of statistics and optimization, the square of Euclidean distance is used rather than the distance itself.
There are three dimensions:
d(p,q) = ǀp – qǀ
for higher dimension formula used is,
d(p,q) = √(p – q)²
d(p, q) = √( q1 – p1)²2 + (q2 – p2)²
when Pythagoras theorem is applied to a right-angle triangle with horizontal and vertical sides, it can be seen that the line segment from p to q is the hypotenuse. The two squared formulas inside the square root are used to the areas of the square on the horizontal as well as vertical sides. Outer square root converts the area of the square on the hypotenuse into the length of the hypotenuse.
It is also possible to calculate the distance for points given by polar coordinates. For example, if the polar coordinates of p are (r, Θ) and for q is (s, ψ) then their distance is given by
d(p, q) = √r² + s² – 2rs cos(Θ – ψ ) [ also known as law of cosines]
d(p,q) = √(p1 – q1)² + (p2 – q2)² + (p3 – q3)²
In general, cartesian coordinates in n-dimensional Euclidean space, the distance is given by
d(p,q) = √(p1 – q1)² + (p2 – q2)² + (p3 – q3)² +……………….+ (pi – qi)² +………….+ (pn – qn)²
Euclidean distance provides the shortest value between two points. It’s either the plane or 3-dimensional space, it measures the length of a segment that connects two points. This is the most obvious way of representing the distance between two points. We derive the Euclidean distance formula using the Pythagoras theorem.