Trigonometry Guide

Law of Cosines Explained

Learn how to solve non-right triangles when you know two sides and the included angle or all three side lengths.

Oblique Triangle Trigonometry

What Is the Law of Cosines?

The Law of Cosines relates the three side lengths of a triangle to the cosine of one of its angles.

It is especially useful when the Law of Sines does not immediately give you a complete side-angle pair.

The Law of Cosines

Match the Opposite Side with the Angle

\[ a^2 = b^2+c^2 - 2bc\cos A \]
\[ b^2 = a^2+c^2 - 2ac\cos B \]
\[ c^2 = a^2+b^2 - 2ab\cos C \]
The pattern:

The side alone on the left is opposite the angle used in the cosine term.

The Most Important Pattern

Side \(c\) Goes with Angle \(C\)

If you are solving for side \(c\), use angle \(C\). If you are solving for angle \(C\), the side opposite it is still \(c\).

\(a\) ↔ \(A\)

Side \(a\) is opposite angle \(A\).

\(b\) ↔ \(B\)

Side \(b\) is opposite angle \(B\).

\(c\) ↔ \(C\)

Side \(c\) is opposite angle \(C\).

Focus on the Opposite Pair

In \(c^2=a^2+b^2-2ab\cos C\), side \(c\) is directly opposite angle \(C\).

Visual Model

See the Opposite Pair

In triangle \(ABC\), each lowercase side is opposite the matching uppercase angle.

A B C a b c
Side \(a\) is opposite angle \(A\), side \(b\) is opposite angle \(B\), and side \(c\) is opposite angle \(C\).

Match the Angle to the Opposite Side

In the formula for \(c^2\), the cosine term must use angle \(C\), because \(C\) is opposite side \(c\).

Choosing the Method

When Should You Use the Law of Cosines?

The Law of Cosines is most useful when the given information is SAS or SSS.

SAS

Side-Angle-Side

Two sides and the angle between them are known.

\[ a,\ C,\ b \]

Use the Law of Cosines to find the side opposite the included angle.

SSS

Side-Side-Side

All three side lengths are known.

\[ a,\ b,\ c \]

Rearrange the Law of Cosines and use inverse cosine to find an angle.

Method Check

Law of Sines or Law of Cosines?

1

ASA or AAS?

Use the Law of Sines.

2

SSA?

Usually use the Law of Sines, then check the ambiguous case.

3

SAS?

Use the Law of Cosines.

4

SSS?

Use the Law of Cosines.

Quick Decision Rule

Look at What You Know

Complete Side-Angle Pair?

If you already know a side and its opposite angle, the Law of Sines is often the natural choice.

No Complete Pair?

If you have SAS or SSS, the Law of Cosines is usually the right tool.

Shortcut SAS or SSS → think Law of Cosines.

Worked Examples

Solving with the Law of Cosines

Use the version of the formula that matches the side or angle you are trying to find.

Example 1

Find a Missing Side

SAS

In triangle \(ABC\), \(a=8\), \(b=11\), and \(C=47^\circ\). Find side \(c\).

A B C = 47° a = 8 b = 11 c = ?
  1. Identify the opposite pair.

    We are finding side \(c\), so we use angle \(C\).

  2. Write the correct formula.
    \[ c^2 = a^2+b^2 - 2ab\cos C \]
  3. Substitute.
    \[ c^2 = 8^2+11^2 - 2(8)(11) \cos(47^\circ) \]
  4. Evaluate the right side.
    \[ c^2 \approx 64+121-120.03 \] \[ c^2 \approx 64.97 \]
  5. Take the square root.
    \[ c \approx \sqrt{64.97} \] \[ c \approx 8.06 \]
Answer \[ \boxed{ c\approx8.06 } \]

Example 2

Find a Missing Angle

SSS

In triangle \(ABC\), \(a=7\), \(b=10\), and \(c=12\). Find angle \(C\).

A B C = ? a = 7 b = 10 c = 12
  1. Start with the formula for \(c\).
    \[ c^2 = a^2+b^2 - 2ab\cos C \]
  2. Substitute the side lengths.
    \[ 12^2 = 7^2+10^2 - 2(7)(10)\cos C \]
  3. Simplify.
    \[ 144 = 49+100 - 140\cos C \] \[ 144 = 149 - 140\cos C \]
  4. Solve for \(\cos C\).
    \[ -5 = -140\cos C \] \[ \cos C = \frac{1}{28} \]
  5. Use inverse cosine.
    \[ C = \cos^{-1} \left( \frac{1}{28} \right) \] \[ C \approx 88.0^\circ \]
Answer \[ \boxed{ C\approx88.0^\circ } \]

Finding Angles

Rearranging the Law of Cosines

When all three sides are known, rearrange the formula to isolate the cosine of the angle you want.

Find Angle \(A\)

\[ \cos A = \frac{ b^2+c^2-a^2 }{ 2bc } \]
\[ A = \cos^{-1} \left( \frac{ b^2+c^2-a^2 }{ 2bc } \right) \]

Find Angle \(B\)

\[ \cos B = \frac{ a^2+c^2-b^2 }{ 2ac } \]
\[ B = \cos^{-1} \left( \frac{ a^2+c^2-b^2 }{ 2ac } \right) \]

Find Angle \(C\)

\[ \cos C = \frac{ a^2+b^2-c^2 }{ 2ab } \]
\[ C = \cos^{-1} \left( \frac{ a^2+b^2-c^2 }{ 2ab } \right) \]

Calculator Reminder

When finding an angle, use inverse cosine, written \(\cos^{-1}\), and make sure your calculator is in degree mode.

Watch Out

Common Law of Cosines Mistakes

Using the Wrong Angle

If the formula begins with \(c^2\), the cosine term must contain angle \(C\).

\[ c^2 = a^2+b^2 - 2ab\cos C \]

Forgetting the Minus Sign

The cosine term is subtracted.

\[ -2ab\cos C \]

Forgetting the Square Root

When finding a side, the formula gives \(c^2\), not \(c\). Take the square root at the end.

\[ c = \sqrt{ a^2+b^2 - 2ab\cos C } \]

Using Regular Cosine for an Angle

After solving for \(\cos C\), use inverse cosine to recover the angle.

\[ C = \cos^{-1}(\text{value}) \]

Using the Wrong Triangle Case

SAS and SSS point toward the Law of Cosines. A known opposite side-angle pair often points toward the Law of Sines.

Rounding Too Early

Keep several calculator digits during your work and round only the final answer.

The Process

Law of Cosines Recipe

1

Identify the Given Information

Decide whether you have SAS or SSS.

2

Identify the Opposite Pair

Match the side you are finding with its opposite angle.

3

Choose the Correct Formula

If you need \(c\) or \(C\), use the formula involving \(c^2\) and \(\cos C\).

4

Substitute Carefully

Put each side and angle in its matching position.

5

Solve

Take a square root when finding a side or use inverse cosine when finding an angle.

6

Check Your Answer

Make sure the result makes sense for the triangle and round only at the end.

Remember This

The Law of Cosines in One Minute

Use it for SAS and SSS
Finding a side Solve for \(a^2\), \(b^2\), or \(c^2\), then square root.
Finding an angle Isolate cosine, then use \(\cos^{-1}\).
Key pairing \(a\leftrightarrow A\), \(b\leftrightarrow B\), \(c\leftrightarrow C\)

Your Turn

Ready to Practice?

Work through Law of Cosines problems involving formula setup, SAS, SSS, missing sides, and missing angles.

Start Law of Cosines Practice

Personalized Math Support

Need Help Making Sense of the Math?

If a concept still feels confusing, you do not have to work through it alone. Tell me what you are studying and where you are getting stuck, and I will help you determine the best next step.

Support Free Math Resources

Find this resource helpful?

RaulTheTutor.com provides free interactive tools, guides, reference resources, and practice materials for students, parents, and teachers. If this resource helped you, consider making an optional contribution to support the development of more free math resources.

Support Free Math Resources