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 = (xo, yo), and let A = (x1, y1). By Theorem 3.3, the line may intersect the circle at another point which we will call B = (x2, y2). 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 (x1, y1) and (x2, y2). Since OF and AF are perpendicular, F is the foot of (xo, yo), 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 f2 to both sides.
For the converse, assume that a2 + f2 = r2

f2 = (x1 - x3 )2 + (y1 - y3 )2
r2 = (x2 - x1 )2 + (y2 - y1 )2
so, if
a2 + f2 = r2
then
(x2 - x3 )2 + (y2 - y3 )2 + (x1 - x3 )2 + (y1 - y3 )2 = (x2 - x1 )2 + (y2 - y1 )2
x22 - 2x2x3 + x32 + y22 - 2y2y3 + y32 + x12 - 2x1x3 + x32 + y12 - 2y1y3 + y32 = x12 - 2x1x2 + x22 + y12 - 2y1y2 + y22
Subtract x22 + x12 + y22 + y12 from both sides and combine the x3 and y3 terms.
- 2x2x3 + 2x32 - 2y2y3 + 2y32 - 2x1x3 - 2y1y3 =- 2x1x2 - 2y1y2
Divide both sides by 2.
- x2x3 + x32 - y2y3 + y32 - x1x3 - y1y3 = -x1x2 - y1y2
Transpose
x1x2- x2x3- x1x3 + x32+ y1y2- y1y3 - y2y3+ y32 = 0
These factor
(x1 - x3)(x2 - x3) + (y1 - y3)(y2 - y3) = 0
Transpose
(x1 - x3)(x2 - x3) = -(y1 - y3)(y2 - y3)
Divide
![]()
and OF is perpendicular to AF.1 2