Find a course

Module 5: Solving Any TriangleLesson 11 of 1115 min

The Law of Sines and the Law of Cosines

Solve non-right triangles with the law of sines and the law of cosines, choose the right law for the given information, and find triangle areas.

Step 1 of 13Learn

Triangles without right angles

Two lookouts stand 10 km apart on a straight coastline. Both spot the same ship. The first measures a 40° angle between the coastline and the ship; the second measures 60°. How far is the ship from the first lookout?

There's no right angle anywhere in that triangle, so SOH CAH TOA doesn't apply directly. Triangles like this are called oblique triangles, and two laws handle them: the law of sines and the law of cosines.

First, a labeling convention used in both laws: name the angles with capital letters A, B, C and the sides opposite them with matching lowercase letters a, b, c. Side a is across from angle A, and so on. This pairing of each angle with the side across from it is the heart of the law of sines.

In the lookout problem, call the first lookout A, the second B and the ship C. Then:

  • Angle A = 40°, angle B = 60°, so angle C = 180° − 40° − 60° = 80°.
  • Side c, opposite the ship, is the 10 km coastline.
  • The distance from the first lookout to the ship is side b, opposite angle B.

The law of sines will finish this in one line.

Step 2 of 13Diagram

Naming any triangle

Capital letters for angles, matching lowercase letters for the sides across from them. Both laws depend on this pairing.

Naming any triangleParts diagram: Triangle ABC, Angle A, Angle B, Angle C, Side a (across from A), Side b (across from B), Side c (across from C).Triangle ABCAngle AAngle BAngle CSide a (acrossfrom A)Side b (acrossfrom B)Side c (acrossfrom C)

Tap a shape with to see more.

Triangle ABC
Angle A
Angle B
Angle C
Side a (across from A)
Side b (across from B)
Side c (across from C)

In the lookout problem, c is the 10 km coastline between the observers.

Step 3 of 13Learn

The law of sines

In any triangle, each side divided by the sine of its opposite angle gives the same number:

a / sin A = b / sin B = c / sin C

Use any two of these fractions to make a proportion. For the lookouts, we know c and C and want b:

b / sin 60° = 10 / sin 80° b = 10 × sin 60° / sin 80° ≈ 10 × 0.8660 / 0.9848 ≈ 8.79 km

The law of sines works when you know a side and its opposite angle, plus one more piece. That happens in two situations:

  • AAS or ASA: two angles and any side. Find the third angle by subtracting from 180°, then you have a matching pair.
  • SSA: two sides and an angle opposite one of them. This case can be tricky, as you'll see shortly.

It also explains a fact you may have noticed: the largest side is always across from the largest angle, since a bigger sine needs a bigger side to keep the ratios equal.

You can also flip the fractions: sin A / a = sin B / b = sin C / c. That form is easier when you're solving for an angle.

Step 4 of 13Practice · Work it out

In triangle ABC, A = 35°, B = 75° and a = 12. Find b to the nearest tenth.

Step 5 of 13Learn

The law of cosines

The law of sines needs a side paired with its opposite angle. When you don't have such a pair, use the law of cosines:

c2 = a2 + b2 − 2ab cos C

It works for any side, with letters rotated: a2 = b2 + c2 − 2bc cos A, and so on. The angle in the formula is always the one between the two sides on the right, opposite the side on the left.

Use it in two cases:

  • SAS: two sides and the angle between them. Find the third side directly.
  • SSS: three sides. Rearrange to find an angle: cos C = (a2 + b2 − c2) / (2ab).

Example: two hiking trails leave a trailhead at a 60° angle. One goes 7 km and the other 9 km. How far apart are the ends?

c2 = 49 + 81 − 2(7)(9) cos 60° = 130 − 126(0.5) = 130 − 63 = 67, so c ≈ 8.19 km.

Notice what happens when C = 90°: cos 90° = 0, and the formula becomes c2 = a2 + b2. The law of cosines is the Pythagorean theorem with a correction term for angles that aren't right. If C is obtuse, cos C is negative, the correction is added, and c comes out longer, as it should.

Step 6 of 13Try the calculator

Two sides and the included angle (SAS)

Enter two sides and the angle between them. The calculator uses the law of cosines for the third side and ½ab sin C for the area. Try C = 90° to see the Pythagorean theorem, then an obtuse angle like 120°.

Third side c = √(a² + b² − 2ab cos C)
8.185
Area = ½ab sin C
27.28

Step 7 of 13Practice · Work it out

Two sides of a triangle are 5 and 8, and the angle between them is 120°. Find the third side.

Step 8 of 13Compare

Which law should you use?

AspectWhat you knowUse first
AAS: two angles and a non-included sideTwo angles, one sideLaw of sines
ASA: two angles and the side between themTwo angles, one sideLaw of sines (find the third angle first)
SAS: two sides and the angle between themTwo sides, included angleLaw of cosines
SSS: all three sidesThree sidesLaw of cosines (solve for an angle)
SSA: two sides and a non-included angleTwo sides, one opposite angleLaw of sines, but check for 0, 1 or 2 triangles

Step 9 of 13Practice · Sort into groups

Which law should you use first to solve each triangle?

Tap an item, then tap its group (or drag it there).

Step 10 of 13Note

Step 11 of 13Learn

Area with sine

You may know area = ½ × base × height. Trigonometry lets you find that height when you don't have it.

In a triangle with sides a and b and the angle C between them, the height to side a is b sin C. So:

Area = ½ ab sin C

Example: a garden bed is a triangle with sides 8 m and 11 m meeting at a 30° angle. Its area is ½ × 8 × 11 × sin 30° = ½ × 88 × 0.5 = 22 m2.

Like the law of cosines, this uses two sides and the included angle. When the angle is 90°, sin 90° = 1 and the formula becomes ½ab, the familiar right-triangle area.

A neat consequence: for two fixed sides, the area is largest when the angle between them is 90°, because sin C peaks at 1 there. Open the angle wider or narrower and the triangle flattens, losing area. You can see this in the calculator above by keeping a and b fixed and sliding C.

With these tools, you can solve any triangle: right triangles with SOH CAH TOA, and all others with the law of sines, the law of cosines and the sine area formula.

Step 12 of 13Practice · Choose one

A triangle has sides 5, 7 and 9. What is the best first step to find its largest angle?

Step 13 of 13Practice · Work it out

Find the area of a triangle with sides 10 cm and 14 cm and an included angle of 40°, to the nearest square centimeter.