Law of Cosines:
From: | To: |
The Law of Cosines is a formula relating the lengths of the sides of a triangle to the cosine of one of its angles. It generalizes the Pythagorean theorem for oblique (non-right) triangles.
The calculator uses the Law of Cosines:
Where:
Explanation: The formula calculates the third side of a triangle when you know two sides and the included angle.
Details: This law is essential in trigonometry for solving oblique triangles, navigation, physics, and engineering applications where right triangles aren't present.
Tips: Enter lengths of sides a and b, and the included angle C in degrees. All values must be positive, and angle must be between 0 and 180 degrees.
Q1: When should I use the Law of Cosines?
A: Use it when you know two sides and the included angle (SAS) or when you know all three sides (SSS) of a triangle.
Q2: How does this differ from the Law of Sines?
A: The Law of Sines relates sides to opposite angles, while the Law of Cosines relates all three sides to one angle.
Q3: Can this be used for right triangles?
A: Yes, but when angle C is 90°, the formula reduces to the Pythagorean theorem since cos(90°) = 0.
Q4: What units should I use?
A: Any consistent units for length (cm, m, inches, etc.). Angles must be in degrees.
Q5: What if my angle is in radians?
A: Convert radians to degrees first (1 radian ≈ 57.2958 degrees) or modify the code to accept radians.