Interactive · 2 questions

Law of cosines

The law of cosines (often abbreviated LoC) states:

For △ABC\triangle ABC with sides a,b,c,a, b, c, the following relationships hold: c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C a2=b2+c2−2abcos⁡Aa^2 = b^2 + c^2 - 2ab\cos A b2=c2+a2−2cacos⁡Bb^2 = c^2 + a^2 - 2ca\cos B This gives us a way to find the third side of a triangle, given two sides and the angle measure between them.

Proof

We focus on proving the acute case of: c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C As the other relationships hold the same way, just by taking different vertices. However, the obtuse triangle case must be taken separately, which is left as an exercise for the reader. :)

Notice that by right triangle trigonometry, AD=bsin⁡CAD = b\sin C CD=bcos⁡CCD = b\cos C Then, it follows that: BD=a−CD=a−bcos⁡CBD = a - CD = a - b\cos C By the pythagorean theorem: c2=AB2=BD2+AD2=(a−bcos⁡C)2+(bsin⁡C)2=a2−2abcos⁡C+b2cos⁡2C+b2sin⁡2C=a2+b2(sin⁡2C+cos⁡2C)−2abcos⁡C\begin{align} c^2 = AB^2 &= BD^2 + AD^2 \\ &= (a - b\cos C)^2 + (b\sin C)^2 \\ &= a^2 - 2ab\cos C + b^2\cos^2 C + b^2\sin^2 C \\ &= a^2 + b^2(\sin^2C + \cos^2C) - 2ab\cos C \end{align} This almost looks like what we want, but there's an annoying sin⁡2C+cos⁡2C\sin^2C + \cos^2C in the middle. However, we note that this equals one (by a trigonometric identity), so we have: c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C As desired.

What is the third side of a triangle with two sides of lengths 33 and 88, with a 60∘60^\circ angle between them?

Choose one answer

Learn a clever approach

Every problem comes with a worked solution, so even one you cannot crack shows you a new way to think. These are real problems from the AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Illustrated · 1 min

The law of cosines simply states that c2=a2+b2−2abcos⁡γc^2 = a^2+b^2-2ab\cos \gamma in which a,b,c,a,b,c, are side lengths, and γ\gamma the is angle between sides aa and bb opposite to side cc.

Now for the proof of the Law Of Cosines

From our triangle, we drop an altitude form point CC to side cc, and call the foot of that altitude DD.

so CB‾=a\overline{CB}=a,AC‾=b\overline{AC}=b, AB‾=c\overline{AB}=c, and ∠ACB=γ\angle ACB= \gamma.Let angle A=αA=\alpha and B=βB= \beta.Thus, DB‾=acos⁡β\overline{DB}= a \cos \beta and AD‾=bcos⁡α\overline{AD}= b \cos \alpha. Adding those together gives c=acos⁡β+bcos⁡α.c=a \cos \beta+ b\cos \alpha. Multiplying both sides by cc gives c2=accos⁡β+bccos⁡α(1).c^2=a c\cos \beta+ bc\cos \alpha \quad \text{(1)}.

We apply the same procedure to AC‾\overline{AC} and CB‾\overline{CB}, writing them in terms of angles and the other sides and multiplying through by whatever side we are rewriting, to get a2=accos⁡β+abcos⁡γ(2)b2=bccos⁡α+abcos⁡γ(3)\begin{align*} a^2&=a c\cos \beta+ ab\cos \gamma \quad \text{(2)}\\ b^2&=b c\cos \alpha+ ab\cos \gamma \quad \text{(3)} \end{align*}

Adding (2)\text{(2)} and (3)\text{(3)}, we get a2+b2=accos⁡β+bccos⁡α+2abcos⁡γ(4).a^2 + b^2 = ac\cos\beta + bc\cos\alpha + 2ab\cos\gamma \quad \text{(4)} .

Subtracting (1)\text{(1)} from (4)\text{(4)}, we get a2+b2−c2=−accos⁡β−bccos⁡α+accos⁡β+bccos⁡α+2abcos⁡γ,a^2 + b^2 - c^2 = - ac\cos\beta - bc\cos\alpha+ ac\cos\beta + bc\cos\alpha + 2ab\cos\gamma , which simplifies down to c2=a2+b2−2abcos⁡γ,c^2 = a^2 + b^2 - 2ab\cos\gamma, As desired.

Interactive · 10 questions

You are strongly encouraged to draw your own diagram so that you can play along more easily.

Here's a problem:

Consider a triangle ABCABC with AB=10,AC=16,AB=10, AC=16, and ∠BAC=60∘.\angle BAC=60^\circ. Find the length of BC.BC.

Well, this is kinda difficult, and we don't immediately have any tools to do this.

What do we do?

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems