Law of Cosines
Trigonometry
Intro: Give two sides and the included angle (SAS), or all three sides (SSS). We compute unknowns with the Law of Cosines and then finish with the Law of Sines if needed.
Worked example
- Given a=7, b=9, c=12, find A.
- Goal: Use the Law of Cosines in the form $$\cos A = \frac{b^2 + c^2 - a^2}{2bc}.$$
- Substitute: $$\cos A = \frac{9^2 + 12^2 - 7^2}{2\cdot 9\cdot 12} = \frac{81 + 144 - 49}{216} = \frac{176}{216}.$$
- Simplify the fraction: $$\frac{176}{216} = \frac{22}{27} \approx 0.8148.$$
- Take arccos: $$A \approx \arccos(0.8148) \approx 35.7^{\circ}.$$
- Optional checks:
- • Largest side is c=12; the angle opposite it (C) should be largest. Indeed, A≈35.7° is not the largest angle ✔️.
- • If desired, find another angle with the Law of Cosines or Law of Sines; then confirm A+B+C≈180°.
- Given a=8, b=12, included angle C=37°, find c, A, B.
- Law of Cosines for side c: $$c^2 = a^2 + b^2 - 2ab\cos C = 8^2 + 12^2 - 2\cdot 8\cdot 12 \cos 37^{\circ}.$$
- Compute: $$64 + 144 - 192\cos 37^{\circ} = 208 - 192(0.7986) \approx 208 - 153.3312 \approx 54.6688.$$
- Take square root: $$c \approx \sqrt{54.6688} \approx 7.393.$$
- Now use Law of Sines for an angle, e.g., A: $$\frac{\sin A}{a} = \frac{\sin C}{c} \Rightarrow \sin A = \frac{a\sin C}{c} = \frac{8\cdot\sin 37^{\circ}}{7.393}.$$
- With $\sin 37^{\circ}\approx 0.6018$: $$\sin A \approx \frac{8\cdot 0.6018}{7.393} \approx 0.6512 \Rightarrow A \approx \arcsin(0.6512) \approx 40.6^{\circ}.$$
- Third angle by sum: $$B = 180^{\circ} - A - C \approx 180^{\circ} - 40.6^{\circ} - 37^{\circ} \approx 102.4^{\circ}.$$
- Summary (rounded): $$\boxed{c \approx 7.393,\; A \approx 40.6^{\circ},\; B \approx 102.4^{\circ}}.$$
- Checks (optional):
- • Angle sum ≈ 180° ✔️.
- • Law of Sines consistency: $$\frac{a}{\sin A} \approx \frac{8}{\sin 40.6^{\circ}} \approx 12.41,\; \frac{b}{\sin B} \approx \frac{12}{\sin 102.4^{\circ}} \approx 12.29,\; \frac{c}{\sin C} \approx \frac{7.393}{\sin 37^{\circ}} \approx 12.29.$$ Close agreement within rounding ✔️.
FAQs
Radian input?
Yes. Include the ° symbol for degrees; otherwise we treat angles as radians.
Which case uses Law of Cosines first?
Use it directly for SAS and SSS. For ASA/AAS, use the Law of Sines instead.
Rounding?
We show 3–4 significant decimals by default; request more precision if needed.
Why choose MathGPT?
- Get clear, step-by-step solutions that explain the “why,” not just the answer.
- See the rules used at each step (power, product, quotient, chain, and more).
- Optional animated walk-throughs to make tricky ideas click faster.
- Clean LaTeX rendering for notes, homework, and study guides.
How this calculator works
- Type or paste your function (LaTeX like
\sin,\lnworks too). - Press Generate a practice question button to generate the derivative and the full reasoning.
- Review each step to understand which rule was applied and why.
- Practice with similar problems to lock in the method.