from a handpicked tutor in LIVE 1-to-1 classes

# Euclidean Distance Formula

Before going to learn the Euclidean distance formula, let us see what is Euclidean distance. In coordinate geometry, Euclidean distance is the distance between two points. To find the two points on a plane, the length of a segment connecting the two points is measured. We derive the Euclidean distance formula using the Pythagoras theorem. Let us learn the Euclidean distance formula along with a few solved examples.

## What Is Euclidean Distance Formula?

The Euclidean distance formula, as its name suggests, gives the distance between two points (or) the straight line distance. Let us assume that \((x_1,y_1)\) and \((x_2,y_2)\) are two points in a two-dimensional plane. Here is the Euclidean distance formula.

### Euclidean Distance Formula

The Euclidean distance formula says:

d = √[ (x\(_2\) – x\(_1\))^{2} + (y\(_2\) – y\(_1\))^{2}]

where,

- (x\(_1\), y\(_1\)) are the coordinates of one point.
- (x\(_2\), y\(_2\)) are the coordinates of the other point.
- d is the distance between (x\(_1\), y\(_1\)) and (x\(_2\), y\(_2\)).

## Euclidean Distance Formula Derivation

To derive the Euclidean distance formula, let us consider two points A (x\(_1\), y\(_1\)) and B (x\(_2\), y\(_2\)) and let us assume that d is the distance between them. Join A and B by a line segment. To derive the formula, we construct a right-angled triangle whose hypotenuse is AB. For this, we draw horizontal and vertical lines from A and B which meet at C as shown below.

Now we will apply the Pythagoras theorem to the triangle ABC. Then we get,

AB^{2} = AC^{2} + BC^{2}

d^{2} = (x\(_2\) – x\(_1\))^{2} + (y\(_2\) – y\(_1\))^{2}

Taking the square root on both sides,

d = √[ (x\(_2\) – x\(_1\))^{2} + (y\(_2\) – y\(_1\))^{2}]

Hence the Euclidean distance formula is derived.

We will see more applications of Euclidean distance formula in the section below.

## Examples Using Euclidean Distance Formula

**Example 1: **Find the distance between points P(3, 2) and Q(4, 1).

**Solution:**

Given:

P(3, 2) = \((x_1,y_1)\)

Q(4, 1) = \((x_2,y_2)\)

Using Euclidean distance formula,

d = √[(x\(_2\) – x\(_1\))^{2} + (y\(_2\) – y\(_1\))^{2}]

PQ = √[(4 – 3)^{2} + (1 – 2)^{2}]

PQ = √[(1)^{2} + (-1)^{2}]

PQ = √2 units.

**Answer: **The Euclidean distance between points A(3, 2) and B(4, 1) is √2 units.

**Example 2: **Prove that points A(0, 4), B(6, 2), and C(9, 1) are collinear.

**Solution:**

To prove the given three points to be collinear, it is sufficient to prove that the sum of the distances between two pairs of points is equal to the distance between the third pair. We will find the distance between every pair of points using the Euclidean distance formula.

AB = √[(6 – 0)^{2} + (2 – 4)^{2}] = √[36 + 4] = √40 = 2√10

BC = √[(9 – 6)^{2} + (1 – 2)^{2}] = √[9 + 1] = √10

CA = √[(0 – 9)^{2} + (4 – 1)^{2}] = √[81 + 9] = √90 = 3√10

Here, we can see that

AB + BC = CA

(This is because 2√10 + √10 = 3√10).

**Answer: **We proved that A, B, and C are collinear.

**Example 3: **Check that points A(√3, 1), B(0, 0), and C(2, 0) are the vertices of an equilateral triangle.

**Solution: **

Three vertices A, B, and C are vertices of an equilateral triangle if and only if AB = BC = CA.

Given:

A(√3, 1) = \((x_1,y_1)\)

B(0, 0) = \((x_2,y_2)\)

C(2, 0) = \((x_3,y_3)\)

Using Euclidean distance formula,

AB = √[(x\(_2\) – x\(_1\))^{2} + (y\(_2\) – y\(_1\))^{2}]

= √[(0 – √3)^{2} + (0-1)^{2}]

= √(3 + 1)

= √4

= 2

BC = √[(x\(_3\) – x\(_2\))^{2} + (y\(_3\) – y\(_2\))^{2}]

= √[(2-0)^{2} + (0-0)^{2}]

= √(4 + 0)

= √4

= 2

CA = √[(x\(_3\) – x\(_1\))^{2} + (y\(_3\) – y\(_1\))^{2}]

= √[(2 - √3)^{2}+ (0 – 1 )^{2}]

= √(4 + 3 - 4√3 + 1)

= √ (8 - 4√3)

= √ (8 - 2√12)

= √ (√6 - √2)^{2}

= √6 - √2

Here AB = BC ≠ CA.

**Answer: **A, B, and C are NOT the vertices of an equilateral triangle.

## FAQs on Euclidean Distance Formula

### What Is Euclidean Distance Formula?

The Euclidean distance formula is used to find the distance between two points on a plane. This formula says the distance between two points (x\(_1\), y\(_1\)) and (x\(_2\), y\(_2\)) is d = √[(x_{2} – x_{1})^{2} + (y_{2} – y_{1})^{2}].

### How To Derive Euclidean Distance Formula?

To derive the Euclidean distance formula, consider two points A(x\(_1\), y\(_1\)) and B(x\(_2\), y\(_2\)) and join them by a line segment. Then draw horizontal and vertical lines from A and B to meet at C. Then ABC is a right-angled triangle and hence we can apply the Pythagoras theorem to it. Then we get

AB^{2} = AC^{2} + BC^{2}

d^{2} = (x\(_2\) – x\(_1\))2 + (y\(_2\) – y\(_1\))^{2}

Taking the square root on both sides,

d = √[ (x\(_2\) – x\(_1\))^{2} + (y\(_2\) – y\(_1\))^{2}]

For detailed derivation, click here.

### What Are the Applications of Euclidean Distance Formula?

The Euclidean distance formula is used to find the length of a line segment given two points on a plane. Finding distance helps in proving the given vertices form a square, rectangle, etc (or) proving given vertices form an equilateral triangle, right-angled triangle, etc.

### What Is the Difference Between Euclidean Distance Formula and Manhattan Distance Formula?

For any two points (x\(_1\), y\(_1\)) and (x\(_2\), y\(_2\)) on a plane,

- The Euclidean distance formula says, the distance between the above points is d = √[ (x\(_2\) – x\(_1\))
^{2}+ (y\(_2\) – y\(_1\))^{2}]. - Manhattan distance formula says, the distance between the above points is d = |x\(_2\) - x\(_1\)| + |y\(_2\) - y\(_1\)|.

visual curriculum