Allday Education

Law of Sines & Law of Cosines

Right-triangle trig only works on right triangles. The Law of Sines and the Law of Cosines are the tools for every other triangle — they let you solve for missing sides and angles in any triangle at all, as long as you know enough pieces to pin the triangle down.

Students rarely struggle with the formulas themselves; the real question is which law to reach for. The decision comes down to what you're given. If you know an angle and the side directly across from it, the Law of Sines works. If you know two sides and the angle between them, or all three sides, you need the Law of Cosines. This article covers both formulas and drills that decision.

The Law of Sines

Label the triangle so side aa is opposite angle AA, side bb is opposite angle BB, and side cc is opposite angle CC. The Law of Sines says the ratio of each side to the sine of its opposite angle is the same all the way around: asinA=bsinB=csinC\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C}.

To use it, you need one complete pair — an angle and the side opposite it — plus one more piece (another side or another angle). Set two of the ratios equal, and the equation has exactly one unknown. That's the situations ASA, AAS, and SSA: any setup where a matched angle-side pair is available.

Remember that a triangle's angles sum to 180180^\circ, so knowing any two angles hands you the third for free. That's often the move that completes your pair.

The standard labeling is shown below: each side is named with the lowercase letter of the angle directly across from it, so side aa faces angle AA, side bb faces BB, and side cc faces CC.

cc
aa
bb
AA
BB
CC

The Law of Cosines

The Law of Cosines is the Pythagorean theorem with a correction term for the angle: c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C, where CC is the angle between sides aa and bb, and cc is the side opposite it. If C=90C = 90^\circ, then cosC=0\cos C = 0 and the formula collapses to c2=a2+b2c^2 = a^2 + b^2 — the right-triangle case exactly.

Use it in the two situations the Law of Sines can't touch. SAS: you know two sides and the included angle, and you want the third side — plug straight in. SSS: you know all three sides and want an angle — solve the formula for the cosine first, cosC=a2+b2c22ab\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}, then apply the inverse cosine.

One sign trap: if the angle you find has a negative cosine, the angle is obtuse. Don't discard the negative — cos1\cos^{-1} of a negative number correctly returns an angle between 9090^\circ and 180180^\circ.

Choosing in three seconds

Scan the given information for a matched pair: an angle whose opposite side you also know. Pair available (or buildable with the 180180^\circ angle sum) — Law of Sines, it's less work. No pair — you must have SAS or SSS, and that's the Law of Cosines.

One caution on SSA, the case where you know two sides and a non-included angle: it's called the ambiguous case because the given information can sometimes fit two different triangles. When you solve SSA with the Law of Sines, check whether the supplement of the angle you found also makes a valid triangle. ASA, AAS, SAS, and SSS never have this problem.

Worked examples

Example 1: Law of Sines for a missing side

In triangle ABCABC, mA=30m\angle A = 30^\circ, mB=45m\angle B = 45^\circ, and a=10a = 10. Find bb.

We know angle AA and its opposite side aa — a complete pair, so use the Law of SinesbsinB=asinA\dfrac{b}{\sin B} = \dfrac{a}{\sin A}
Substitutebsin45=10sin30\dfrac{b}{\sin 45^\circ} = \dfrac{10}{\sin 30^\circ}
Use the exact values sin45=22\sin 45^\circ = \dfrac{\sqrt{2}}{2} and sin30=12\sin 30^\circ = \dfrac{1}{2}b=102212\displaystyle b = \dfrac{10 \cdot \frac{\sqrt{2}}{2}}{\frac{1}{2}}
Simplify — dividing by one half doubles the numeratorb=10214.1b = 10\sqrt{2} \approx 14.1

Answer: b=10214.1b = 10\sqrt{2} \approx 14.1 (rounded to the nearest tenth)

Example 2: Law of Sines for a missing angle

In triangle ABCABC, mB=40m\angle B = 40^\circ, b=10b = 10, and a=7a = 7. Find mAm\angle A.

Angle BB and side bb form the known pair; side aa is across from the unknown anglesinAa=sinBb\dfrac{\sin A}{a} = \dfrac{\sin B}{b}
SubstitutesinA7=sin4010\dfrac{\sin A}{7} = \dfrac{\sin 40^\circ}{10}
Solve for sinA\sin AsinA=7sin40100.45\sin A = \dfrac{7\sin 40^\circ}{10} \approx 0.45
Apply the inverse sinemA26.7m\angle A \approx 26.7^\circ

Answer: mA26.7m\angle A \approx 26.7^\circ (rounded to the nearest tenth; since a<ba < b, angle AA must be smaller than 4040^\circ, so the acute answer is the right one)

Example 3: Law of Cosines with SAS

Two sides of a triangle measure 55 and 88, and the angle between them is 6060^\circ. Find the third side.

Two sides and the included angle — no matched pair, so use the Law of Cosinesc2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C
Substitute a=5a = 5, b=8b = 8, C=60C = 60^\circc2=52+822(5)(8)cos60c^2 = 5^2 + 8^2 - 2(5)(8)\cos 60^\circ
Use the exact value cos60=12\cos 60^\circ = \dfrac{1}{2}c2=25+648012=8940=49c^2 = 25 + 64 - 80 \cdot \dfrac{1}{2} = 89 - 40 = 49
Take the square rootc=7c = 7

Answer: c=7c = 7 exactly

Example 4: Law of Cosines with SSS

A triangle has sides 55, 66, and 77. Find the measure of the largest angle.

The largest angle sits opposite the longest side, so let c=7c = 7cosC=a2+b2c22ab\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}
Substitute a=5a = 5, b=6b = 6, c=7c = 7cosC=25+36492(5)(6)\cos C = \dfrac{25 + 36 - 49}{2(5)(6)}
Simplify the fractioncosC=1260=15\cos C = \dfrac{12}{60} = \dfrac{1}{5}
Apply the inverse cosinemC=cos1(15)78.5m\angle C = \cos^{-1}\left(\dfrac{1}{5}\right) \approx 78.5^\circ

Answer: mC78.5m\angle C \approx 78.5^\circ (rounded to the nearest tenth)

Try one yourself

1111
88
xx
5050^\circ

Common questions

How do I decide between the two laws quickly?

Look for a matched pair: an angle you know whose opposite side you also know. If you have one — or can build one using the fact that the angles sum to 180180^\circ — use the Law of Sines. If you have two sides with the included angle (SAS) or three sides (SSS), no pair exists and the Law of Cosines is the only option.

Do these laws work on right triangles too?

Yes — both hold for every triangle. With C=90C = 90^\circ the Law of Cosines becomes the Pythagorean theorem, since cos90=0\cos 90^\circ = 0. But when a triangle is right, plain SOHCAHTOA ratios are faster, so save these laws for triangles without a right angle.

What is the ambiguous case?

It's the SSA setup — two sides and an angle not between them. That information can sometimes describe two different triangles, because the inverse sine only returns acute angles while an obtuse angle with the same sine might also fit. After solving, test the supplement: if 180180^\circ minus your angle still leaves a positive third angle, a second triangle exists.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1