The law of cosines

Use this when two sides and their included angle are known, or when all three sides are known.

0/5 marked as readthis browser

What’s happening here?

The law of cosines extends the Pythagorean theorem to triangles that need not have a right angle. The included angle controls how far apart the two known sides spread.

KEEP THIS RELATIONSHIP

For sides a and b with included angle C, the opposite side satisfies c2=a2+b2−2abcos⁡Cc^2=a^2+b^2-2ab\cos C.

A worked example.

A triangle has sides 5 and 7 with included angle 60∘60^\circ. Find the opposite side.
  1. 1

    Use c2=52+72−2(5)(7)cos⁡60∘c^2=5^2+7^2-2(5)(7)\cos60^\circ.

  2. 2

    Since cos⁡60∘=1/2\cos60^\circ=1/2, c2=25+49−35=39c^2=25+49-35=39.

  3. 3

    A side length is positive, so c=39c=\sqrt{39}.

A common wrong turn.

The angle must be between the two known sides. The opposite side is the one isolated on the left of the formula.

Why this works.

The cosine correction measures how far a triangle differs from a right triangle. At 90° the correction is zero, recovering Pythagoras. For an obtuse included angle the cosine is negative, making the opposite side longer than the right-angle comparison.

Check it. Apply it. Explain it.

Three questions, with hints and worked feedback. Your score counts your first submitted answer. Practice only · scores stay in this session and do not enter your account history.

Question 1 of 30 correct / 0 answered

The law of cosines

Sides 3 and 4 have an included angle of 90°. The opposite side is…

Videos and further reading

These resources open in a new tab on the publisher’s website.

Finished reading?Stored in this browser; separate from practice grades.

Put the idea to work.

Try the three-question practice above, then bring a related problem to the AI Solver for an explained solution.

Open AI Solver Explore the visual lab