The Distance Formula
You know that thedistance between two points in a plane withCartesiancoordinatesand由以下公式给出:
The distance formula is really just thePythagorean Theorem在伪装。
To calculate the distancebetween pointand, first draw a right triangle which has the segmentas its hypotenuse.
If the lengths of the sides areand, then by the Pythagorean Theorem,
Solving for the distance, we have:
Sinceis a horizontal distance, it is just the difference between the-coordinates:. Similarly,is the vertical distance.
Since we're squaring these distances anyway (and squares are always non-negative), we don't need to worry about those absolute value signs.
Example:
Find the distance between pointsandin the figure above.
In the above example, we have:
so
or approximatelyunits.