# How are the Pythagorean Theorem and the Distance Formula related?

Nov 12, 2015

If we consider what the distance formula really tells you, we can see the similarities. It is more than just a similar form.

The distance formula is commonly seen as:

$D = \sqrt{{\left({x}_{1} - {x}_{2}\right)}^{2} + {\left({y}_{1} - {y}_{2}\right)}^{2}}$

We commonly write the Pythagorean Theorem as:

$c = \sqrt{{a}^{2} + {b}^{2}}$

Consider the following major points (in Euclidean geometry on a Cartesian coordinate axis):

• The definition of a distance from $x$ to $\pm c$ is $\textcolor{g r e e n}{| x - c |}$.
• There is the relationship where $\sqrt{{\left(x - c\right)}^{2}} = \textcolor{g r e e n}{| x - c |} = x - c \text{ AND } - x + c$
• The distance from one point to another is the definition of a line segment.
• Any diagonal line segment has an $x$ component and a $y$ component, due to the fact that a slope is $\Delta y \text{/} \Delta x$. The greater the $y$ contribution, the steeper the slope. The greater the $x$ contribution, the flatter the slope.

What do you see in these formulas? Have you ever tried drawing a triangle on a Cartesian coordinate system? If so, you should see that these are two formulas relating the diagonal distance on a right triangle that is composed of two component distances $x$ and $y$.

Or, we could put it another way through substitutions based on the distance definitions above. Let:

${x}_{1} - {x}_{2} = \pm a$
${y}_{1} - {y}_{2} = \pm b$
(depending on if ${x}_{1} > {x}_{2}$ or ${x}_{1} < {x}_{2}$, and similarly for $y$.)

Now what do you see? An equivalence.

$D = \textcolor{b l u e}{\sqrt{{\left(\pm a\right)}^{2} + {\left(\pm b\right)}^{2}}} = c = \textcolor{b l u e}{\sqrt{{a}^{2} + {b}^{2}}}$

In short, the distance formula is a formalization of the Pythagorean Theorem using $x$ and $y$ coordinates. In other words, they are the same thing in two seemingly different contexts.

Essentially, they are "the same thing". As long as we stay in the context of Euclidean Geometry (not in the contemporary sense), the distance formula can be derived from the Pythagorean Theorem.

#### Explanation:

The distance formula makes sense in a coordinate context. It's used to compute the distance between two points in an orthogonal coordinate system (i.e. a plane with a coordinate system such that).

First of all, let's compute the distance between $A = \left(2 , 3\right)$ and $B = \left(7 , 3\right)$.

This is quite easy, because the two points lie on the horizontal line $y = 3$, so the distance between them can be interpreted as the length of the line segment $A B$, which is $5$ and can be computed by subtracting the $x$-coordinates of the two points and considering the absolute value of the result (to avoid negative distances). So in this case $d \left(A , B\right) = | {x}_{A} - {x}_{B} | = | 2 - 7 | = | - 5 | = 5$.

Similarly the distance between $C = \left(4 , 9\right)$ and $D = \left(4 , 1\right)$ can be computed by subtracting the $y$-coordinates: $d \left(C , D\right) = | {x}_{C} - {x}_{D} | = | 9 - 1 | = | 8 | = 8$.

Now we have all the ingredients we need. In fact, let's think about computing the distance between the points $A$ and $C$ previously defined. They belong to a straight line that it's neither horizontal nor vertical. But we can trace an horizontal straight line through $A$ and a vertical straight line through $C$. If we call $H$ their intersection point, $A C H$ is a right triangle and $A C$ is the hypotenuse

So to compute the distance between $A$ and $C$ we can compute the distance between $A$ and $H$ (they lie on an horizontal line), and the distance between $C$ and $H$ (they lie on a vertical line). Using the Pythagorean Theorem, we can then compute the length hypotenuse $A C$ i.e. the distance between $A$ and $C$:

$d \left(A , C\right) = \sqrt{{\left[d \left(A , H\right)\right]}^{2} + {\left[d \left(C , H\right)\right]}^{2}} = \sqrt{| {x}_{A} - {x}_{H} {|}^{2} + | {y}_{C} - {y}_{H} {|}^{2}} = \sqrt{{\left({x}_{A} - {x}_{H}\right)}^{2} + {\left({y}_{C} - {y}_{H}\right)}^{2}}$

We got rid of the absolute values because squaring a number $z$ or $- z$ gives the same result.

Now, since $A$ and $H$ lay on the same horizontal line, then ${y}_{A} = {y}_{H}$. Similarly, since $C$ and $H$ lay on the same vertical line, then ${x}_{C} = {x}_{H}$. So we can remove the dependency from $H$:

$d \left(A , C\right) = \sqrt{{\left({x}_{A} - {x}_{H}\right)}^{2} + {\left({y}_{C} - {y}_{H}\right)}^{2}} = \sqrt{{\left({x}_{A} - {x}_{C}\right)}^{2} + {\left({y}_{C} - {y}_{A}\right)}^{2}} = \sqrt{{\left({x}_{A} - {x}_{C}\right)}^{2} + {\left({y}_{A} - {y}_{C}\right)}^{2}}$

NOTE:
The contemporary way of thinking of distances is significantly different. Nowadays, the definition of distance between two points deeply influences the geometry of the space you work in, and the euclidean distance (the one that corresponds to Euclidean Geometry) is just one of the (infinitely-)many possible choices. So given - for example - a plane, one has first to define how the distance is computed and from this it will automatically follow the geometry of the plane (i.e. which lines can be called "straight", which are the triangles, ...) and if the Pythagorean Theorem (or some variation of it) holds. More technical details can be found in Wikipedia's article about enter link description here .

It may seem an abstract useless thing, but it's tremendously useful: Einstein's relativity and other important sector of physics are built on this. A curious and (hopefully) easy-to-understand example is the taxicab distance .