Proof: Let be the foot of the perpendicular dropped from vertex to the line . We will prove that the equation holds for three cases: when is acute, right, or obtuse.
Case i. (Acute Angle)
In the right triangle :
Also,
In the right triangle , applying the Pythagorean theorem:
Substitute the values:
Since , we get:
Case ii. (Right Angle)
In the right triangle , , so:
Case iii. (Obtuse Angle)
In the right triangle :
Also,
In the right triangle , applying the Pythagorean theorem: