Skip to content

Mathematics · Ch 14 — Properties of Triangles

Cosine Rule

14.2

Cosine Rule

10.2 The Cosine Rule

Theorem. In any △ABC\triangle ABC,

cos⁡A=b2+c2−a22bc,cos⁡B=c2+a2−b22ca,cos⁡C=a2+b2−c22ab.\cos A=\frac{b^2+c^2-a^2}{2bc},\qquad \cos B=\frac{c^2+a^2-b^2}{2ca},\qquad \cos C=\frac{a^2+b^2-c^2}{2ab}.

Equivalently, a2=b2+c2−2bccos⁡Aa^2=b^2+c^2-2bc\cos A and cyclically.

Proof. Place the triangle in coordinates with AA at the origin and BB on the positive xx-axis, so B=(c,0)B=(c,0) (since AB=cAB=c). Then CC lies at C=(bcos⁡A, bsin⁡A)C=(b\cos A,\,b\sin A), because AC=bAC=b and the angle between ACAC and ABAB is AA. The side a=BCa=BC is the distance between BB and CC:

a2=(bcos⁡A−c)2+(bsin⁡A)2=b2cos⁡2A−2bccos⁡A+c2+b2sin⁡2A=b2+c2−2bccos⁡A,a^2=(b\cos A-c)^2+(b\sin A)^2=b^2\cos^2A-2bc\cos A+c^2+b^2\sin^2A=b^2+c^2-2bc\cos A,

using cos⁡2A+sin⁡2A=1\cos^2A+\sin^2A=1. Solving for cos⁡A\cos A gives cos⁡A=b2+c2−a22bc\cos A=\dfrac{b^2+c^2-a^2}{2bc}. Placing BB or CC at the origin instead gives the other two forms by the identical argument. ■\blacksquare

Remark — solving a triangle by SAS/SSS. The cosine rule is the tool of choice exactly when the sine rule cannot get started: given two sides and the included angle (SAS), or all three sides (SSS) with no angle at all. In the SAS case it gives the third side directly; in the SSS case it gives cos⁡A\cos A (and hence AA) directly from the three known sides, after which the sine rule finishes the remaining angles.

Special case. When A=90∘A=90^\circ, cos⁡A=0\cos A=0 and the rule collapses to a2=b2+c2a^2=b^2+c^2, the Pythagorean theorem — the cosine rule is a genuine generalisation of it to non-right triangles.

Worked example. For a=7,b=8,c=9a=7,b=8,c=9: cos⁡A=82+92−722⋅8⋅9=96144=23\cos A=\dfrac{8^2+9^2-7^2}{2\cdot8\cdot9}=\dfrac{96}{144}=\dfrac23, so A=cos⁡−1 ⁣(23)≈48.19∘A=\cos^{-1}\!\left(\dfrac23\right)\approx48.19^\circ.

Detecting the triangle's shape. Because the sign of cos⁡A\cos A is fixed by b2+c2−a2b^2+c^2-a^2, the cosine rule doubles as an angle-classification test: if a2<b2+c2a^2<b^2+c^2 then AA is acute; if a2=b2+c2a^2=b^2+c^2 then A=90∘A=90^\circ; if a2>b2+c2a^2>b^2+c^2 then AA is obtuse. This is often faster than computing the angle numerically when a problem only asks whether the largest angle is obtuse.

A second worked example. For a=5,b=6,c=8a=5,b=6,c=8: since cc is the largest side, check cos⁡C=a2+b2−c22ab=25+36−6460=−360=−0.05\cos C=\dfrac{a^2+b^2-c^2}{2ab}=\dfrac{25+36-64}{60}=\dfrac{-3}{60}=-0.05. As cos⁡C<0\cos C<0, angle CC is obtuse, so this triangle is obtuse-angled at CC — found without ever computing CC itself. …