Where the formula comes from
Draw the perpendicular from vertex C to side c. It splits the triangle into two right-angled triangles, and the one at A has sides b cos A and b sin A. Pythagoras’ theorem in the other one gives a² = (c − b cos A)² + (b sin A)² = b² + c² − 2bc cos A.
That is why the cosine rule is sometimes called a generalised form of Pythagoras’ theorem.
