Theorem 3.4: (Pythagoras) Let f d, and r be the three sides of a triangle.
The triangle is a right triangle if and only if
Proof: If the lines determined by OF and FA are horizontal or vertical, then the result follows from the distance formula, so we can assume that the line determined by FA is not vertical or horizontal, in which case it will have an equation of the form y = mx + b by Theorem 1.2, (m not 0).
Assume the triangle is a right triangle, with r the hypoteneuse. Let O and A be the end points of the hypoteneuse, and let F be the point at the right angle. Consider the circle centered at O with radius r.
Let O = (x_{o}, y_{o}), and let A = (x_{1}, y_{1}). By Theorem 3.3, the line may intersect the circle at another point which we will call B = (x_{2}, y_{2}). Then the equation of the line will be y = mx + b, where b is the y-intercept pictured above, and m is the slope computed using the points (x_{1}, y_{1}) and (x_{2}, y_{2}). Since OF and AF are perpendicular, F is the foot of (x_{o}, y_{o}), the center of the circle in the line y = mx + b, so by Theorem 1.10 its coordinates are
By Theorem 3.3,
so by Theorem 1.5,
But, by Theorem 1.11, the perpendicular distance from the point O to the line AF is
so
Square both sides
and add f^{2 } to both sides.
For the converse, assume that a^{2} + f^{2} = r^{2}
f^{2} = (x_{1} - x_{3 })^{2} + (y_{1} - y_{3 })^{2}
r^{2} = (x_{2} - x_{1 })^{2} + (y_{2} - y_{1 })^{2}
so, if
a^{2} + f^{2} = r^{2 }
then
(x_{2} - x_{3 })^{2} + (y_{2} - y_{3 })^{2} + (x_{1} - x_{3 })^{2} + (y_{1} - y_{3 })^{2} = (x_{2} - x_{1 })^{2} + (y_{2} - y_{1 })^{2}
x_{2}^{2} - 2x_{2}x_{3} + x_{3}^{2} + y_{2}^{2} - 2y_{2}y_{3} + y_{3}^{2} + x_{1}^{2} - 2x_{1}x_{3} + x_{3}^{2} + y_{1}^{2} - 2y_{1}y_{3} + y_{3}^{2} = x_{1}^{2} - 2x_{1}x_{2} + x_{2}^{2} + y_{1}^{2} - 2y_{1}y_{2} + y_{2}^{2}
Subtract x_{2}^{2} + x_{1}^{2} + y_{2}^{2} + y_{1}^{2 }from both sides and combine the x_{3 }and y_{3 }terms.
- 2x_{2}x_{3} + 2x_{3}^{2} - 2y_{2}y_{3} + 2y_{3}^{2} - 2x_{1}x_{3} - 2y_{1}y_{3} =- 2x_{1}x_{2} - 2y_{1}y_{2}
Divide both sides by 2.
- x_{2}x_{3} + x_{3}^{2} - y_{2}y_{3} + y_{3}^{2} - x_{1}x_{3} - y_{1}y_{3} = -x_{1}x_{2} - y_{1}y_{2}
Transpose
x_{1}x_{2}- x_{2}x_{3}- x_{1}x_{3} + x_{3}^{2}+ y_{1}y_{2}- y_{1}y_{3} - y_{2}y_{3}+ y_{3}^{2} = 0
These factor
(x_{1} - x_{3})(x_{2} - x_{3}) + (y_{1} - y_{3})(y_{2} - y_{3}) = 0
Transpose
(x_{1} - x_{3})(x_{2} - x_{3}) = -(y_{1} - y_{3})(y_{2} - y_{3})
Divide
and OF is perpendicular to AF.^{1 2}