The law of cosines is aversatile trigonometric formula that extends the familiar Pythagorean theorem to any triangle, and knowing when to use the law of cosines can turn seemingly complex problems into straightforward calculations; this article explains the scenarios that call for the law, walks you through the step‑by‑step process, and answers the most common questions so you can apply the method confidently in homework, exams, or real‑world contexts.
Understanding the Law of Cosines
The Formula
For any triangle with sides a, b, and c opposite angles A, B, and C respectively, the law of cosines states:
[ c^{2}=a^{2}+b^{2}-2ab\cos C ]
and its cyclic permutations. The formula can be rearranged to solve for an unknown side or an unknown angle, making it a flexible tool in geometry.
When the Formula Comes From
The law of cosines derives from projecting one side onto another and applying the Pythagorean theorem to the resulting right‑angled components. This geometric insight explains why the formula works for obtuse, acute, and right triangles alike, unlike the simpler Pythagorean relationship that applies only to right‑angled triangles.
This changes depending on context. Keep that in mind.
When to Use the Law of Cosines
Finding an Unknown Side
If you know two sides and the included angle (the SAS case), you can compute the third side. As an example, given sides a = 7 cm, b = 5 cm, and angle C = 60°, the unknown side c is found by plugging the values into the formula and solving for c.
Most guides skip this. Don't.
Finding an Unknown Angle
When you know all three sides (the SSS case), the law of cosines can be rearranged to solve for an angle. Solving for C yields:
[ \cos C = \frac{a^{2}+b^{2}-c^{2}}{2ab} ]
Then take the inverse cosine to obtain the measure of C. This is especially useful when the triangle is not right‑angled and the usual sine or tangent ratios are cumbersome Simple, but easy to overlook..
Non‑Right Triangles
The law of cosines is essential for any non‑right triangle where the Pythagorean theorem does not apply. Whether the triangle is scalene or isosceles, the formula provides a direct route to missing measurements without needing to construct auxiliary lines Nothing fancy..
Real‑World Applications
- Navigation and Surveying – Determining the distance between two points when the angle between sight lines is known.
- Physics – Calculating the resultant force when two forces act at an angle to each other.
- Computer Graphics – Finding distances between points in 3‑D space for rendering and collision detection.
Understanding when to use the law of cosines thus empowers you to tackle problems that involve indirect measurement, oblique triangles, and vector addition.
Step‑by‑Step Guide to Applying the Law of Cosines
- Identify the known parts of the triangle (sides and/or angles).
- Determine the appropriate case:
- SAS → solve for the unknown side.
- SSS → solve for an unknown angle.
- Write the formula in the form that isolates the unknown quantity.
- Substitute the known values carefully, paying attention to units.
- Perform algebraic manipulation to isolate the unknown (e.g., take a square root or inverse cosine). 6. Check the result for reasonableness (e.g., an angle should be between 0° and 180°, a side length should be positive).
Example: Given a = 8 m, b = 6 m, and C = 45°, find c.
[ c^{2}=8^{2}+6^{2}-2(8)(6)\cos 45^{\circ}=64+36-96\left(\frac{\sqrt{2}}{2}\right)=100-48\sqrt{2} ]
[ c=\sqrt{100-48\sqrt{2}}\approx 5.5\text{ m} ]
The calculation shows how the law transforms a set of measurements into a precise answer.
Common Mistakes and How to Avoid Them
- Misidentifying the included angle – The angle must be the one formed by the two known sides. Using the wrong angle leads to incorrect results.
- Forgetting the minus sign – The formula contains a subtraction term (‑2ab cos C). Omitting it inflates the computed side length.
- Using degrees instead of radians without conversion – Most calculators default to degree mode for trigonometric functions; ensure your calculator settings match the problem’s unit.
- Rounding too early – Keep intermediate values exact (especially when dealing with radicals or irrational cosines) until the final step to minimize cumulative error.
By paying attention to these pitfalls, you’ll find that when to use the law of cosines becomes a reliable decision point rather than a source of confusion That alone is useful..
Frequently Asked Questions
What is the difference between the law of sines and the law of cosines?
The law of sines relates the ratios of side lengths to the sines of their opposite angles, and it is most useful when you have two angles and a side (AAS or ASA) or two sides and a non‑included angle (SSA). The law of cosines, on