Difference between revisions of "Heron's Formula"
(→Proof) |
(→Proof) |
||
Line 29: | Line 29: | ||
<math>=\sqrt{s(s-a)(s-b)(s-c)}</math> | <math>=\sqrt{s(s-a)(s-b)(s-c)}</math> | ||
+ | |||
+ | == Proof == | ||
+ | |||
+ | <math>b^2 - (a-x)^2 = h^2</math> | ||
+ | <math>b^2 - a^2 + 2ax - x^2 = h^2</math> | ||
+ | |||
+ | <math>c^2 - h^2 = h^2</math> | ||
+ | |||
+ | <math>b^2 - a^2 + 2ax - x^2 = c^2 - x^2</math> | ||
+ | |||
+ | <math>2ax = c^2 - b^2 + a^2</math> | ||
+ | <math>x = (c^2 - b^2 + a^2)/2a</math> | ||
== See Also == | == See Also == |
Revision as of 18:43, 8 February 2016
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
Proof
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.