Pythagorean Inequality Theorem: Acute and Obtuse Triangles
How can I use the Pythagorean Theorem to determine if a triangle is acute or obtuse based on the lengths of its sides?
The Pythagorean Inequality Theorem extends the well-known Pythagorean Theorem ($a^2 + b^2 = c^2$) to classify triangles as acute or obtuse based on the relationship between the squares of their side lengths. Here's how it works:
Sides: a = 5, b = 7, c = 8
Calculation:
Comparison: $74 > 64$. Therefore, this is an acute triangle.
Sides: a = 6, b = 8, c = 11
Calculation:
Comparison: $100 < 121$. Therefore, this is an obtuse triangle.
Sides: a = 3, b = 4, c = 5
Calculation:
Comparison: $25 = 25$. Therefore, this is a right triangle.
def triangle_type(a, b, c):
a, b, c = sorted([a, b, c]) # Sort sides to ensure c is the longest
if a**2 + b**2 > c**2:
return "Acute"
elif a**2 + b**2 < c**2:
return "Obtuse"
else:
return "Right"
print(triangle_type(5, 7, 8)) # Output: Acute
print(triangle_type(6, 8, 11)) # Output: Obtuse
print(triangle_type(3, 4, 5)) # Output: Right
Know the answer? Login to help.
Login to Answer