# 余弦定理本文重定向自 餘弦公式

${\displaystyle c^{2}=a^{2}+b^{2}-2ab\cos \gamma }$

${\displaystyle b^{2}=c^{2}+a^{2}-2ca\cos \beta }$
${\displaystyle a^{2}=b^{2}+c^{2}-2bc\cos \alpha }$

${\displaystyle c^{2}=a^{2}+b^{2}}$

## 历史

${\displaystyle {\overline {AB}}^{2}={\overline {CA}}^{2}+{\overline {CB}}^{2}+2({\overline {CA}})({\overline {CH}})\,}$

${\displaystyle {\overline {AB}}^{2}={\overline {CA}}^{2}+{\overline {CB}}^{2}-2({\overline {CA}})({\overline {BC}})\cos \gamma }$

## 证明

### 三角函数

${\displaystyle c=a\cos \beta +b\cos \alpha }$

${\displaystyle c^{2}=ac\cos \beta +bc\cos \alpha }$

${\displaystyle a^{2}=ac\cos \beta +ab\cos \gamma }$
${\displaystyle b^{2}=bc\cos \alpha +ab\cos \gamma }$

${\displaystyle a^{2}+b^{2}=ac\cos \beta +ab\cos \gamma +bc\cos \alpha +ab\cos \gamma }$
${\displaystyle =(ac\cos \beta +bc\cos \alpha )+(ab\cos \gamma +ab\cos \gamma )}$
${\displaystyle =c^{2}+2ab\cos \gamma }$
${\displaystyle c^{2}=a^{2}+b^{2}-2ab\cos \gamma }$

### 勾股定理

#### 勾股定理之一

${\displaystyle \triangle ABC}$中，${\displaystyle {\overline {AB}}=c}$${\displaystyle {\overline {BC}}=a}$${\displaystyle {\overline {AC}}=b}$。过${\displaystyle B}$点作${\displaystyle AC}$垂线，垂足为${\displaystyle D}$，如果${\displaystyle D}$${\displaystyle AC}$内部，则${\displaystyle BD}$的长度为${\displaystyle a\sin C}$${\displaystyle DC}$的长度为${\displaystyle a\cos C}$${\displaystyle AD}$的长度为${\displaystyle b-a\cos C}$。根据勾股定理

${\displaystyle c^{2}=(a\sin C)^{2}+(b-a\cos C)^{2}\,}$
${\displaystyle c^{2}=a^{2}\sin ^{2}C+b^{2}-2ab\cos C+a^{2}\cos ^{2}C\,}$
${\displaystyle c^{2}=a^{2}(\sin ^{2}C+\cos ^{2}C)+b^{2}-2ab\cos C\,}$
${\displaystyle c^{2}=a^{2}+b^{2}-2ab\cos C\,}$

#### 勾股定理之二

${\displaystyle \triangle ABC}$中，${\displaystyle {\overline {AB}}=c}$${\displaystyle {\overline {BC}}=a}$${\displaystyle {\overline {AC}}=b}$。过${\displaystyle B}$点作${\displaystyle {\overline {AC}}}$垂线，垂足为${\displaystyle D}$，设${\displaystyle {\overline {AD}}=x}$，则${\displaystyle {\overline {CD}}=b-x}$，根据勾股定理

${\displaystyle c^{2}-x^{2}={\overline {BD}}^{2}=a^{2}-(b-x)^{2}}$
${\displaystyle c^{2}-x^{2}=a^{2}-b^{2}-x^{2}+2bx}$
${\displaystyle c^{2}=a^{2}-b^{2}+2bx}$
${\displaystyle x={\frac {b^{2}+c^{2}-a^{2}}{2b}}}$
${\displaystyle \cos A={\frac {x}{c}}={\frac {b^{2}+c^{2}-a^{2}}{2bc}}}$

## 应用

### 求边

${\displaystyle a={\sqrt {b^{2}+c^{2}-2bc\cos A}}}$
${\displaystyle b={\sqrt {c^{2}+a^{2}-2ac\cos B}}}$
${\displaystyle c={\sqrt {a^{2}+b^{2}-2ab\cos C}}}$

### 求角

${\displaystyle \cos A={\frac {b^{2}+c^{2}-a^{2}}{2bc}}\,\!}$
${\displaystyle \cos B={\frac {c^{2}+a^{2}-b^{2}}{2ca}}\,\!}$
${\displaystyle \cos C={\frac {a^{2}+b^{2}-c^{2}}{2ab}}\,\!}$

${\displaystyle \angle A=\arccos {\frac {b^{2}+c^{2}-a^{2}}{2bc}}\,\!}$
${\displaystyle \angle B=\arccos {\frac {c^{2}+a^{2}-b^{2}}{2ca}}\,\!}$
${\displaystyle \angle C=\arccos {\frac {a^{2}+b^{2}-c^{2}}{2ab}}\,\!}$

## 参考资料

1. ^ In obtuse-angled triangles the square on the side subtending the obtuse angle is greater than the squares on the sides containing the obtuse angle by twice the rectangle contained by one of the sides about the obtuse angle, namely that on which the perpendicular falls, and the straight line cut off outside by the perpendicular towards the obtuse angle. --- Euclid's Elements, translation by Thomas L. Heath.