# Difference between revisions of "Distance formula"

The distance formula is a direct application of the Pythagorean Theorem in the setting of a Cartesian coordinate system. In the two-dimensional case, it says that the distance between two points $P_1 = (x_1, y_1)$ and $P_2 = (x_2, y_2)$ is given by $d = \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$. In the $n$-dimensional case, the distance between $(a_1,a_2,...,a_n)$ and $(b_1,b_2,...,b_n)$ is $\sqrt{(a_1-b_1)^2+(a_2-b_2)^2+\cdots+(a_n-b_n)^2}$