Euclidean Distance Formula

What is Euclidean Distance?

In mathematics, the definition of Euclidean distance of two points in the space of Euclidean is the length of the line segment between two points. This can be obtained by the cartesian coordinates of the points by making use of the Pythagoras theorem and hence called the Pythagorean distance. These terms originated from the former Greek mathematicians Euclid & Pythagoras. 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.

Assume p and q to be two points present on the real line, then the distance between them is given by

\(\begin{array}{l}{\displaystyle d(p,q)=|p-q|.}\end{array} \)

Euclidean Distance Formula for 2 Points

For two dimensions, in the plane of Euclidean, assume point A has cartesian coordinates (x1, y1) and point B has coordinates (x2, y2). The distance between points A and B is given by:

d = AB =

\(\begin{array}{l}\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\end{array} \)

The distance can be computed using the points given by polar coordinates. If the polar coordinates of point P are (r, θ) and Q are (s, ѱ), then the distance between these points is given by the cosine law,

\(\begin{array}{l}{\displaystyle d(p,q)={\sqrt {r^{2}+s^{2}-2rs\cos(\theta -\psi )}}.}\end{array} \)

Also, check: Distance between two points

Euclidean Distance Formula in Three Dimensions

In 3 dimensions, the distance between points (x1, y1, z1)  and (x2, y2, z2) is given by:

\(\begin{array}{l}d=\sqrt{(x_2-x_1)^2+(y_2 -y_1)^2+(z_2-z_1)^2}\end{array} \)

Similarly, we can write the formula for between two points in n-dimensions. 

For points possessing Cartesian coordinates (p1, p2, p3, p4,…., pn) and (q1, q2, q3, q4,…., qn) in n-dimensional Euclidean space, the distance is given by

\(\begin{array}{l}{\displaystyle d(p,q)={\sqrt {(p_{1}-q_{1})^{2}+(p_{2}-q_{2})^{2}+\cdots +(p_{i}-q_{i})^{2}+\cdots +(p_{n}-q_{n})^{2}}}}\end{array} \)

Euclidean Distance Examples

Example 1: If the Euclidean distance between the points (a, 2) and (3, 4) be 7, then find the value of a.

Solution:

Let the given points be:

(a, 2) = (x1, y1)

(3, 4) = (x2, y2)

The Euclidean distance between two points is:

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

= √[(3 – a)2 + (4 – 2)2]

= √[9 – 6a + a2 + 4]

= √(a2 – 6a + 13)

According to the given,

√(a2 – 6a + 13) = 7

Squaring on both sides, we get;

a2 – 6a + 13 = 49

a2 – 6a + 13 – 49 = 0

a2 – 6a – 36 = 0

a = [-(-6) ± √(36 + 144)]/2(1)

= [6 ± √180]/2

= [6 ± 6√5]/2

= 3 ± 3√5

Therefore, a = 3(1+√5), 3(1-√5).

Example 2: Find the distance of the midpoint of the line joining the points (a sin θ, 0) and (0, a cos θ) from the origin.

Solution:

Midpoint of (a sin θ, 0) and (0, a cos θ) = [(a sin θ + 0)/2, (0 + a cos θ)/2]

= [(a sin θ)/2, (a cos θ)/2]

Distance of the point [(a sin θ)/2, (a cos θ)/2] from the origin, i.e. (0, 0) 

\(\begin{array}{l}=\sqrt{(\frac{a\ sin\ \theta}{2}-0)^2+(\frac{a\ cos\ \theta}{2}-0)^2}\\=\sqrt{(\frac{a^2}{4})(sin^2\theta+cos^2\theta)}\\=\sqrt{\frac{a^2}{4}}\\=\frac{a}{2}\end{array} \)

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*

close
close

Play

&

Win