The Pythagorean theorem is a special case of the more general theorem relating the lengths of sides in any triangle, the law of cosines:[1]
![{\displaystyle a^{2}+b^{2}-2ab\cos(\theta )=c^{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/67173e88348b96452a5bd1d3137b9fd57cfcd736)
where
is the angle between sides
and
.
This formula had better agree with the Pythagorean Theorem when
.
So try it...
When
,
The
and the formula reduces to the usual Pythagorean theorem.
For any triangle with angles
and corresponding opposite side lengths
, the Law of Cosines states that
![{\displaystyle a^{2}=b^{2}+c^{2}-2bc\cdot \cos(A)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e66513430f4cdec8f14b4afe4b6d08f3f2d2fe66)
![{\displaystyle b^{2}=a^{2}+c^{2}-2ac\cdot \cos(B)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/618222013d5a3fb2294406ecd5804c602f9fa99d)
![{\displaystyle c^{2}=a^{2}+b^{2}-2ab\cdot \cos(C)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5e35c1472ec4fe93d7e0b02e97b68e525e4571d3)
Dropping a perpendicular
from vertex
to intersect
(or
extended) at
splits this triangle into two right-angled triangles
and
, with altitude
from side
.
First we will find the lengths of the other two sides of triangle
in terms of known quantities, using triangle
.
![{\displaystyle h=a\sin(B)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/43d711a030e9ce559906690fcefd26f88e732621)
Side
is split into two segments, with total length
.
has length ![{\displaystyle {\overline {BC}}\cos(B)=a\cos(B)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bdf4ce6ee46cb39ba8517c951d8d11219d2d9030)
has length ![{\displaystyle c-a\cos(B)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ae0afa3983e2689589f712620b5e0b18e715b428)
Now we can use the Pythagorean Theorem to find
, since
.
|
|
|
|
|
|
The corresponding expressions for
and
can be proved similarly.
The formula can be rearranged:
![{\displaystyle \cos(C)={\frac {a^{2}+b^{2}-c^{2}}{2ab}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a4259b3032961c3bc38c319cc3d16f4df3366be5)
and similarly for
and
.
This formula can be used to find the third side of a triangle if the other two sides and the angle between them are known. The rearranged formula can be used to find the angles of a triangle if all three sides are known. See Solving Triangles Given SAS.
- ↑
Lawrence S. Leff (2005-05-01). cited work. Barron's Educational Series. p. 326. ISBN 0764128922.