Where does this formula for area of a triangle come from?

219 Views Asked by At

I'm not good at entering formulas into text editors so I'm going to paste a few lines of code here:

Given an arbitrary triangle formed by points 1, 2 and 3, where side-lengths a, b and e are as follows:

a = dist (1,3) b = dist (3,2) e = dist (1,2)

d = (bb - aa + e*e) / (2*e)

c = e - d

hh = a * a - c * c

h = sqr(hh)

area = .5 * (ch + hd)

This does not seem to be "Heron's Formula" - so does it have a name?

1

There are 1 best solutions below

0
On

Everything in your post is consistent with the diagram below, in which $c + d = e$, or $c = e - d$, hence $$ c^{2} = (e - d)^{2} = e^{2} - 2de + d^{2} \tag{1} $$ and, by the Pythagorean theorem, $$ h^{2} = a^{2} - c^{2}, \tag{2} $$ so \begin{align*} d^{2} &= b^{2} - h^{2} && \text{Pythagorean theorem} \\ &= b^{2} - (a^{2} - c^{2}) && \text{equation (2)} \\ &= b^{2} - a^{2} + c^{2} && \\ &= b^{2} - a^{2} + e^{2} - 2de + d^{2} && \text{equation (1).} \end{align*} Canceling the $d^{2}$s and solving for $d$ gives $$ d = \frac{b^{2} - a^{2} + e^{2}}{2e} $$ as you say, and the area of the triangle is $$ \tfrac{1}{2}eh = \tfrac{1}{2}(c + d)h = \tfrac{1}{2}(ch + dh). $$ This formula does not have a standard name other than "the area of a triangle of height $h$ and base $e$".

The area of a triangle by dividing into two right triangles