Introduction
The law of cosines is a cornerstone of trigonometry that relates the lengths of the sides of a triangle to the cosine of one of its angles. Many students wonder whether this powerful formula works for all triangles, or if it is limited to specific types such as acute or right triangles. In this article we will explore the scope of the law of cosines, examine its mathematical foundations, and clarify common misconceptions. By the end you will understand exactly when and why the law of cosines can be applied, and how it compares to other triangle-solving tools.
What Is the Law of Cosines?
The law of cosines states that for any triangle with side lengths a, b, and c opposite angles A, B, and C respectively, the following relationships hold:
- a² = b² + c² – 2bc·cos A
- b² = a² + c² – 2ac·cos B
- c² = a² + b² – 2ab·cos C
These equations allow you to compute an unknown side when you know two sides and the included angle, or to find an unknown angle when you know all three sides. The formula is a generalization of the Pythagorean theorem, which is a special case when the angle involved is 90° (cos 90° = 0).
When Does the Law of Cosines Apply?
The law of cosines is universally valid for any triangle—whether it is acute, right, or obtuse. The only requirement is that you have either:
- Two sides and the included angle (to solve for the third side), or
- All three sides (to solve for any angle).
Because the cosine function is defined for angles between 0° and 180°, it works for every possible interior angle of a triangle. e.And in practice, the law of cosines is especially useful when the Pythagorean theorem cannot be applied directly (i. , when the triangle is not right‑angled) No workaround needed..
Practical Scenarios
- Surveying: Determining the distance between two points when the angle between measured lines is known.
- Engineering: Calculating forces in non‑orthogonal structures.
- Navigation: Finding the shortest path between two waypoints when the bearing angle is given.
Steps to Use the Law of Cosines
Below is a clear, step‑by‑step procedure for applying the law of cosines in both common situations The details matter here..
1. Find a Missing Side (SAS)
- Identify the two known sides (b and c) and the included angle A.
- Plug the values into the formula a² = b² + c² – 2bc·cos A.
- Solve for a by taking the square root of the result.
Example: If b = 7, c = 10, and A = 45°, then
a² = 7² + 10² – 2·7·10·cos 45° = 49 + 100 – 140·0.7071 ≈ 149 – 98.99 ≈ 50.01,
so a ≈ √50.01 ≈ 7.07 That's the whole idea..
2. Find a Missing Angle (SSS)
- List the three known side lengths (a, b, c).
- Choose the angle you want to find, say C, and rearrange the law of cosines to isolate cos C: cos C = (a² + b² – c²) / (2ab).
- Compute the value of cos C, then use the inverse cosine function (arccos) to obtain angle C.
Example: With sides a = 5, b = 6, c = 7,
cos C = (5² + 6² – 7²) / (2·5·6) = (25 + 36 – 49) / 60 = 12 / 60 = 0.2,
so C = arccos 0.2 ≈ 78.46°.
3. Verify Consistency
After solving, you can cross‑check the results using the law of sines or by confirming that the sum of the three angles equals 180°. This step helps catch calculation errors But it adds up..
Scientific Explanation and Derivation
The law of cosines can be derived from the vector dot product or from coordinate geometry. Here we outline a simple coordinate proof:
-
Place side c along the x‑axis, with endpoints at (0, 0) and (c, 0) Worth knowing..
-
Let the third vertex be at coordinates (b·cos A, b·sin A), because side b makes an angle A with side c.
-
Compute the distance between the third vertex and the point (c, 0) to obtain side a:
a² = (c – b·cos A)² + (b·sin A)²
= c² – 2bc·cos A + b²·cos² A + b²·sin² A
= b² + c² – 2bc·cos A
This derivation shows that the law of cosines holds for any triangle, regardless of its shape, because the coordinate placement is general and does not assume right angles.
Limitations and Common Misconceptions
Even though the law of cosines works for all triangles, there are a few pitfalls students often encounter:
- Using the wrong angle: The angle must be the one included between the two known sides. Using a non‑included angle leads to an incorrect side length.
- Confusing with the law of sines: The law of sines is ideal when you have two angles and a side (AAS or ASA). The law of cosines shines in SAS or SSS cases.
- Numerical precision: When the angle is very close to 0° or 180°, cos θ approaches ±1, and rounding errors can become significant. In such extreme cases, the law of sines may be more stable.
- Assuming it only works for acute triangles: The formula includes the cosine of an obtuse angle, which is negative, correctly accounting for the longer side opposite the obtuse angle.