Calculadora da fórmula de Heron
Resultados
Fórmulas usadas em Calculadora da fórmula de Heron
In-Depth Tutorial: Calculadora da fórmula de Heron
Heron's formula (named after Heron of Alexandria, ~10-70 AD) computes the area of any triangle from JUST its three side lengths — no height, no angles needed. This is one of the most elegantly useful formulas in geometry: given a, b, c, the area is
Area = √(s(s − a)(s − b)(s − c))
where s = (a + b + c) / 2 is the semi-perimeter (half the perimeter). This tutorial walks through how to apply the formula, two equivalent forms, the famous proof, and when Heron's formula is preferable to the ½×base×height approach.
Why Heron's formula is useful
The standard triangle area formula is A = ½ × base × height. This requires knowing a base AND the perpendicular height to that base. In many problems you have the three side lengths but not the height — and computing the height first requires extra steps (often the Pythagorean theorem on a constructed perpendicular).
Heron's formula skips the height entirely. Three sides in, area out. One step.
The two equivalent forms
Form 1 (semi-perimeter): Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2.
Form 2 (no semi-perimeter): Area = (1/4)√(4a²b² − (a² + b² − c²)²).
Form 2 avoids computing s separately but introduces a more complex expression under the square root. Form 1 is more common in textbooks and easier to write by hand. Both produce the same answer.
Worked example 1 — the 3-4-5 right triangle
Sides: a = 3, b = 4, c = 5 (the famous Pythagorean triple).
Step 1: s = (3 + 4 + 5) / 2 = 6.
Step 2: Area = √(6 × (6−3) × (6−4) × (6−5)) = √(6 × 3 × 2 × 1) = √36 = 6.
Verification: since 3-4-5 is right-angled with legs 3 and 4, area = ½ × 3 × 4 = 6. ✓ Heron agrees.
Worked example 2 — scalene triangle
Sides: a = 7, b = 8, c = 9.
s = (7 + 8 + 9) / 2 = 12.
Area = √(12 × 5 × 4 × 3) = √720 ≈ 26.833.
No "nice" height is needed — and computing the height by hand would require either Pythagorean theorem applied to a constructed perpendicular, or trigonometry. Heron skips all that.
Worked example 3 — equilateral triangle
For an equilateral triangle with side s: a = b = c = s. Then semi-perimeter = 3s/2.
Area = √((3s/2)(3s/2 − s)(3s/2 − s)(3s/2 − s)) = √((3s/2)(s/2)³) = √(3s⁴/16) = (s²√3)/4.
This matches the classic equilateral area formula A = (√3 / 4) s² — confirming Heron's formula reduces to the standard formula in this special case.
The proof — outline
Heron's formula can be proven several ways. The most accessible:
- Drop an altitude from one vertex (say C) to the opposite side (c). This creates two right triangles inside the original.
- Let the altitude have length h, and let the altitude land on side c at distance x from one endpoint.
- By Pythagorean theorem: in one sub-triangle, x² + h² = b². In the other, (c − x)² + h² = a².
- Subtract: (c − x)² − x² = a² − b², giving x = (b² + c² − a²) / (2c).
- Substitute back to find h² in terms of a, b, c.
- Area = ½ × c × h. Expanding and simplifying gives Heron's formula.
The algebra is messy but every step is elementary. Try it as an exercise — it is one of the most satisfying derivations in plane geometry.
Numerical stability concern
The straight Heron formula has a numerical pitfall for "needle" triangles (very long and thin, where one side is nearly as long as the sum of the other two). In that case, (s − longest) becomes very small, and the multiplication s(s−a)(s−b)(s−c) suffers catastrophic cancellation in floating-point arithmetic.
The fix is Kahan's stable Heron formula:
Sort sides so a ≥ b ≥ c. Then:
Area = (1/4)√((a + (b + c))(c − (a − b))(c + (a − b))(a + (b − c)))
This rearrangement avoids the cancellation issue. Our calculator uses the Kahan-stable form for production accuracy (see calculator-engine.js, v1.20.62-68 fixes).
Real-world applications
- Surveying. Surveyors often measure three side lengths but not interior heights. Heron's gives them area directly.
- Construction. Computing material needs for a triangular roof or land plot from boundary measurements.
- Computer graphics. Triangle area is used in collision detection, lighting calculations (barycentric coordinates), and mesh quality metrics.
- Map / GIS. Computing the area of a triangular GPS-defined region from its three corner coordinates (which give you three side lengths via distance formula).
When NOT to use Heron's formula
- When you know base and height already. Just use A = ½ × base × height — fewer operations, more numerically stable.
- When you have two sides and an included angle (SAS). Use A = ½ × a × b × sin(C) — direct trigonometry.
- For right triangles where you can identify the legs. Use A = ½ × leg1 × leg2.
Heron is the "no special info" fallback — when none of these shortcuts apply.
Common mistakes
- Forgetting the semi-perimeter is HALF the perimeter. s = (a + b + c) / 2. Some students use s = a + b + c (full perimeter) and get the wrong answer.
- Sign errors inside the square root. If (s − a), (s − b), or (s − c) comes out negative, your three sides don't form a valid triangle (violates the triangle inequality). Check inputs.
- Computing s(s−a)(s−b)(s−c) and forgetting to take the square root. The formula gives Area² inside the square root. Take √ at the end.
- Mixing units. All three sides must be in the same unit. Area comes out in squared units of that same unit.
Perguntas frequentes – Calculadora da fórmula de Heron
Ela calcula a área de um triângulo a partir apenas dos comprimentos dos três lados: Área = √(s(s−a)(s−b)(s−c)), onde s = (a+b+c)/2 é o semiperímetro.
Quando você conhece os três lados, mas não a altura — comum em problemas de LLL (lado-lado-lado). Ela evita a necessidade de encontrar primeiro uma altura perpendicular.
s = (a + b + c) / 2 — simplesmente metade do perímetro. É um passo intermediário usado dentro da fórmula.
Sim — grátis e ilimitado.