Heron's Formula

Area of a Triangle from Its Three Sides

Introduction

Let $a, b, c$ denote the side lengths of a triangle $ABC$ opposite to vertices $A, B, C$ respectively. Define the semiperimeter $s$ as

$$s = \frac{a+b+c}{2} \tag{1}$$

Then the area $S$ of triangle $ABC$ is given by

Heron's Formula

$$S = \sqrt{s(s-a)(s-b)(s-c)} \tag{2}$$

This formula computes the area from the three side lengths alone, making it extremely useful when coordinates or angles are unknown. It was presented by Heron of Alexandria in his work Metrica in the 1st century AD.

Triangle ABC
Figure 1: A triangle with side lengths $a, b, c$ and area $S$

Proof 1: Algebraic Proof Using the Law of Cosines

Drop a perpendicular of length $h$ from $A$ to side $BC$ (Figure 2). Since the area of a triangle equals base times height divided by 2,

Triangle ABC with altitude h
Figure 2: The altitude $h$ from $A$ to side $BC$

we can write

$$S = \frac{ah}{2} \tag{3}$$

The altitude $h$ can be expressed using the angle $C$:

\begin{align} h &= b \sin C \tag{4} \\ &= b \sqrt{1 - \cos^2 C} \tag{5} \\ &= b \sqrt{(1+\cos C)(1-\cos C)} \tag{6} \end{align}

where we used $\sin C > 0$ since $0 < C < \pi$. The law of cosines gives

$$c^2 = a^2 + b^2 - 2ab\cos C \tag{7}$$

so that

$$\cos C = \frac{a^2 + b^2 - c^2}{2ab} \tag{8}$$

Substituting (8) into (6),

\begin{align} h &= b \sqrt{\left(1 + \frac{a^2+b^2-c^2}{2ab}\right)\left(1 - \frac{a^2+b^2-c^2}{2ab}\right)} \\ &= b \sqrt{\frac{a^2+2ab+b^2-c^2}{2ab} \cdot \frac{-(a^2-2ab+b^2-c^2)}{2ab}} \\ &= \frac{1}{2a}\sqrt{-\{(a+b)^2-c^2\}\{(a-b)^2-c^2\}} \tag{9} \end{align}

Substituting (9) into (3),

\begin{align} S &= \frac{a}{2} \cdot \frac{1}{2a}\sqrt{-\{(a+b)^2-c^2\}\{(a-b)^2-c^2\}} \\ &= \frac{1}{4}\sqrt{-\{(a+b)+c\}\{(a+b)-c\}\{(a-b)+c\}\{(a-b)-c\}} \\ &= \frac{1}{4}\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)} \tag{10} \end{align}

In the last step we reordered the factors and absorbed the minus sign into $(a-b-c)$. Using $s = (a+b+c)/2$ from (1),

\begin{align} S &= \frac{1}{4}\sqrt{2s \cdot 2(s-a) \cdot 2(s-b) \cdot 2(s-c)} \\ &= \frac{1}{4}\sqrt{16\,s(s-a)(s-b)(s-c)} \\ &= \sqrt{s(s-a)(s-b)(s-c)} \tag{11} \end{align}

This is Heron's formula (2). $\blacksquare$

Proof 2: Visual Proof Using the Incircle

The following elegant proof, due to R. B. Nelsen (2001), illustrates each step with diagrams. It derives Heron's formula via two lemmas.

Lemma 1: $S = rs$

Let $I$ be the center and $r$ the radius of the incircle of the triangle (Figure 3). The angle bisectors from each vertex pass through $I$. Dropping perpendiculars from $I$ to each side partitions the triangle into six right triangles (Figure 4).

Since two tangent segments from an external point to a circle have equal length, the tangent lengths from each vertex are:

  • From vertex $A$: $x$ (on both sides $AB$ and $CA$)
  • From vertex $B$: $y$ (on both sides $AB$ and $BC$)
  • From vertex $C$: $z$ (on both sides $BC$ and $CA$)

From the side lengths we obtain the system of equations:

$$\left\{\begin{aligned} y + z &= a & \text{...(i)} \\ z + x &= b & \text{...(ii)} \\ x + y &= c & \text{...(iii)} \end{aligned}\right.$$

Adding (i)+(ii)+(iii) gives $2(x+y+z) = a+b+c = 2s$, so

$$x+y+z = s \tag{iv}$$

Subtracting (i), (ii), (iii) from (iv) respectively,

\begin{align} x &= \underbrace{(x+y+z)}_{s} - \underbrace{(y+z)}_{a} = s - a \\ y &= \underbrace{(x+y+z)}_{s} - \underbrace{(z+x)}_{b} = s - b \\ z &= \underbrace{(x+y+z)}_{s} - \underbrace{(x+y)}_{c} = s - c \end{align}

That is,

$$x = s - a,\quad y = s - b,\quad z = s - c \tag{12}$$
Incircle and tangent lengths
Figure 3: The incircle with center $I$, showing tangent lengths on each side

The six right triangles form three congruent pairs with legs $(r, x), (r, x), (r, y), (r, y), (r, z), (r, z)$.

Six right triangles
Figure 4: The triangle partitioned into six right triangles. Solid and hatched regions of the same color form congruent pairs

Rearranging these six right triangles, they tile a rectangle of height $r$ and width $x + y + z = s$ (Figure 5).

$$S = r(x + y + z) = rs \tag{13}$$
Visual proof of S=rs
Figure 5: The six right triangles tile a rectangle $r \times s$, proving $S = rs$

Lemma 2: $xyz = r^2 s$

In the six right triangles of Figure 4, let $\alpha, \beta, \gamma$ be the half-angles at each vertex created by the angle bisectors. Since the interior angles of a triangle sum to $\pi$,

$$\alpha + \beta + \gamma = \frac{\pi}{2} \tag{14}$$

From each right triangle (Figure 6),

$$\tan\alpha = \frac{r}{x},\quad \tan\beta = \frac{r}{y},\quad \tan\gamma = \frac{r}{z} \tag{15}$$
Right triangles with angles
Figure 6: From each pair of right triangles, $\tan\alpha = r/x$, $\tan\beta = r/y$, $\tan\gamma = r/z$

We now prove the following identity for positive angles satisfying (14):

$$\tan\alpha\tan\beta + \tan\beta\tan\gamma + \tan\gamma\tan\alpha = 1 \tag{16}$$

Proof of (16): From (14), $\gamma = \dfrac{\pi}{2} - (\alpha + \beta)$. The complementary angle relation $\tan(\pi/2 - \theta) = 1/\tan\theta$ gives

$$\tan\gamma = \frac{1}{\tan(\alpha+\beta)} \tag{17a}$$

Applying the addition formula $\tan(\alpha+\beta) = \dfrac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}$ and taking the reciprocal,

$$\tan\gamma = \frac{1-\tan\alpha\tan\beta}{\tan\alpha+\tan\beta} \tag{17b}$$

Substituting into the left-hand side of (16),

\begin{align} &\tan\alpha\tan\beta + (\tan\alpha+\tan\beta)\tan\gamma \\ &= \tan\alpha\tan\beta + (\tan\alpha+\tan\beta)\cdot\frac{1-\tan\alpha\tan\beta}{\tan\alpha+\tan\beta} \\ &= \tan\alpha\tan\beta + (1-\tan\alpha\tan\beta) = 1 \quad\blacksquare \end{align}

Substituting (15) into (16),

$$\frac{r^2}{xy} + \frac{r^2}{yz} + \frac{r^2}{zx} = 1 \quad\Longrightarrow\quad \frac{r^2(x+y+z)}{xyz} = 1$$

Since $x + y + z = (s-a)+(s-b)+(s-c) = s$,

$$xyz = r^2 s \tag{18}$$

Main Proof

Squaring Lemma 1 ($S = rs$) gives $S^2 = r^2 s^2$. Substituting Lemma 2 ($xyz = r^2 s$),

$$S^2 = r^2 s \cdot s = xyz \cdot s = s(s-a)(s-b)(s-c) \tag{19}$$

Therefore $S = \sqrt{s(s-a)(s-b)(s-c)}$, completing the proof of Heron's formula. $\blacksquare$

Worked Example

Consider the right triangle with $a = 5,\ b = 4,\ c = 3$ (Figure 8).

3-4-5 right triangle
Figure 8: A right triangle with sides $3, 4, 5$ (area $S = 6$)

The semiperimeter is

$$s = \frac{5+4+3}{2} = 6$$

Applying Heron's formula,

\begin{align} S &= \sqrt{6(6-5)(6-4)(6-3)} \\ &= \sqrt{6 \cdot 1 \cdot 2 \cdot 3} = \sqrt{36} = 6 \end{align}

This agrees with base $4 \times$ height $3 \div 2 = 6$.

References