Formula for Distance Between Two Points
First, consider one-dimensional case. If `a` and `b` - are two points of coordinate line, then the distance between them `rho (a;b)` is expressed by the formula `rho (a;b)=|a-b|` . It is clear, that `rho(a;b)=rho(b;a)` . So, `rho(-2;5)=|-2-5|=|-7|=-(-7)=7`.
Example 1. Find all such points `x` that `|x-1|=3`.
Points `x`, distance to which from point 1 equals 3 satisfy given equation. These are points are -2 and 4. So, the equation has two roots: -2 and 4.
Example 2. Find all such points `x` that `|x+1|<=2`:
Points `x`, distance to which from point -1 is less or equal to 2 satisfy given equation. These are points of segment [-3,1].
Example 3. Find all such points `x` that `|x+1|>2`.
Points `x`, distance to which from point -1 is greater than 2 satisfy given equation. These are points of two open rays: from `-oo` to -3 and from 1 to `+oo`. We can write the answer as `(-oo,-3)uu(1,+oo)`.
Now, let's consider two-dimensional case. Suppose we are given two points with coordinates `A(x_1,y_1)` and `B(x_2,y_2)`.
We need to find distance between them. Let's draw these points on coordinate plane. We already know from one-dimensional case that `|BC|=|x_2-x_1|` and `|AC|=|y_2-y_1|`.
Now, from right-angled triangle `ABC` we find using Pythagorean theorem that `|AB|=sqrt(|BC|^2+|AC|^2)=sqrt((x_2-x_1)^2+(y_2-y_1)^2)`.
Distance between points `A(x_1,y_1)` and `B=(x_2,y_2)` is `d=sqrt((x_2-x_1)^2+(y_2-y_1)^2)`.
Example 4. Find distance between points `A(2,-3)` and `B(-7,-1)`.
Such sort of example is pretty easy, just pay attention to signs.
Example 5. Find radius of circle with center `A(-1,3)` if point `B(3,5)` lies on circle.
Radius of circle is distance between center and any point on circle. Therefore, `r=sqrt((3-(-1))^2+(5-3)^2)=sqrt((4)^2+(2)^2)=sqrt(16+4)=sqrt(20)=2sqrt(5)`.