Inigo Quilez   ::     ::  
As we all know, the area of a triangle defined by its 3D coordinates in space, is given by

S = ½ |ei ⊗ ej|

where ⊗ is the cross product. So the area is half the length of the cross product of any two of its edge vectors. Or in other wirds, half the length of its surface normal. This involves a single square root, and works great when all you have is the vertices of your triangle in 3D space. However, supose you want to use the also prety famous formula of Heron, which gives the area based on the length of its sides:

S2 = s⋅(s-a)⋅(s-b)⋅(s-c)

where s is half the perimeter of the triangle and which with a bit of algebra can be rearranged to require also a single square root evaluation:

S2 = (a+b+c)⋅(-a+b+c)⋅(a-b+c)⋅(a+b-c)/16.

However, one might quickly think that actually this formula requires four square roots, for the values of a, b and c need to be computed based on the edges (well, vertices) of the triangle.

When I first encountered this I suspected there was something to uncover in Heron's formula, a bigger truth that was not immediately evident, since we do know the area of a triangle can be computed with a single square root with the traditiona normal/cross product/bivector formula (choose the name of your interpretation). And if the same mathematical property can be described by two different expresions, these must be equivalent...

So I started doing some algebra and this is what I got:

S2 = (2a2b2 + 2b2c2+ 2c2a2 − a4 − b4 − c4)/16

which, indeed expresses the area of our triangle only in terms of the squares over its three edges and one square root! If we rename the squares of the edges as A = a2, B = b2 and C = c2, then the expression becomes:

S2 = (2AB + 2BC + 2CA − A2 − B2 − C2)/16