Law of Cosines Calculator

Calculate Triangle Properties using Law of Cosines

Enter the known values of a triangle to calculate its properties using the Law of Cosines.

units
units
units
degrees
degrees
degrees

How to Calculate Using the Law of Cosines

The Law of Cosines is a fundamental theorem in trigonometry that relates the lengths of the sides of a triangle to the cosine of one of its angles. It's particularly useful when dealing with non-right triangles where the Pythagorean theorem doesn't apply.

Formulas for Law of Cosines Calculations

Let a, b, and c be the lengths of the sides of a triangle, and A, B, and C be the angles opposite these sides respectively.

  • \( c^2 = a^2 + b^2 - 2ab \cos(C) \)
  • \( b^2 = a^2 + c^2 - 2ac \cos(B) \)
  • \( a^2 = b^2 + c^2 - 2bc \cos(A) \)

These formulas can be rearranged to find angles:

  • \( \cos(C) = \frac{a^2 + b^2 - c^2}{2ab} \)
  • \( \cos(B) = \frac{a^2 + c^2 - b^2}{2ac} \)
  • \( \cos(A) = \frac{b^2 + c^2 - a^2}{2bc} \)

Calculation Steps

  1. Identify the known values (at least three) among side lengths and angles.
  2. Choose the appropriate Law of Cosines formula based on what you know and what you need to find.
  3. Substitute the known values into the chosen formula.
  4. Solve the equation for the unknown side or angle.
  5. If needed, use the results to calculate other unknown values.
  6. Calculate additional properties like perimeter and area if required.

Example Calculation

Let's calculate the properties of a triangle with side a = 5 units, side b = 7 units, and angle C = 60°.

  1. Use the formula: \( c^2 = a^2 + b^2 - 2ab \cos(C) \)
  2. Substitute the values: \( c^2 = 5^2 + 7^2 - 2(5)(7) \cos(60°) \)
  3. Simplify: \( c^2 = 25 + 49 - 70 \cos(60°) = 74 - 70(0.5) = 74 - 35 = 39 \)
  4. Solve for c: \( c = \sqrt{39} \approx 6.245 \) units
  5. Calculate angle A: \( \cos(A) = \frac{7^2 + 6.245^2 - 5^2}{2(7)(6.245)} \approx 0.7071 \)
  6. Solve for A: \( A = \arccos(0.7071) \approx 45.0° \)
  7. Calculate angle B: \( B = 180° - 60° - 45.0° = 75.0° \)
  8. Perimeter = 5 + 7 + 6.245 = 18.245 units
  9. Semi-perimeter s = 18.245 / 2 = 9.1225
  10. Area = \( \sqrt{9.1225(9.1225-5)(9.1225-7)(9.1225-6.245)} \approx 15.33 \) square units

Visual Representation

a b c A B C

This diagram illustrates a triangle with its sides (a, b, c) and angles (A, B, C) labeled, demonstrating how the Law of Cosines relates these components.