Law of Cosines – How to Solve and Use the Law of Cosines

The Law of Cosines — also known as the Cosine Rule or Cosine Theorem — is one of the most important relationships in trigonometry. It connects the sides and angles of any triangle, helping you calculate unknown sides, angles, or even determine whether a triangle is acute, right, or obtuse. Whether you’re solving triangles for geometry homework, using a triangle side calculator, or applying it in physics and engineering, the law of cosines is an essential mathematical tool.

What Is the Law of Cosines?

The Law of Cosines extends the Pythagorean Theorem to all types of triangles — including acute, obtuse, and right triangles. It relates the lengths of the sides of a triangle to the cosine of one of its angles.

If a triangle has sides a, b, and c, and the angle opposite side c is C, the law is written as: c2=a2+b2−2abcos⁡(C)c^2 = a^2 + b^2 – 2ab \cos(C)c2=a2+b2−2abcos(C)

This is the most common law of cosines formula.

Similarly, you can rearrange it for the other sides: a2=b2+c2−2bccos⁡(A)a^2 = b^2 + c^2 – 2bc \cos(A)a2=b2+c2−2bccos(A) b2=a2+c2−2accos⁡(B)b^2 = a^2 + c^2 – 2ac \cos(B)b2=a2+c2−2accos(B)

These formulas are sometimes referred to as the cosine rule formulas or law of cosine equations.

Law of Cosines Formula for Angles

The formula can also be rearranged to find an unknown angle if all three sides are known — this is particularly useful in SSS (Side-Side-Side) triangles: cos⁡(C)=a2+b2−c22ab\cos(C) = \frac{a^2 + b^2 – c^2}{2ab}cos(C)=2aba2+b2−c2​

Once you calculate cos(C), you can find the angle C by using the inverse cosine or cos⁻¹ function (using a cos⁻¹ calculator or cosine calculator): C=cos⁡−1(a2+b2−c22ab)C = \cos^{-1}\left(\frac{a^2 + b^2 – c^2}{2ab}\right)C=cos−1(2aba2+b2−c2​)

This rearranged version is sometimes referred to as the law of cosines for angle formula.

How to Use the Law of Cosines

The Law of Cosines can solve different types of triangle problems:

1. SAS (Side-Angle-Side) Triangle

If you know two sides and the included angle, use the formula to find the third side: c2=a2+b2−2abcos⁡(C)c^2 = a^2 + b^2 – 2ab \cos(C)c2=a2+b2−2abcos(C)

Example:
If a = 7, b = 5, and C = 60°,
then c2=72+52−2(7)(5)cos⁡(60°)c^2 = 7^2 + 5^2 – 2(7)(5)\cos(60°)c2=72+52−2(7)(5)cos(60°) c2=49+25−70(0.5)c^2 = 49 + 25 – 70(0.5)c2=49+25−70(0.5) c=39≈6.24c = \sqrt{39} \approx 6.24c=39​≈6.24

This is how you solve triangles with the SAS triangle calculator or manually using the cosine law.

2. SSS (Side-Side-Side) Triangle

If all three sides are known, use the law of cosines to find any angle.

Example:
If a = 8, b = 6, c = 10,
then cos⁡(C)=a2+b2−c22ab=64+36−10096=0\cos(C) = \frac{a^2 + b^2 – c^2}{2ab} = \frac{64 + 36 – 100}{96} = 0cos(C)=2aba2+b2−c2​=9664+36−100​=0

So C = 90°, meaning the triangle is right-angled.

This is the principle used in SSS triangle calculators and triangle angle solvers.

Relationship Between Law of Cosines and Pythagoras’ Theorem

When the angle C = 90°, cos⁡(90°)=0\cos(90°) = 0cos(90°)=0.
Substituting that into the formula gives: c2=a2+b2c^2 = a^2 + b^2c2=a2+b2

This shows that the Law of Cosines becomes the Pythagorean Theorem for right triangles — which is why it’s also useful in right triangle calculators or triangle side finders.

Applications of the Law of Cosines

The law of cosines is used in many fields beyond pure geometry, such as:

  • Surveying and Navigation: To calculate distances and bearings.
  • Physics and Engineering: To resolve vectors and forces.
  • Astronomy: To measure the angular distances between celestial bodies.
  • Architecture and Construction: To determine lengths and angles in structural design.

Online tools like triangle solvers, cosine calculators, and angle finder calculators make these computations faster and more accurate.

Understanding the Terms: Cosine Rule vs. Law of Cosines

You might encounter terms like Cosine Rule, Cosine Theorem, Cosine Law, or even Cosinus Theorem. All these mean the same thing — the mathematical rule that links triangle sides and their cosine angles. Similarly, phrases such as law of cos, law of cosin, or law of consines are simply alternative spellings of the same concept.

Using Online Calculators

If you don’t want to compute manually, you can use a variety of online tools:

  • Law of Cosines Calculator: Solves for missing sides or angles using the formula.
  • SSS Triangle Calculator: Finds all angles given three sides.
  • SAS Triangle Calculator: Finds the missing side and other angles.
  • Angle Finder for Triangle: Determines all angles in any triangle.
  • Cos⁻¹ Calculator or Cos Calculator: Helps compute inverse cosine values accurately.

These triangle solvers are especially handy for checking your manual work or learning how to apply trigonometric principles.

Step-by-Step Example: Finding the Value of 2abcos(C)

The expression 2abcos(C) appears in the main formula of the law of cosines. Let’s find its value in a practical example.

If a = 5, b = 7, and C = 45°, then: 2abcos⁡(C)=2(5)(7)cos⁡(45°)2ab\cos(C) = 2(5)(7)\cos(45°)2abcos(C)=2(5)(7)cos(45°) =70(0.7071)=49.5= 70(0.7071) = 49.5=70(0.7071)=49.5

This value (2abcosC) is subtracted from a2+b2a^2 + b^2a2+b2 to find c2c^2c2 according to the formula c2=a2+b2−2abcos⁡(C)c^2 = a^2 + b^2 – 2ab\cos(C)c2=a2+b2−2abcos(C).

Common Mistakes When Using the Law of Cosines

  1. Using the wrong angle — The angle must always be the one included between the two known sides.
  2. Forgetting to use degrees or radians correctly — Make sure your calculator is in the correct mode.
  3. Rounding too early — Always keep several decimal places during calculations for accuracy.
  4. Mixing up sides and angles — Label your triangle clearly before applying formulas.

Summary

The Law of Cosines is a cornerstone of trigonometry and geometry. It helps you:

  • Calculate unknown sides or angles in oblique triangles.
  • Extend the Pythagorean Theorem to non-right triangles.
  • Solve SAS and SSS triangle cases with ease.

Its versatility makes it essential for anyone studying geometry, physics, or engineering. Whether you’re using it manually or through a law of cosines calculator, mastering this formula is a crucial step in understanding the mathematical beauty behind triangles.

Key Takeaway

Remember the primary Law of Cosines formula: c2=a2+b2−2abcos⁡(C)c^2 = a^2 + b^2 – 2ab\cos(C)c2=a2+b2−2abcos(C)

This single equation is your gateway to solving almost any triangle problem — from finding sides and angles to exploring the geometry of the world around you.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top