Difference between revisions of "Heron's Formula"
m (Formatting) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Heron's Formula''' (sometimes referred to as '''Hero's formula''') is a [[mathematical formula]] for finding the [[area]] of a [[triangle]] given the three side lengths. | |
− | + | == History == | |
− | + | The formula is credited to [[Hero of Alexandria]], and a proof can be found in his book ''Metrica''. Mathematical historian [[Thomas Heath]] suggested that [[Archimedes]] knew the formula over two centuries earlier, and since ''Metrica'' is a collection of the mathematical knowledge available in the ancient world, it is possible that the formula predates the reference given in that work. | |
− | + | A formula equivalent to Heron's was discovered by Chinese mathematician [[Qin Jiushao]], published in ''[[Mathematical Treatise in Nine Sections]]'' in 1247: | |
+ | <cmath>A = \frac{1}{2} \sqrt{a^2 c^2 - (\frac{a^2 + c^2 - b^2}{2}^2)}</cmath> | ||
− | == | + | == Statement == |
− | + | In any triangle with side lengths <math>a</math>, <math>b</math>, <math>c</math>, and [[semiperimeter]] <math>s</math> the area <math>A</math> is equal to | |
− | A | + | <cmath>A = \sqrt{s(s-a)(s-b)(s-c)}</cmath> |
− | + | == Proof == | |
− | + | A common formula for area states that | |
− | + | <cmath>[ABC]=\frac{ab}{2}\sin C</cmath> | |
− | <cmath>[ABC]=\frac{ab}{2}\sin C | ||
which simplifies to | which simplifies to | ||
<cmath>[ABC]=\frac{ab}{2}\sqrt{1-\cos^2 C}.</cmath> | <cmath>[ABC]=\frac{ab}{2}\sqrt{1-\cos^2 C}.</cmath> | ||
Line 34: | Line 34: | ||
\end{align*} | \end{align*} | ||
− | ==Isosceles Triangle Simplification== | + | == Isosceles Triangle Simplification == |
<math>A=\sqrt{s(s-a)(s-b)(s-c)}</math> for all triangles | <math>A=\sqrt{s(s-a)(s-b)(s-c)}</math> for all triangles | ||
Line 42: | Line 42: | ||
<math>A=\sqrt{s(s-a)(s-b)(s-b)}</math> simplifies to <math>A=(s-b)\sqrt{s(s-a)}</math> | <math>A=\sqrt{s(s-a)(s-b)(s-b)}</math> simplifies to <math>A=(s-b)\sqrt{s(s-a)}</math> | ||
− | ==Square root simplification/modification== | + | == Square root simplification/modification == |
From <cmath>A=\sqrt{s(s-a)(s-b)(s-c)}</cmath> We can "take out" the <math>1/2</math> in each <math>s</math>, then we have <cmath>A=\frac{1}{4}\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}</cmath>Using the [[difference of squares]] on the first two and last two factors, we get <cmath>A=\frac{1}{4}\sqrt{(b^2+2bc+c^2-a^2)(a^2-b^2+2bc-c^2)}</cmath>and using the difference of squares again, we get <cmath>A=\frac{1}{4}\sqrt{(2bc)^2-(-a^2+b^2+c^2)^2}</cmath> From this equation (although seemingly not symmetrical), it is much easier to calculate the area of a certain triangle with side lengths with quantities with square roots. One can remember this formula by noticing that when finding the cosine of an angle in a triangle, the formula is <cmath>\cos{A}=\frac{-a^2+b^2+c^2}{2bc}</cmath> and the two terms in the formula are just the [[denominator]] and [[numerator]] of the fraction for <math>\cos{A}</math>, only they're squared. This can also serve as a reason for why the area <math>A</math> is never imaginary. This is equivalent of ending at step <math>4</math> in the proof and distributing. | From <cmath>A=\sqrt{s(s-a)(s-b)(s-c)}</cmath> We can "take out" the <math>1/2</math> in each <math>s</math>, then we have <cmath>A=\frac{1}{4}\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}</cmath>Using the [[difference of squares]] on the first two and last two factors, we get <cmath>A=\frac{1}{4}\sqrt{(b^2+2bc+c^2-a^2)(a^2-b^2+2bc-c^2)}</cmath>and using the difference of squares again, we get <cmath>A=\frac{1}{4}\sqrt{(2bc)^2-(-a^2+b^2+c^2)^2}</cmath> From this equation (although seemingly not symmetrical), it is much easier to calculate the area of a certain triangle with side lengths with quantities with square roots. One can remember this formula by noticing that when finding the cosine of an angle in a triangle, the formula is <cmath>\cos{A}=\frac{-a^2+b^2+c^2}{2bc}</cmath> and the two terms in the formula are just the [[denominator]] and [[numerator]] of the fraction for <math>\cos{A}</math>, only they're squared. This can also serve as a reason for why the area <math>A</math> is never imaginary. This is equivalent of ending at step <math>4</math> in the proof and distributing. | ||
− | ===Note=== | + | === Note === |
Replacing <math>-a^2+b^2+c^2</math> as <math>2bc\cos{A}</math>, the area simplifies down to <math>\frac{1}{4}\sqrt{(2bc\sin{A})^2}</math>, or <math>\frac{1}{4}\cdot2bc\sin{A}</math>, or <math>\frac{1}{2}bc\sin{A}</math>, another common area formula for the triangle. | Replacing <math>-a^2+b^2+c^2</math> as <math>2bc\cos{A}</math>, the area simplifies down to <math>\frac{1}{4}\sqrt{(2bc\sin{A})^2}</math>, or <math>\frac{1}{4}\cdot2bc\sin{A}</math>, or <math>\frac{1}{2}bc\sin{A}</math>, another common area formula for the triangle. | ||
− | == | + | == Note == |
+ | In general, it is a good advice '''not''' to use Heron's formula in computer programs whenever we can avoid it. For example, whenever vertex coordinates are known, vector product is a much better alternative. Main reasons: | ||
+ | * Computing the square root is much slower than multiplication. | ||
+ | * For triangles with area close to zero Heron's formula computed using floating point variables suffers from precision problems. | ||
− | + | == Problems == | |
− | + | === Introductory === | |
− | |||
− | |||
− | |||
− | |||
− | + | === Intermediate === | |
− | + | === Olympiad === | |
− | |||
− | |||
− | |||
− | |||
− | + | {{problem}} | |
== See Also == | == See Also == | ||
+ | |||
* [[Brahmagupta's formula]] | * [[Brahmagupta's formula]] | ||
− | * [[ | + | * [[Triangle]] |
− | + | * [[Area]] | |
− | |||
− | * [ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Geometry]] | [[Category:Geometry]] | ||
[[Category:Theorems]] | [[Category:Theorems]] | ||
+ | {{stub}} |
Latest revision as of 19:11, 24 February 2025
Heron's Formula (sometimes referred to as Hero's formula) is a mathematical formula for finding the area of a triangle given the three side lengths.
Contents
History
The formula is credited to Hero of Alexandria, and a proof can be found in his book Metrica. Mathematical historian Thomas Heath suggested that Archimedes knew the formula over two centuries earlier, and since Metrica is a collection of the mathematical knowledge available in the ancient world, it is possible that the formula predates the reference given in that work.
A formula equivalent to Heron's was discovered by Chinese mathematician Qin Jiushao, published in Mathematical Treatise in Nine Sections in 1247:
Statement
In any triangle with side lengths ,
,
, and semiperimeter
the area
is equal to
Proof
A common formula for area states that
which simplifies to
The Law of Cosines states that in triangle ,
, which can be written as
. Thus,
Now, we can simplify: \begin{align*} [ABC] &= \sqrt{\frac{a^2b^2}{4} \left( 1 - \frac{(a^2 + b^2 - c^2)^2}{4a^2b^2} \right)} \\ &= \sqrt{\frac{4a^2b^2 - (a^2 + b^2 - c^2)^2}{16}} \\ &= \sqrt{\frac{(2ab + a^2 + b^2 - c^2)(2ab - a^2 - b^2 + c^2)}{16}} \\ &= \sqrt{\frac{((a + b)^2 - c^2)((a - b)^2 - c^2)}{16}} \\ &= \sqrt{\frac{(a + b + c)(a + b - c)(b + c - a)(a + c - b)}{16}} \\ &= \sqrt{s(s - a)(s - b)(s - c)} \end{align*}
Isosceles Triangle Simplification
for all triangles
for all isosceles triangles
simplifies to
Square root simplification/modification
From We can "take out" the
in each
, then we have
Using the difference of squares on the first two and last two factors, we get
and using the difference of squares again, we get
From this equation (although seemingly not symmetrical), it is much easier to calculate the area of a certain triangle with side lengths with quantities with square roots. One can remember this formula by noticing that when finding the cosine of an angle in a triangle, the formula is
and the two terms in the formula are just the denominator and numerator of the fraction for
, only they're squared. This can also serve as a reason for why the area
is never imaginary. This is equivalent of ending at step
in the proof and distributing.
Note
Replacing as
, the area simplifies down to
, or
, or
, another common area formula for the triangle.
Note
In general, it is a good advice not to use Heron's formula in computer programs whenever we can avoid it. For example, whenever vertex coordinates are known, vector product is a much better alternative. Main reasons:
- Computing the square root is much slower than multiplication.
- For triangles with area close to zero Heron's formula computed using floating point variables suffers from precision problems.
Problems
Introductory
Intermediate
Olympiad
This problem has not been edited in. Help us out by adding it.
See Also
This article is a stub. Help us out by expanding it.