Distance Formula, as evident from its name, is used to measure the shortest (straight-line) distance between two points.
A simple derivation of the formula can be obtained by applying this famous theorm.According to this theorem, the hypotenuse of a right-angled triangle can be obtained by
`h^2 = x^2 + y^2`
In the case of distance formula, we can measure the value of x by subtracting x1 from x2. Similarly, the value of y is given by y2-y1 as shown in the figure below.
Eventually, the straight line distance d between the two points `(x_1 , y_1)` and `(x_2 , y_2)` is given by
`d=sqrt((x_2- x_1)^2+ (y_2- y_1)^2 )`