The law of cosines, also called Carnot’s theorem, is the generalisation of Pythagoras’ theorem to general triangles: it links the three sides of a triangle to the cosine of one of its angles. We look at its statement, an elegant proof via the scalar product and an example of its application to solving a triangle whose two sides and included angle are known.