Law of Cosines. In trigonometry, the Law of Cosines relates the sides and angles of triangles. Given the triangle below, where A, B, and C are the angle measures of the triangle, and a, b, and c are its sides, the Law of Cosines states: a 2 = b 2 + c 2 - 2bc·cos (A) b 2 = a 2 + c 2 - 2ac·cos (B) c 2 = a 2 + b 2 - 2ab·cos (C)