--------------- Heron's theorem --------------- For any triangle with side lengths a, b, c > 0 that satisfy the triangle inequalities, let s = (a + b + c)/2 be the semiperimeter; then the area is A = √(s (s − a) (s − b) (s − c)). The radicand s (s − a) (s − b) (s − c) is nonnegative and equals 0 exactly when the triangle is degenerate (one side equals the sum of the other two). The formula is symmetric in a, b, c and homogeneous of degree 2, so scaling all sides by a factor k scales the area by k^2. An equivalent identity useful for checking is 16 A^2 = 2 a^2 b^2 + 2 b^2 c^2 + 2 c^2 a^2 − a^4 − b^4 − c^4. In the right-triangle case where c^2 = a^2 + b^2, Heron’s formula reduces to the familiar A = (1/2) a b.