The Pythagorean theorem is a fundamental relation in Euclidean geometry that states that the square of the hypotenuse of a right triangle is equal to the sum of the squares of the other two sides. The distance formula is a way of calculating the distance between two points in a coordinate plane using the Pythagorean theorem. In this article, we will explain how these two concepts are related and how to use them in different situations.

Contents

## What is the Pythagorean Theorem?

The Pythagorean theorem is named after the Greek philosopher and mathematician Pythagoras, who lived around the 6th century BC. According to legend, he discovered this theorem by observing the patterns of tiles on the floor of a temple. The theorem can be stated as follows:

In any right triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides.

Mathematically, we can write this as:

$$a^2 + b^2 = c^2$$

where $a$ and $b$ are the lengths of the legs (the sides adjacent to the right angle) and $c$ is the length of the hypotenuse.

The Pythagorean theorem can be proven in many ways, using geometry, algebra, or calculus. One of the simplest proofs is based on rearranging four copies of a right triangle into two different squares, as shown below:

![Pythagorean proof](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Pythagorean.svg/220px-Pythagorean.svg.png)

The area of each square is equal to the square of its side length. Therefore, we have:

$$c^2 = (a + b)^2$$

Expanding and simplifying this equation, we get:

$$c^2 = a^2 + b^2 + 2ab$$

Subtracting $2ab$ from both sides, we obtain:

$$c^2 – 2ab = a^2 + b^2$$

Finally, dividing by 2, we get:

$$\frac{c^2}{2} – ab = \frac{a^2}{2} + \frac{b^2}{2}$$

This equation shows that the area of the white square in the figure is equal to the sum of the areas of the two smaller squares on the legs. This proves the Pythagorean theorem.

## What is the Distance Formula?

The distance formula is a way of finding the distance between two points in a coordinate plane using algebra and the Pythagorean theorem. Suppose we have two points $P(x_1, y_1)$ and $Q(x_2, y_2)$ in a Cartesian coordinate system. We can draw a right triangle with these points as vertices, as shown below:

![Distance formula](https://www.storyofmathematics.com/wp-content/uploads/2020/06/Distance-Formula-1.png)

The horizontal leg of this triangle has a length equal to the difference between the x-coordinates of $P$ and $Q$, which is $x_2 – x_1$. The vertical leg has a length equal to the difference between the y-coordinates of $P$ and $Q$, which is $y_2 – y_1$. The hypotenuse has a length equal to the distance between $P$ and $Q$, which we denote by $d$. Using the Pythagorean theorem, we can write:

$$(x_2 – x_1)^2 + (y_2 – y_1)^2 = d^2$$

Taking the square root of both sides, we get:

$$d = \sqrt{(x_2 – x_1)^2 + (y_2 – y_1)^2}$$

This is the distance formula. It shows that we can calculate the distance between any two points in a plane by using their coordinates and applying some basic arithmetic operations.

## How are They Related?

The Pythagorean theorem and the distance formula are related because they both use squares and square roots to express geometric relationships. The Pythagorean theorem applies to any right triangle, while the distance formula applies to any pair of points in a plane. The distance formula can be seen as a special case of the Pythagorean theorem when we consider a right triangle whose vertices are given by coordinates.

The Pythagorean theorem and the distance formula are useful tools for solving many problems in mathematics, physics, engineering, and other fields. For example, we can use them to find the length of a diagonal of a rectangle, the height of a building, the speed of a moving object, the angle of elevation or depression, the area of a circle, and many more.

## Examples

Here are some examples of how to use the Pythagorean theorem and the distance formula in different situations.

Example 1: Finding the Length of a Diagonal of a Rectangle

Suppose we have a rectangle with sides of length 12 cm and 9 cm. What is the length of its diagonal?

- Solution:

We can draw a right triangle inside the rectangle, as shown below:

![Rectangle diagonal](https://www.storyofmathematics.com/wp-content/uploads/2020/06/Rectangle-Diagonal.png)

The diagonal is the hypotenuse of this triangle, and its length is denoted by $d$. Using the Pythagorean theorem, we can write:

$$d^2 = 12^2 + 9^2$$

Simplifying, we get:

$$d^2 = 144 + 81$$

Adding, we get:

$$d^2 = 225$$

Taking the square root of both sides, we get:

$$d = \sqrt{225}$$

Simplifying, we get:

$$d = 15$$

Therefore, the length of the diagonal is 15 cm.

Alternatively, we can use the distance formula to find the same answer. We can assign coordinates to the vertices of the rectangle, such as $A(0, 0)$, $B(12, 0)$, $C(12, 9)$, and $D(0, 9)$. Then, we can use the distance formula to find the distance between $A$ and $C$, which is equal to the diagonal. We have:

$$d = \sqrt{(12 – 0)^2 + (9 – 0)^2}$$

Simplifying, we get:

$$d = \sqrt{144 + 81}$$

Adding and taking the square root, we get:

$$d = \sqrt{225}$$

Simplifying, we get:

$$d = 15$$

Therefore, the length of the diagonal is 15 cm.

## Example 2: Finding the Height of a Building

Suppose we want to find the height of a building by using a clinometer. A clinometer is a device that measures angles of elevation or depression. We stand at a point $P$ on level ground that is 50 m away from the base of the building. We point the clinometer at the top of the building and measure an angle of elevation of 30°. What is the height of the building?

## Solution:

We can draw a right triangle with $P$ as one vertex and the base and top of the building as the other two vertices, as shown below:

![Building height](https://www.storyofmathematics.com/wp-content/uploads/2020/06/Building-Height.png)

The height of the building is equal to the length of the vertical leg of this triangle, which we denote by $h$. The horizontal leg has a length equal to the distance from $P$ to the base of the building, which is 50 m. The angle opposite to this leg is equal to the angle of elevation measured by the clinometer, which is 30°. Using trigonometry, we can write:

$$\tan(30°) = \frac{h}{50}$$

Multiplying both sides by 50, we get:

$$50\tan(30°) = h$$

Using a calculator or a table of trigonometric values, we can find that $\tan(30°) \approx 0.577$. Substituting this value into the equation, we get:

$$50\times0.577 = h$$

Multiplying, we get:

$$28.85 \approx h$$

Rounding to one decimal place, we get:

$$28.9 \approx h$$

Therefore, the height of the building is approximately 28.9 m.

Alternatively, we can use the Pythagorean theorem to find

the same answer. We can find

the length of

the hypotenuse

of

the triangle,

which

we denote

by

$d$,

using

the cosine

of

the angle

of

elevation.

We have:

$$\cos(30°) = \frac{50}{d}$$

Multiplying both sides by $d$, we get:

$$d\cos(30°) = 50$$

Dividing both sides by $\cos(30°)$ , we get:

$$d = \frac{50}{\cos(30°)}$$

Using a calculator or a table of trigonometric values,

we can find that $\cos(30.