Skip to content
Tutorials Center
My learning

Topics

Lesson 31 of 38 · The Laws of Sines and Cosines

Area of a Triangle and Heron's Formula

Find the area of any triangle with ½ab sin C or Heron's formula, connect area to the circumradius and inradius, and compare methods in code.

You know that the area of a triangle is ½ × base × height. But the height is often not given. If you know two sides and the angle between them, or all three sides, trigonometry gives the area directly, with no need to draw a perpendicular.

Two sides and the included angle

Draw the altitude from A to side a. Its length is h = c sin B. So the area is

Text
Area = ½ · a · h = ½ · a · c · sin B

By symmetry, for any pair of sides and the angle between them:

Text
Area = ½ ab sin C = ½ bc sin A = ½ ac sin B

Example. Two sides of 9 m and 14 m enclose a 35° angle. The area is ½ · 9 · 14 · sin 35° = 63 × 0.5736 ≈ 36.14 m².

When the angle is 90°, sin 90° = 1 and the formula becomes ½ab, the familiar right-triangle area.

Three sides: Heron's formula

If you know all three sides, compute the semi-perimeter s = (a + b + c) / 2 and then

Text
Area = √( s (s − a)(s − b)(s − c) )

Example. Sides 13, 14, 15: s = 21, and the area is √(21 · 8 · 7 · 6) = √7056 = 84. This triangle (13-14-15) is a famous one because its area is a whole number.

Example. Sides 5, 6, 7: s = 9, area = √(9 · 4 · 3 · 2) = √216 ≈ 14.70.

The factors s − a, s − b, s − c are all positive exactly when the triangle inequality holds. If any is zero or negative, no genuine triangle exists.

Why it works (sketch)

Start with Area = ½ ab sin C, write sin C = √(1 − cos²C), and substitute cos C = (a² + b² − c²) / 2ab from the law of cosines. After factoring a difference of squares twice, you get 16 · Area² = (a + b + c)(−a + b + c)(a − b + c)(a + b − c), which is Heron's formula in disguise.

Python Three ways to get the same area

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Connections: circumradius and inradius

Combining area formulas with the law of sines gives two useful facts.

  • Circumradius R (circle through all three vertices): R = abc / (4K) where K is the area.
  • Inradius r (circle touching all three sides): r = K / s.

For the 13-14-15 triangle, K = 84, so R = 13·14·15 / 336 = 2730/336 = 8.125 and r = 84/21 = 4.

Python Circumradius and inradius

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that for the 3-4-5 right triangle, R = 2.5: the hypotenuse is a diameter of the circumscribed circle. That matches a well-known geometry theorem.

Which formula should you use?

You know Formula
base and height ½ bh
two sides and the included angle ½ ab sin C
three sides Heron's formula
two angles and a side first find another side with the law of sines, then ½ ab sin C

Heron's formula can lose accuracy for very thin triangles (a tiny angle) because s − a becomes the difference of two nearly equal numbers. For hand-sized problems it is perfectly fine.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the area of a triangle with sides 6 cm and 10 cm enclosing an angle of 30°?

    ½ · 6 · 10 · sin 30° = 30 × 0.5 = 15 cm².
  2. 2. What is the area of the triangle with sides 7, 8 and 9?

    s = 12, so area = √(12 · 5 · 4 · 3) = √720 ≈ 26.83.
  3. 3. In Heron's formula, what is s?

    s is the semi-perimeter, (a + b + c)/2.
  4. 4. For the 13-14-15 triangle (area 84), what is the inradius?

    r = K / s = 84 / 21 = 4.

Summary

  • Area = ½ ab sin C for two sides and the included angle.
  • Heron: Area = √(s(s − a)(s − b)(s − c)) with s = (a + b + c)/2.
  • R = abc / (4K) and r = K / s.
  • A right angle makes sin C = 1, reducing to ½ab.
  • Compare methods in code to catch mistakes.

Next: Bearings, Elevation and Depression