
Why Are Triangles the Strongest Shape? The Engineering Secret Hidden in Geometry
Discover why triangles are the strongest shape in engineering and construction. Learn how this geometric principle powers cranes, bridges, and iconic structures.
Solve SSS and SAS triangle cases
Enter either 3 sides (SSS) or 2 sides with the included angle (SAS).
Example: SSS case (a=7, b=5, c=8)
Enter any known values above to calculate the rest
The Law of Cosines is a fundamental theorem in trigonometry that generalizes the Pythagorean theorem to work with any triangle, not just right triangles. It provides a way to find missing sides or angles when you have specific combinations of triangle measurements, making it one of the most versatile tools in triangle solving. For a deeper understanding, explore the Law of Cosines derivation and applications or review the Laws of Cosines and Sines at Clark University.
For any triangle with sides a, b, c and opposite angles A, B, C, the Law of Cosines states:
c² = a² + b² - 2ab·cos(C)
b² = a² + c² - 2ac·cos(B)
a² = b² + c² - 2bc·cos(A)
Notice how these formulas resemble the Pythagorean theorem (a² + b² = c²) with an additional term: -2ab·cos(C). When the angle C = 90°, cos(90°) = 0, and the formula reduces exactly to the Pythagorean theorem. This shows that the Law of Cosines is a generalization that works for all triangles.
The Law of Cosines is specifically designed for two triangle configurations:
When you know all three sides and want to find the angles. Rearrange the formula to solve for the angle:
cos(C) = (a² + b² - c²) / (2ab)
C = arccos((a² + b² - c²) / (2ab))
Repeat this process for the other two angles. This is the only straightforward method to find angles when you only know the three sides.
When you know two sides and the angle between them (the included angle). Use the formula directly to find the third side:
c = √(a² + b² - 2ab·cos(C))
Once you have all three sides, you can find the remaining angles using the Law of Cosines or switch to the Law of Sines.
The Law of Cosines emerges from applying the distance formula to triangles placed on a coordinate system. When you position one vertex at the origin and another along the positive x-axis, the third vertex's coordinates involve trigonometric functions. Using the distance formula between these points and algebraic manipulation yields the Law of Cosines. This geometric derivation reveals why the formula contains both the sides and the cosine of the angle - it's encoding the geometric relationship between the triangle's vertices in space.
Both laws are powerful, but they apply to different situations:
The Law of Cosines is essential in many fields:
Our Law of Cosines Calculator handles both SSS and SAS cases:
The calculator automatically validates triangle inequality for SSS and provides clear error messages if the inputs cannot form a valid triangle. All calculations use high-precision mathematics for accurate results.
The Law of Cosines states that for any triangle, c² = a² + b² - 2ab·cos(C), where c is a side and C is the opposite angle. This formula can be rearranged for any side-angle pair. It generalizes the Pythagorean theorem to work with all triangles, not just right triangles.
Use the Law of Cosines for SSS (when you know all three sides) or SAS (when you know two sides and the included angle between them). The Law of Sines cannot handle these cases effectively. For ASA, AAS, and SSA cases, the Law of Sines is usually more straightforward.
The Law of Cosines is a generalization of the Pythagorean theorem. In a right triangle where C = 90°, cos(90°) = 0, so the term -2ab·cos(C) becomes zero, leaving c² = a² + b², which is exactly the Pythagorean theorem. This shows that the Pythagorean theorem is a special case of the Law of Cosines.
Yes! This is one of its most powerful uses. Rearrange the formula to cos(C) = (a² + b² - c²) / (2ab), then find C = arccos((a² + b² - c²) / (2ab)). This is the only practical way to find angles when you only know the three side lengths. Repeat for the other angles.
SAS means Side-Angle-Side, where you know two sides and the angle BETWEEN them (the included angle). For example, sides a and b with angle C, or sides b and c with angle A. The angle must be included (between the two known sides) because that's what the Law of Cosines formula requires. If you know two sides and a non-included angle, you have SSA, which requires the Law of Sines instead.
The most common error is violating the triangle inequality theorem - the sum of any two sides must be greater than the third side. Another error occurs if the value inside arccos is outside the range [-1, 1], which happens with invalid measurements. Our calculator automatically validates your inputs and provides clear error messages if the values cannot form a valid triangle.
Deepen your understanding of triangles and trigonometry with our guides and tutorials:

Discover why triangles are the strongest shape in engineering and construction. Learn how this geometric principle powers cranes, bridges, and iconic structures.

Learn 5 proven methods to calculate triangle area with step-by-step examples. Master geometry formulas for homework, construction, and real-world applications.

Master the Law of Sines to solve any oblique triangle! Learn when and how to use this powerful trigonometry tool with step-by-step examples and practice problems.

Learn essential verification techniques to check your triangle calculations and catch mistakes before they become costly errors. Perfect for students and professionals.

Learn the key differences between pointy and flat triangles with easy examples. Discover how triangle shapes affect their properties in geometry and real life.

Discover how you unknowingly apply geometry every day—from parking cars to pouring coffee. Explore the hidden math behind everyday activities.