How to Use Law of Cosines: A Complete Step-by-Step Guide
The law of cosines is one of the most powerful tools in trigonometry for solving triangles that are not right triangles. Whether you are a student struggling with geometry homework, an engineer calculating structural loads, or a navigator plotting a course across uneven terrain, understanding how to use law of cosines can transform complex problems into manageable calculations. This guide will walk you through every aspect of applying this essential theorem, from the basic formula to real-world applications, ensuring you can confidently tackle any triangle problem that comes your way Less friction, more output..
Real talk — this step gets skipped all the time.
What Is the Law of Cosines?
The law of cosines relates the lengths of the three sides of a triangle to the cosine of one of its angles. Unlike the Pythagorean theorem, which only works for right triangles, the law of cosines applies to any triangle, whether acute, obtuse, or right. The formula states that for a triangle with sides a, b, and c, and angle C opposite side c:
c² = a² + b² - 2ab cos(C)
This equation essentially generalizes the Pythagorean theorem by adding a correction factor that accounts for the angle between the two known sides. When angle C equals 90 degrees, the cosine term becomes zero, and the formula reduces to the familiar c² = a² + b² Which is the point..
When to Use the Law of Cosines
Knowing when to apply the law of cosines is just as important as knowing the formula itself. You should reach for this theorem in two specific scenarios:
- SAS (Side-Angle-Side): When you know two sides and the included angle between them, and you need to find the third side.
- SSS (Side-Side-Side): When you know all three sides of a triangle and need to find one of the angles.
If you have an ASA (Angle-Side-Angle) or AAS (Angle-Angle-Side) situation, the law of sines is typically more efficient. Still, the law of cosines remains universally applicable and can serve as a reliable backup method in many cases.
Step-by-Step: Finding a Missing Side
Let us walk through the process of finding a missing side using the law of cosines.
- Identify your known values: Determine which two sides and which included angle you know. Label them as a, b, and C, where C is the angle between sides a and b.
- Substitute into the formula: Plug your values into c² = a² + b² - 2ab cos(C).
- Calculate the cosine: Use your calculator to find cos(C), ensuring it is in degree mode unless specified otherwise.
- Perform the arithmetic: Complete the multiplication, subtraction, and squaring operations in the correct order.
- Take the square root: Since c² gives you the squared length, take the positive square root to find side c.
Here's one way to look at it: if a = 8, b = 12, and C = 60°, you would calculate c² = 64 + 144 - 192 × cos(60°). Since cos(60°) = 0.5, this becomes c² = 208 - 96 = 112, giving c ≈ 10.58.
Step-by-Step: Finding a Missing Angle
When you know all three sides and need to find an angle, you must rearrange the law of cosines formula to solve for the cosine of the angle:
cos(C) = (a² + b² - c²) / 2ab
Follow these steps:
- Label your triangle: Identify the side opposite the angle you want to find as c.
- Substitute the three sides: Place the values into the rearranged formula.
- Calculate the numerator and denominator: Compute a² + b² - c² and 2ab separately.
- Divide: Obtain the cosine value of the angle.
- Use inverse cosine: Apply the cos⁻¹ function on your calculator to find the angle measure.
This method works for any angle in the triangle, making it incredibly versatile for complete triangle solutions.
Worked Example: SAS Case
Consider a triangle where side a = 5 cm, side b = 7 cm, and the included angle C = 45°. We want to find side c and the remaining angles.
First, apply the law of cosines to find side c:
c² = 25 + 49 - 70 × cos(45°) c² = 74 - 70 × 0.7071 c² = 74 - 49.50 = 24.50 c ≈ 4.95 cm
Next, use the law of cosines again to find angle A:
cos(A) = (b² + c² - a²) / 2bc cos(A) = (49 + 24.50 - 25) / (2 × 7 × 4.95) cos(A) = 48.50 / 69.30 ≈ 0.700 A ≈ cos⁻¹(0.700) ≈ 45.6°
Finally, angle B = 180° - 45° - 45.6° ≈ 89.4° Worth keeping that in mind..
Worked Example: SSS Case
Suppose you have a triangle with sides a = 9, b = 12, and c = 15. Find angle C Small thing, real impact..
Using the rearranged formula:
cos(C) = (81 + 144 - 225) / (2 × 9 × 12) cos(C) = 0 / 216 = 0 C = cos⁻¹(0) = 90°
Interestingly, this reveals a right triangle, which serves as a nice verification that the law of cosines correctly reduces to the Pythagorean theorem in this special case.
Common Mistakes to Avoid
Even experienced students occasionally stumble when applying the law of cosines. Here are the most frequent errors to watch for:
- Calculator mode confusion: Always verify whether your calculator is in degree or radian mode before computing trigonometric functions.
- Sign errors: The formula contains a minus sign before the 2ab cos(C) term. Forgetting this negative sign is a common mistake that produces incorrect results
More Pitfalls to Watch Out For
Even after mastering the basic steps, subtle errors can still slip in. Keep an eye on these additional traps:
- Misidentifying the included angle – The law of cosines requires the angle that sits between the two known sides. If you accidentally use an adjacent angle, the calculation will be off by a large margin.
- Rounding too early – Truncating intermediate values (e.g., using 0.71 for cos 45°) can compound, especially when you later take an inverse cosine. Carry extra digits through the steps and round only at the final answer.
- Confusing side‑angle notation – Remember that side c is opposite angle C. Mixing up the labels leads to the wrong numerator or denominator in the rearranged formula.
- Ignoring the domain of arccos – The cosine function returns values between –1 and 1. If your computed ratio falls slightly outside this range (due to rounding errors), the angle is undefined, signaling a mistake elsewhere in the calculation.
Quick Tips for Accuracy
- Double‑check your calculator mode – A single switch from degrees to radians can turn a 60° angle into 1.047 rad, drastically changing the result.
- Write out the full formula before plugging numbers – This visual cue helps you keep the correct signs and order of operations.
- Use consistent units – Whether you’re working with centimeters, inches, or pure numbers, keep the same unit throughout; mixing units will give you meaningless answers.
- Verify with the law of sines when possible – After finding an angle with the law of cosines, you can cross‑check it using the law of sines (if you have another side‑angle pair). Consistency between the two methods adds confidence.
Practice Problem
You are given a triangle with sides a = 13, b = 9, and the included angle C = 30°.
- Find side c using the law of cosines.
- Determine angles A and B.
Solution outline:
- Compute c² = a² + b² – 2ab cos C.
- Take the square root to obtain c.
- Apply the rearranged cosine formula for each unknown angle, then use the fact that the three angles sum to 180° to find the third.
(Answer: c ≈ 7.Plus, 0, A ≈ 112. 2°, B ≈ 37.8° But it adds up..
When the Law of Cosines Shines
- SAS situations – You have two sides and the angle between them; the law of cosines is the direct route to the third side.
- SSS situations – All three sides are known, and you need any angle; the rearranged formula gives the cosine of the desired angle instantly.
- Non‑right triangles – Whenever the triangle lacks a right angle, the law of cosines provides a reliable alternative to the law of sines, which can be ambiguous in the SSA case.
Final Thoughts
The law of cosines is a powerful, versatile tool that extends the familiar Pythagorean theorem to any triangle. By carefully labeling sides, respecting the sign conventions, and guarding against common computational slips, you can confidently tackle SAS and SSS problems with precision. Mastering this law not only streamlines geometric calculations but also deepens your understanding of how side lengths and angles intertwine in the world of Euclidean geometry.