Show that the area of a triangle with side lengths $a$, $b$, and $c$ is: \[A = \sqrt{s(s-a)(s-b)(s-c)}\] where $s$ is the semiperimeter (half the perimeter): \[s = \frac{a + b + c}{2}.\] This is called Heron’s formula, after the ancient mathematician Heron (or Hero) of Alexandria. Show hint
The area $A$ of the triangle is $bh/2$ where $h$ is the height of the triangle: with $b_1 + b_2 = b$. From Pythagoras’ theorem, \[c^2 = h^2 + b_1^2\] and \[a^2 = h^2 + b_2^2.\] We need to find an expression for $h$ in terms of $a$, $b$, and $c$, so let’s try to eliminate $b_1$ and $b_2$: \begin{align*} a^2 &= h^2 + b_2^2\\ &= h^2 + (b - b_1)^2\\ &= h^2 + b^2 - 2bb_1 + b_1^2\\ &= h^2 + b^2 - 2bb_1 + (c^2 - h^2)\\ &= b^2 - 2bb_1 + c^2\\ b_1 &= \frac{b^2 + c^2 - a^2}{2b} \end{align*} Now we can solve for $h$: \begin{align*} h^2 &= c^2 - b_1^2\\ &= c^2 - \frac{(b^2 + c^2 - a^2)^2}{4b^2}\\ &= \frac{4b^2c^2 - (b^2 + c^2 - a^2)^2}{4b^2} \end{align*} And find $A$: \begin{align*} A &= \frac{bh}{2}\\ A^2 &= \frac{b^2h^2}{4}\\ &= \frac{4b^2c^2 - (b^2 + c^2 - a^2)^2}{16} \end{align*} Now we could expand this, and expand $s(s-a)(s-b)(s-c)$ and show that they’re the same, but that wouldn’t be very satisfying. Instead we can factorise it using the difference of two squares ($x^2 - y^2 = (x-y)(x+y)$, see Section 7.4.3: Expanding and Factorising): \begin{align*} A^2 &= \tfrac{1}{16}\left(4b^2c^2 - (b^2 + c^2 - a^2)^2\right)\\ &= \tfrac{1}{16}\left(2bc - (b^2 + c^2 - a^2)\right)\left(2bc + (b^2 + c^2 - a^2)\right)\\ &= \tfrac{1}{16}(a^2 - b^2 + 2bc - c^2)(b^2 + 2bc + c^2 - a^2)\\ &= \tfrac{1}{16}\left(a^2 - (b - c)^2\right)\left((b + c)^2 - a^2\right)\\ &= \tfrac{1}{16}\left(a - (b - c)\right)\left(a + (b-c)\right)\left((b + c) - a\right)\left((b + c) + a\right)\\ &= \frac{a - b + c}{2}\cdot\frac{a + b - c}{2}\cdot\frac{b + c - a}{2}\cdot\frac{a + b + c}{2}\\ &= (s - b)(s - c)(s - a)s\\ A &= \sqrt{s(s-a)(s-b)(s-c)} \end{align*}