How to Calculate Euclidean Distance

••• Antonio_Diaz/iStock/GettyImages

Euclidean distance is the distance between two points in Euclidean space. Euclidean space was originally devised by the Greek mathematician Euclid around 300 B.C.E. to study the relationships between angles and distances. This system of geometry is still in use today and is the one that high school students study most often. Euclidean geometry specifically applies to spaces of two and three dimensions. However, it can easily be generalized to higher order dimensions.

    Compute the Euclidean distance for one dimension. The distance between two points in one dimension is simply the absolute value of the difference between their coordinates. Mathematically, this is shown as |p1 - q1| where p1 is the first coordinate of the first point and q1 is the first coordinate of the second point. We use the absolute value of this difference since distance is normally considered to have only a non-negative value.

    Take two points P and Q in two dimensional Euclidean space. We will describe P with the coordinates (p1,p2) and Q with the coordinates (q1,q2). Now construct a line segment with the endpoints of P and Q. This line segment will form the hypotenuse of a right triangle. Extending the results obtained in Step 1, we note that the lengths of the legs of this triangle are given by |p1 - q1| and |p2 - q2|. The distance between the two points will then be given as the length of the hypotenuse.

    Use the Pythagorean theorem to determine the length of the hypotenuse in Step 2. This theorem states that c^2 = a^2 + b^2 where c is the length of a right triangle's hypotenuse and a,b are the lengths of the other two legs. This gives us c = (a^2 + b^2)^(1/2) = ((p1 - q1)^2 + (p2 - q2)^2)^(1/2). The distance between 2 points P = (p1,p2) and Q = (q1,q2) in two dimensional space is therefore ((p1 - q1)^2 + (p2 - q2)^2)^(1/2).

    Extend the results of Step 3 to three dimensional space. The distance between points P = (p1, p2, p3) and Q = (q1,q2,q3) can then be given as ((p1-q1)^2 + (p2-q2)^2 + (p3-q3)^2)^(1/2).

    Generalize the solution in Step 4 for the distance between two points P = (p1, p2, ..., pn) and Q = (q1,q2, ..., qn) in n dimensions. This general solution can be given as ((p1-q1)^2 + (p2-q2)^2 + ... + (pn-qn)^2)^(1/2).

Related Articles

How to Convert Square Dimensions to Round
How to Calculate the Area of an Equilateral Triangle
How to Graph Exponential Functions, an Easy Way
How to Calculate Square Feet in a Triangle
How to Find the Distance From a Point to a Line
How to Calculate Ellipse Dimensions
How to Convert Graphs to Equations
How to Find Euclidean Distance
How to Find the Radius of an Arc
How to Calculate the Obtuse Triangle
How to Convert Degrees into Inches or Millimeters
How to Calculate the Length of an Arc
How to Calculate a Tangent
How to Find the Slope in a Circle
How to Find the Angle of a Curve
How to Write Equations of the Altitudes of Triangles
How to Solve a Parabola
How to Solve Equations on Isosceles Triangles
Properties of a Triangular Pyramid
How to Find The Distance Between Two Points On a Curve