Triangle area formulas: two case studies in “the shape of the answer”

“Heron’s formula”, to find the area of a triangle from the lengths of the three sides, can be found (though not proved) just by thinking about the necessary shape of the formula, and then considering a few simple special cases.

The same with the “shoelace” or “surveyor’s” formula to find the area from the coordinates of the three vertices.

This exercise is useful for three reasons. First, to learn the power of using considerations of symmetry and simple special cases in mathematical reasoning.

Second, just to find, or remember, the formulas. In real life (unlike school maths) you can’t set out to prove a mathematical result unless you already have some idea what the result is and that it looks likely to be true.

Third, because these are useful formulas.


First, Heron’s formula. What is the area A of a triangle with sides a, b, c?

Something like

\frac{1}{2}abc

can’t be right because it has the wrong dimensionality. If a, b, c are measured in metres, that would give us an area in cubic metres. But the area must be some number of square metres.

What about something like this?

\frac{1}{2}(a+c)(b+c)

That can’t be right because the formula is not symmetrical in a, b, and c (i.e. unchanged if you swap round those three quantities) as it has to be.

To get something on the right-hand side symmetrical in a, b, and c it looks like we need three brackets.

Another problem with the formulas we have so far is that the area must be zero if, for example, a + b = c.

That suggests something like:

k {[(-a+b+c)(a-b+c)(a+b-c)]}^{\frac{2}{3}}

with k some constant, and the power \frac{2}{3} to get the right dimensionality.

In the first place, \frac{2}{3} looks too complicated to be likely. In the second place, oddly, this formula can’t be right because it works too well. If a + b < c, for example, then the sides a, b, c don't form a triangle at all, and the formula should break down.

The simplest function of a, b, c which gives a value of zero when a + b = c and breaks down when a + b < c is

\sqrt {a+b-c}

so that suggests something like:

k \sqrt{(-a+b+c)(a-b+c)(a+b-c)(\ldots)}

We need another bracket in the formula, a bracket which is linear and symmetrical in a, b, and c, to give us the right dimensionality.

The simplest choice would be a + b + c. So let’s try that:

k \sqrt{(-a+b+c)(a-b+c)(a+b-c)(a+b+c)}

Right dimensionality. Gives zero in the right cases. Breaks down in the right cases. Let's try it out with a few sample triangles and see whether it works and what k has to be.

The formula can also be written

k \sqrt{(c-(a-b))(c+(a-b))[(a+b-c)(a+b+c)]}

or k \sqrt{(c^2-(a-b)^2)((a+b)^2-c^2]} \qquad \qquad [1]

so if the triangle is right-angled and c^2=a^2+b^2

then the formula gives us k \sqrt{2ab \cdot 2ab} = 2kab

which is good if k = \frac{1}{4}

Try an equilateral triangle with sides 1, 1, 1 and the formula gives k \sqrt{3} , which again is good if k = \frac{1}{4} .

All looking good:

\frac{1}{4} \sqrt{(-a+b+c)(a-b+c)(a+b-c)(a+b+c)}

Exercise 1

Use the version [1] of the formula, above, to prove the formula from the cosine rule.

Exercise 2

Prove the formula by:

proving that at least two of the triangle’s angles must be acute

letting those be the angles at B and C

dropping a perpendicular from A onto BC, cutting BC into BD of length x and DC of length a-x

noting that if the height AD is called h, then the area is ½ha

using Pythagoras in triangles ADB and ADC to get two equations for h both in terms of x, a, b, and c, and then eliminating x.


Neither of those two proofs is particularly neat, if only because they require breaking the symmetry of the problem. The second one is a bit longer, but has the advantage that it requires no knowledge of trigonometry.

The formula we have is usually written as

\sqrt{s(s-a)(s-b)(s-c)} where s is the semi-perimeter, (a+b+c)/2


Second problem: what is the area of a triangle with vertices as follows?

(x_1, y_1), (x_2, y_2), (x_3, y_3)

We could get a formula here by calculating all the side-lengths using Pythagoras, then using Heron’s formula. But that would be a lot of working. And in fact the formula here is simpler than Heron’s formula. Let’s see.

In this case the formula has to be symmetrical again. In more ways. It has to give the same answer when we swap, for example,

(x_1, y_1) \quad and \quad (x_2, y_2)

and the same answer again when we have

x_1 = x_2 \quad and \quad y_1 = y_2

and the same answer when we swap the x’s and the y’s (i.e. relabel the axes)

and the same answer when we add a constant factor a to all the x-coordinates, or a constant factor b to all the y-coordinates (i.e. we shift the origin, or we shift the triangle (translate it))

and the same answer when we rotate the triangle.

Looks like you can’t do it just by multiplying brackets, like

(x_1 - x_2)(y_1 - y_2)

because then you would get zero if

either x_1 = x_2 \quad or \quad y_1 = y_2

Aha! We know a mathematical form which

Determinants! Let’s see. It has to be at least a 3×3 determinant, to have space for all the coordinates, so let’s try:

\begin{vmatrix}  k & k & k\\  x_1 & x_2 & x_3\\  y_1 & y_2 & y_3  \end{vmatrix}

If we put a non-zero constant k in each element of the first row, then this looks promising.

It is zero if any two of the vertices are the same.

Generally speaking it tends to get bigger if the differences between coordinates (rather than necessarily the coordinates themselves) get bigger.

It’s symmetrical both if you swap the three vertices and if you swap the axes (x and y)

It stays the same if we add a constant a to each element in the x-row, or if we add a constant b to each element in the y-row (row operations!)

It stays the same if we rotate the points (which means applying a 2×2 rotation matrix to each minor in the determinant as we calculate it from the first row)

And it’s a determinant.

There is one quirk, which is that the formula will make areas negative when we swap axes. But we remember that when we’re working with determinants we consider areas as negative when they are “flipped”, so that’s not fatal. In fact our final formula gives the triangle’s area as positive if we list the vertices in anticlockwise order, negative if we list them clockwise. Not a disaster.

Make it simpler by putting 1 in the first row, and we get (for some constant k)

k \begin{vmatrix}  1 & 1 & 1\\  x_1 & x_2 & x_3\\  y_1 & y_2 & y_3  \end{vmatrix}

and in fact that’s it. Try it out on a triangle with vertices (0,0), (1,0), and (0,1), and you find that k = ½

Exercise 3

The given triangle will have the same area as the triangle with vertices at

(0, 0), (x_2-x_1, y_2-y_1), (x_3-x_1, y_3-y_1)

But that triangle can be got from the triangle with vertices (0,0), (1,0), and (0,1) by the linear transformation

\begin{pmatrix}  x_2-x_1 & x_3-x_1\\  y_2-y_1 & y_3-y_1  \end{pmatrix}

Use what you know about determinants, areas, and row operations on determinants to prove the area formula

\frac{1}{2} \begin{vmatrix}  1 & 1 & 1\\  x_1 & x_2 & x_3\\  y_1 & y_2 & y_3  \end{vmatrix}

Exercise 4

That proof is not a neat one, since it breaks the symmetry. If you know about cross-products of 3-vectors, and the vector formula for the volume of a tetrahedron, use that knowledge (and your knowledge of row operations in determinants) to get the formula for the area of the triangle from the volume of the tetrahedron defined by the three vectors

(x_1,y_1,1), (x_2,y_2,1), (x_3,y_3,1)