7.211103
73.8979
°
46.1021
°
20.7846
21.2111
5.764614
52
7.211103
73.8979
°
46.1021
°
20.7846
21.2111
5.764614
52
The Law of Cosines Calculator solves triangles when you know two sides and the included angle (SAS configuration). The Law of Cosines is one of the most versatile tools in trigonometry, generalizing the Pythagorean theorem to work with any triangle, not just right triangles. The fundamental formula is $$c^2 = a^2 + b^2 - 2ab\cos(C)$$, where $$C$$ is the angle between sides $$a$$ and $$b$$, and $$c$$ is the side opposite angle $$C$$.
This calculator takes sides $$a$$ and $$b$$ along with their included angle $$C$$, computes the opposite side $$c$$, then uses the Law of Cosines again to find the remaining two angles. The complete solution includes all three sides, all three angles, the area, and the perimeter. The area is computed using $$A = \frac{1}{2}ab\sin(C)$$, which follows naturally from the SAS input configuration.
The Law of Cosines is essential when the Law of Sines cannot be directly applied, particularly in SAS and SSS configurations. In the SAS case (this calculator), you know two sides and the angle between them. In the SSS case, you know all three sides and need to find the angles. Both situations require the Law of Cosines as the primary solving tool.
Practical applications are abundant. In navigation, the law determines the distance between two points when you know the distances from a reference point and the angle between the lines of sight. In physics, it calculates the resultant of two force vectors with a known angle between them. Surveyors use it when they can measure two distances and the angle between them but cannot directly measure the third distance.
The formula reveals elegant connections to the Pythagorean theorem. When $$C = 90°$$, $$\cos(90°) = 0$$, and the formula reduces to $$c^2 = a^2 + b^2$$. When $$C < 90°$$ (acute), the cosine term is positive, making $$c^2 < a^2 + b^2$$. When $$C > 90°$$ (obtuse), the cosine term is negative, making $$c^2 > a^2 + b^2$$. This provides a direct way to classify triangles by their angles.
Historically, the law was known in various forms to ancient mathematicians. Euclid proved special cases in the Elements (Propositions 12 and 13 of Book II). The general trigonometric form was developed by Al-Kashi in the 15th century, which is why the law is sometimes called Al-Kashi's theorem in some traditions.
The Law of Cosines for the SAS case:
$$c^2 = a^2 + b^2 - 2ab\cos(C)$$
$$c = \sqrt{a^2 + b^2 - 2ab\cos(C)}$$
Once $$c$$ is known, find the remaining angles:
$$A = \arccos\left(\frac{b^2 + c^2 - a^2}{2bc}\right)$$
$$B = \arccos\left(\frac{a^2 + c^2 - b^2}{2ac}\right)$$
The area from two sides and included angle:
$$\text{Area} = \frac{1}{2} ab \sin(C)$$
Side c is the distance opposite the given angle C, computed from the SAS configuration. Angles A and B are derived from the complete set of sides using the inverse cosine function. The three angles should sum to 180°. The area uses the efficient two-side-included-angle formula. The perimeter is the sum of all three sides. All length outputs use the same units as the inputs.
Inputs
Results
c² = 64 + 36 - 96·cos(60°) = 100 - 48 = 52. c = sqrt(52) ≈ 7.211.
Inputs
Results
c² = 25 + 49 - 70·cos(120°) = 74 + 35 = 109. c ≈ 10.44. The obtuse angle produces a longer opposite side.
The Law of Cosines relates the three sides and one angle of any triangle: c² = a² + b² - 2ab·cos(C). It generalizes the Pythagorean theorem, which is the special case when C = 90° (since cos(90°) = 0).
Use the Law of Cosines when you have SAS (two sides and the included angle) or SSS (three sides). Use the Law of Sines when you have AAS or ASA (two angles and a side). The Law of Cosines avoids the ambiguous case that can arise with the Law of Sines.
When C = 90°, cos(90°) = 0, so the formula simplifies to c² = a² + b², which is the Pythagorean theorem. The Law of Cosines is the general case; the Pythagorean theorem is the special case for right triangles.
No. Interior angles of a triangle must be between 0° and 180° (exclusive). If angle C approached 180°, the triangle would degenerate into a straight line. The calculator accepts angles between 0.01° and 179.99°.
Rearrange the Law of Cosines: C = arccos((a² + b² - c²)/(2ab)). Apply this formula three times with appropriate substitutions to find all three angles. Our Triangle Angle Calculator performs exactly this computation.
In any triangle, the longest side is always opposite the largest angle, and the shortest side is opposite the smallest angle. If two sides are equal, their opposite angles are also equal (isosceles triangle property).
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!