Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Understanding the Law of Cosines in Triangles

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon

Law of Cosines formula derivation and step by step solved examples

The concept of Law of Cosines plays a key role in mathematics and is widely applicable to both real-life situations and exam scenarios. From finding unknown triangle sides to tackling CBSE and JEE exam questions, this formula is essential for every learner of trigonometry.


What Is Law of Cosines?

The Law of Cosines, also known as the cosine rule, is a formula relating the lengths of the sides of any triangle to the cosine of one of its angles. You’ll find this concept applied in solving triangles, trigonometry class 11, and geometry problems where the Pythagorean theorem does not apply.


Key Formula for Law of Cosines

Here’s the standard formula:

For a triangle with sides a, b, c and opposite angles A, B, C:

c² = a² + b² − 2ab cos(C)

Similarly:

a² = b² + c² − 2bc cos(A)
b² = a² + c² − 2ac cos(B)


Cross-Disciplinary Usage

Law of Cosines is not only useful in Maths but also plays an important role in Physics (for force and vector problems), Computer Science (for graphics and gaming), and logical reasoning in everyday measurements. Students preparing for JEE or NEET will see its relevance in various types of triangle-based questions.


When to Use the Law of Cosines

The Law of Cosines is especially helpful in solving for unknown sides or angles in any triangle when:

  • You know two sides and the included angle (SAS: Side-Angle-Side)
  • You know all three sides (SSS: Side-Side-Side)

It is commonly used when the Law of Sines cannot be applied easily, especially when the angle is not opposite a known side.


Step-by-Step Illustration

  1. Suppose you have a triangle with a = 5 cm, b = 7 cm, and angle C = 60°.
    Use Law of Cosines to find side c.

  2. Apply the formula:
    c² = 5² + 7² − 2 × 5 × 7 × cos(60°)

  3. Calculate cos(60°):
    cos(60°) = 0.5

  4. Substitute values:
    c² = 25 + 49 − 2 × 5 × 7 × 0.5
    c² = 74 − 35
    c² = 39

  5. Find c:
    c = √39 ≈ 6.24 cm

Speed Trick or Vedic Shortcut

Here’s a quick way to remember the Law of Cosines formula: Think of the Pythagoras theorem, but with an added "correction term" for non-right triangles.

Mnemonic: “Two squares minus double product times cosine!”

So, for c²: add a² + b², then subtract 2ab × cos(C).
This helps students quickly recall the formula even under exam pressure.


Try These Yourself

  • A triangle has sides 4 cm and 6 cm with an included angle of 45°. Find the third side using Law of Cosines.
  • Given triangle sides a = 5 cm, b = 8 cm, c = 7 cm, find angle C.
  • Can you apply Law of Cosines to an equilateral triangle? What do you notice?

Frequent Errors and Misunderstandings

  • Forgetting to use the correct included angle in the formula.
  • Mixing up Law of Sines and Law of Cosines situations.
  • Making calculator mistakes with cosine values in degrees vs radians.

Relation to Other Concepts

The idea of Law of Cosines connects closely with trigonometric formulas, triangle properties, and extends the Pythagorean theorem to all triangles (not just right-angled ones). Mastering this helps with understanding the Properties of Triangles and more advanced geometry and vector topics.


Law of Cosines vs Law of Sines

Law of Cosines Law of Sines
Use for SSS or SAS cases; relates sides and included angle using cosine. Use for ASA or AAS cases; relates ratios of sides and their opposite angles using sine.
a² = b² + c² – 2bc cos(A) a/sin A = b/sin B = c/sin C
Solves for unknown sides or angles when direct ratios are not available. Best when an angle and its opposite side are both known.

Applications in Real Life

Law of Cosines is important not just in exams but also in real-world applications like:

  • Surveying land when you cannot measure directly across rough terrain
  • Navigation and GPS calculations for ships and aircraft
  • Physics problems involving vector resolution and forces
  • Designing objects or structures where precise triangle measurements are needed

You'll often see questions about these cases in JEE, CBSE, and Olympiad exams as well.


Classroom Tip

A quick way to remember Law of Cosines is: “For any side squared, add the other two sides squared, subtract double their product times the cosine of the included angle.” Vedantu’s teachers often use diagrams and real-life sketches to show why this works and help students visualize triangle relationships.


Quick Reference Table

To Find Law of Cosines Variant Formula
Unknown side (c) SAS Case c² = a² + b² − 2ab cos(C)
Unknown angle (C) SSS Case cos(C) = (a² + b² − c²) / 2ab

We explored Law of Cosines—from definition, formula, step-by-step example, errors, and advanced applications. Continue practicing with Vedantu to become confident in solving triangles using this concept.


Related topics to boost your understanding:


FAQs on Understanding the Law of Cosines in Triangles

1. What is the Law of Cosines?

The Law of Cosines is a formula that relates the lengths of the sides of a triangle to the cosine of one of its angles. It states that for any triangle with sides a, b, and c and opposite angle C: c² = a² + b² − 2ab cos(C).

  • It works for all triangles, not just right triangles.
  • It is often used to find a missing side or angle.
  • It is a generalization of the Pythagorean theorem.

2. What is the formula for the Law of Cosines?

The formula for the Law of Cosines is c² = a² + b² − 2ab cos(C), where C is the angle between sides a and b.

  • Similarly: a² = b² + c² − 2bc cos(A)
  • b² = a² + c² − 2ac cos(B)
  • Each formula matches the side opposite the corresponding angle.

3. How do you use the Law of Cosines to find a side?

To find a missing side using the Law of Cosines, substitute the known sides and included angle into the formula and solve for the unknown side.

  • Example: a = 5, b = 7, C = 60°
  • c² = 5² + 7² − 2(5)(7)cos(60°)
  • c² = 25 + 49 − 70(0.5) = 74 − 35 = 39
  • c = √39 ≈ 6.24

4. How do you use the Law of Cosines to find an angle?

To find an angle, rearrange the Law of Cosines to isolate the cosine of the angle and then use the inverse cosine function.

  • Formula: cos(C) = (a² + b² − c²) / (2ab)
  • Example: a = 6, b = 8, c = 10
  • cos(C) = (36 + 64 − 100) / (2×6×8) = 0/96 = 0
  • C = cos⁻¹(0) = 90°

5. When do you use the Law of Cosines?

The Law of Cosines is used when you know either two sides and the included angle (SAS) or all three sides (SSS) of a triangle.

  • SAS: Find the third side.
  • SSS: Find a missing angle.
  • It works for acute, obtuse, and right triangles.

6. How is the Law of Cosines related to the Pythagorean theorem?

The Law of Cosines becomes the Pythagorean theorem when the angle is 90° because cos(90°) = 0.

  • Original formula: c² = a² + b² − 2ab cos(C)
  • If C = 90°, then cos(90°) = 0
  • This simplifies to c² = a² + b²

7. Can the Law of Cosines be used for right triangles?

Yes, the Law of Cosines can be used for right triangles, but it simplifies to the Pythagorean theorem.

  • When C = 90°, cos(90°) = 0
  • The formula becomes c² = a² + b²
  • It is usually easier to use the Pythagorean theorem directly.

8. What is an example problem using the Law of Cosines?

An example of the Law of Cosines is finding a side when a = 4, b = 6, and C = 120°.

  • c² = 4² + 6² − 2(4)(6)cos(120°)
  • cos(120°) = −0.5
  • c² = 16 + 36 − 48(−0.5) = 52 + 24 = 76
  • c = √76 ≈ 8.72

9. What is the difference between the Law of Sines and the Law of Cosines?

The Law of Sines relates side ratios to sines of angles, while the Law of Cosines relates sides using cosine of an included angle.

  • Law of Sines: a/sin(A) = b/sin(B) = c/sin(C)
  • Law of Cosines: c² = a² + b² − 2ab cos(C)
  • Use Law of Sines for ASA or AAS cases.
  • Use Law of Cosines for SAS or SSS cases.

10. What are common mistakes when using the Law of Cosines?

Common mistakes with the Law of Cosines include using the wrong angle or sign in the formula.

  • Using an angle that is not between the two known sides in SAS.
  • Forgetting the minus sign in − 2ab cos(C).
  • Not setting the calculator to the correct mode (degrees or radians).
  • Mixing up which side is opposite which angle.