Law of Cosines Calculator

A universal tool for solving any triangle, extending beyond right-angled constraints.

Use this calculator for Side-Angle-Side (SAS) or Side-Side-Side (SSS) configurations to determine unknown measurements.

Practical Examples

Explore common scenarios to see how the Law of Cosines is applied.

Find a Missing Side (SAS)

findSide

Given two sides and the angle between them, find the third side.

sideA: 5

sideB: 7

angleC: 45

Find a Missing Angle (SSS)

findAngle

Given all three sides of a triangle, find an angle.

sideA: 8

sideB: 6

sideC: 10

Obtuse Triangle Side (SAS)

findSide

Calculate the longest side of a triangle with an obtuse angle.

sideA: 10

sideB: 12

angleC: 120

Isosceles Triangle Angle (SSS)

findAngle

Find the vertex angle of an isosceles triangle.

sideA: 9

sideB: 9

sideC: 6

Other Titles
Understanding the Law of Cosines: A Comprehensive Guide
An in-depth exploration of the cosine rule, its applications, and mathematical underpinnings.

What is the Law of Cosines?

  • A generalization of the Pythagorean theorem
  • Applicable to all triangles, not just right-angled ones
  • Connects the lengths of sides to the cosine of an angle
The Law of Cosines is a fundamental theorem in trigonometry that provides a relationship between the lengths of a triangle's sides and the cosine of one of its angles. For any triangle with sides of length a, b, and c, and with angle C opposite side c, the law is stated as:
c² = a² + b² - 2ab cos(C)
This formula can be rearranged to solve for any side or any angle, making it an incredibly versatile tool. It is particularly useful in two main scenarios: when you know two sides and the included angle (SAS) or when you know all three sides (SSS).

Step-by-Step Guide to Using the Calculator

  • Choosing the correct calculation mode
  • Entering your known values correctly
  • Interpreting the calculated results
1. To Find a Missing Side (SAS):
Select 'Find Side (SAS)' mode. Input the lengths of two sides (e.g., 'a' and 'b') and the measure of the angle between them (angle 'C'). The calculator will use the formula c² = a² + b² - 2ab cos(C) to find the length of the third side 'c'.
2. To Find a Missing Angle (SSS):
Select 'Find Angle (SSS)' mode. Input the lengths of all three sides ('a', 'b', and 'c'). The calculator will first verify that the sides can form a valid triangle (triangle inequality). Then, it will rearrange the formula to find an angle, for example, angle 'C': C = arccos((a² + b² - c²) / 2ab).

Real-World Applications of the Law of Cosines

  • Surveying and land measurement
  • Navigation and astronomy
  • Engineering and physics
The Law of Cosines is not just an academic exercise; it has numerous practical applications.
Surveying:
Surveyors use it to calculate the distance between two points when a direct measurement is impossible. By measuring the distance from a third point to each of the two points and the angle between those lines, they can find the unknown distance.
Navigation:
Pilots and sailors use it to determine the distance and bearing to a destination, especially when dealing with vectors and wind/current effects.

Common Misconceptions and Key Points

  • Law of Cosines vs. Law of Sines
  • The Ambiguous Case
  • Units and precision
Law of Sines Ambiguity:
Unlike the Law of Sines, the Law of Cosines does not have an 'ambiguous case'. When solving for an angle using the SSS case, the arccos function will always return a single, unique angle between 0° and 180°, correctly identifying if it's acute or obtuse.
Units:
Ensure that all side lengths are in the same units. The calculator assumes angles are in degrees for both input and output.

Mathematical Derivation and Proof

  • Proof using coordinate geometry
  • Relationship to the dot product of vectors
  • Connection to the Pythagorean theorem
The Law of Cosines can be derived by placing a triangle on the Cartesian coordinate plane. Place vertex C at the origin (0,0) and side 'b' along the x-axis. The coordinates of vertex A would be (b, 0), and the coordinates of vertex B would be (a cos(C), a sin(C)).
The length of side 'c' is the distance between points A and B. Using the distance formula, c² = (a cos(C) - b)² + (a sin(C) - 0)². Expanding this equation and simplifying using the identity sin²(C) + cos²(C) = 1 yields the Law of Cosines: c² = a² + b² - 2ab cos(C).