Side \(a\) is opposite angle \(A\).
Trigonometry Guide
Law of Cosines Explained
Learn how to solve non-right triangles when you know two sides and the included angle or all three side lengths.
Oblique Triangle Trigonometry
What Is the Law of Cosines?
The Law of Cosines relates the three side lengths of a triangle to the cosine of one of its angles.
It is especially useful when the Law of Sines does not immediately give you a complete side-angle pair.
The Law of Cosines
Match the Opposite Side with the Angle
The side alone on the left is opposite the angle used in the cosine term.
The Most Important Pattern
Side \(c\) Goes with Angle \(C\)
If you are solving for side \(c\), use angle \(C\). If you are solving for angle \(C\), the side opposite it is still \(c\).
Side \(b\) is opposite angle \(B\).
Side \(c\) is opposite angle \(C\).
Focus on the Opposite Pair
In \(c^2=a^2+b^2-2ab\cos C\), side \(c\) is directly opposite angle \(C\).
Visual Model
See the Opposite Pair
In triangle \(ABC\), each lowercase side is opposite the matching uppercase angle.
Match the Angle to the Opposite Side
In the formula for \(c^2\), the cosine term must use angle \(C\), because \(C\) is opposite side \(c\).
Choosing the Method
When Should You Use the Law of Cosines?
The Law of Cosines is most useful when the given information is SAS or SSS.
SAS
Side-Angle-Side
Two sides and the angle between them are known.
Use the Law of Cosines to find the side opposite the included angle.
SSS
Side-Side-Side
All three side lengths are known.
Rearrange the Law of Cosines and use inverse cosine to find an angle.
Method Check
Law of Sines or Law of Cosines?
ASA or AAS?
Use the Law of Sines.
SSA?
Usually use the Law of Sines, then check the ambiguous case.
SAS?
Use the Law of Cosines.
SSS?
Use the Law of Cosines.
Quick Decision Rule
Look at What You Know
If you already know a side and its opposite angle, the Law of Sines is often the natural choice.
If you have SAS or SSS, the Law of Cosines is usually the right tool.
Worked Examples
Solving with the Law of Cosines
Use the version of the formula that matches the side or angle you are trying to find.
Example 1
Find a Missing Side
In triangle \(ABC\), \(a=8\), \(b=11\), and \(C=47^\circ\). Find side \(c\).
-
Identify the opposite pair.
We are finding side \(c\), so we use angle \(C\).
-
Write the correct formula.
\[ c^2 = a^2+b^2 - 2ab\cos C \]
-
Substitute.
\[ c^2 = 8^2+11^2 - 2(8)(11) \cos(47^\circ) \]
-
Evaluate the right side.
\[ c^2 \approx 64+121-120.03 \] \[ c^2 \approx 64.97 \]
-
Take the square root.
\[ c \approx \sqrt{64.97} \] \[ c \approx 8.06 \]
Example 2
Find a Missing Angle
In triangle \(ABC\), \(a=7\), \(b=10\), and \(c=12\). Find angle \(C\).
-
Start with the formula for \(c\).
\[ c^2 = a^2+b^2 - 2ab\cos C \]
-
Substitute the side lengths.
\[ 12^2 = 7^2+10^2 - 2(7)(10)\cos C \]
-
Simplify.
\[ 144 = 49+100 - 140\cos C \] \[ 144 = 149 - 140\cos C \]
-
Solve for \(\cos C\).
\[ -5 = -140\cos C \] \[ \cos C = \frac{1}{28} \]
-
Use inverse cosine.
\[ C = \cos^{-1} \left( \frac{1}{28} \right) \] \[ C \approx 88.0^\circ \]
Finding Angles
Rearranging the Law of Cosines
When all three sides are known, rearrange the formula to isolate the cosine of the angle you want.
Find Angle \(A\)
Find Angle \(B\)
Find Angle \(C\)
Calculator Reminder
When finding an angle, use inverse cosine, written \(\cos^{-1}\), and make sure your calculator is in degree mode.
Watch Out
Common Law of Cosines Mistakes
Using the Wrong Angle
If the formula begins with \(c^2\), the cosine term must contain angle \(C\).
Forgetting the Minus Sign
The cosine term is subtracted.
Forgetting the Square Root
When finding a side, the formula gives \(c^2\), not \(c\). Take the square root at the end.
Using Regular Cosine for an Angle
After solving for \(\cos C\), use inverse cosine to recover the angle.
Using the Wrong Triangle Case
SAS and SSS point toward the Law of Cosines. A known opposite side-angle pair often points toward the Law of Sines.
Rounding Too Early
Keep several calculator digits during your work and round only the final answer.
The Process
Law of Cosines Recipe
Identify the Given Information
Decide whether you have SAS or SSS.
Identify the Opposite Pair
Match the side you are finding with its opposite angle.
Choose the Correct Formula
If you need \(c\) or \(C\), use the formula involving \(c^2\) and \(\cos C\).
Substitute Carefully
Put each side and angle in its matching position.
Solve
Take a square root when finding a side or use inverse cosine when finding an angle.
Check Your Answer
Make sure the result makes sense for the triangle and round only at the end.
Remember This
The Law of Cosines in One Minute
Your Turn
Ready to Practice?
Work through Law of Cosines problems involving formula setup, SAS, SSS, missing sides, and missing angles.
Personalized Math Support
Need Help Making Sense of the Math?
If a concept still feels confusing, you do not have to work through it alone. Tell me what you are studying and where you are getting stuck, and I will help you determine the best next step.
Support Free Math Resources
Find this resource helpful?
RaulTheTutor.com provides free interactive tools, guides, reference resources, and practice materials for students, parents, and teachers. If this resource helped you, consider making an optional contribution to support the development of more free math resources.