Distance between any two points in a cartesian plane:
Dist form.png
 
Consider any two points \(P(x_1,y_1)\) and \(Q(x_2,y_2)\).
 
Draw \(PR\) perpendicular to \(OS\).
 
Draw \(PT\) perpendicular to \(QS\). Then, \(OR = x_1\), \(OS = x_2\), \(RS = OS - OR = x_2 - x_1 = PT\)
 
\(SQ = y_2\), \(ST = PR = y_1\), \(QT = y_2 - y_1\)
 
Applying Pythagorean theorem, we have:
 
\(PQ^2 = PT^2 + TQ^2\)
 
\(PQ^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2\)
 
\(PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\)
 
Therefore, the distance between any two points can be determined using the formula \(d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\).
 
Let us look at the following example.
 
Example:
Find the distance between the points given in the figure below.
 
 
Figure_2.svg
 
 
The coordinates of point \(A\)(\(x_1\), \(y_1\)) is (\(6\), \(4\)).
 
The coordinates of point \(B\)(\(x_2\), \(y_2\)) is (\(1\), \(-2\)).
 
\(x_1 = 6\)
 
\(x_2 = 1\)
 
\(y_1 = 4\)
 
\(y_2 = -2\)
 
Distance between the points \(A\) and \(B\) can be obtained using the distance formula.
 
\(\text{Distance} = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\)
 
\(= \sqrt{(1 - 6)^2 + (-2 - 4)^2}\)
 
\(= \sqrt{(-5)^2 + (-6)^2}\)
 
\(= \sqrt{25 + 36}\)
 
\(= \sqrt{61}\)
Important!
The distance of a point \(P(x,y)\) from the origin can be determined using the formula:
 
\(OP = \sqrt{x^2 + y^2}\)