Difference between revisions of "Heron's Formula"
(→Theorem) |
Michael5210 (talk | contribs) (→Proof) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
== Proof == | == Proof == | ||
− | Using basic Trigonometry, we have | + | Using basic [[Trigonometry]], we have |
<cmath>[ABC]=\frac{ab}{2}\sin C, </cmath> | <cmath>[ABC]=\frac{ab}{2}\sin C, </cmath> | ||
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> | ||
− | The Law of Cosines states that in triangle <math>ABC</math>, <math>c^2 = a^2 + b^2 - 2ab\cos C</math>, which can be written as <math>\cos C = \frac{a^2 + b^2 - c^2}{2ab}</math>. Thus, | + | The [[Law of Cosines]] states that in triangle <math>ABC</math>, <math>c^2 = a^2 + b^2 - 2ab\cos C</math>, which can be written as <math>\cos C = \frac{a^2 + b^2 - c^2}{2ab}</math>. Thus, |
<math>[ABC]=\frac{ab}{2}\sqrt{1-\left(\frac{a^2+b^2-c^2}{2ab}\right)^2}.</math> | <math>[ABC]=\frac{ab}{2}\sqrt{1-\left(\frac{a^2+b^2-c^2}{2ab}\right)^2}.</math> | ||
Line 37: | Line 37: | ||
<math>b=c</math> for all isosceles triangles | <math>b=c</math> for all isosceles triangles | ||
− | <math>A=\sqrt{s(s-a)(s-b)(s-b)}</math> simplifies to <math>A=(s-b)\sqrt{s(s-a)} | + | <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== |
Latest revision as of 22:45, 6 October 2024
Heron's Formula (sometimes called Hero's formula) is a formula for finding the area of a triangle given only the three side lengths.
Contents
[hide]Theorem
For any triangle with side lengths , the area can be found using the following formula:
where the semi-perimeter .
Proof
Using basic Trigonometry, we have which simplifies to
The Law of Cosines states that in triangle , , which can be written as . Thus,
Now, we can simplify:
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.
Example
Let's say that you have a right triangle with the sides , , and . Your semi- perimeter would be since ÷ is . Then you have , , . The square root of is . The area of your triangle is .
See Also
External Links
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.