# B.4 Cosine and Sine Laws

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

## Cosine Law or Law of Cosines

The cosine law says that, if a triangle has sides of length $$a\text{,}$$ $$b$$ and $$c$$ and the angle opposite the side of length $$c$$ is $$\gamma\text{,}$$ then

\begin{align*} c^2 &= a^2+b^2 - 2ab\cos\gamma \end{align*}

Observe that, when $$\gamma=\tfrac{\pi}{2}\text{,}$$ this reduces to, (surpise!) Pythagoras' theorem $$c^2=a^2+b^2\text{.}$$ Let's derive the cosine law.

Consider the triangle on the left. Now draw a perpendicular line from the side of length $$c$$ to the opposite corner as shown. This demonstrates that

\begin{align*} c &= a \cos \beta + b \cos \alpha\\ \end{align*}

Multiply this by $$c$$ to get an expression for $$c^2\text{:}$$

\begin{align*} c^2 &= ac \cos \beta + bc \cos \alpha\\ \end{align*}

Doing similarly for the other corners gives

\begin{align*} a^2 &= ac \cos \beta + ab \cos \gamma\\ b^2 &= bc \cos \alpha + ab \cos \gamma \end{align*}

Now combining these:

\begin{align*} a^2+b^2-c^2 &= (bc-bc) \cos \alpha + (ac-ac)\cos\beta + 2ab \cos \gamma\\ &= 2ab\cos \gamma \end{align*}

as required.

## Sine Law or Law of Sines

The sine law says that, if a triangle has sides of length $$a, b$$ and $$c$$ and the angles opposite those sides are $$\alpha\text{,}$$ $$\beta$$ and $$\gamma\text{,}$$ then

\begin{align*} \frac{a}{\sin \alpha} &= \frac{b}{\sin \beta} = \frac{c}{\sin \gamma}. \end{align*}

This rule is best understood by computing the area of the triangle using the formula $$A = \frac{1}{2}ab\sin\theta$$ of Appendix A.10. Doing this three ways gives

\begin{align*} 2A &= bc \sin \alpha\\ 2A &= ac \sin \beta\\ 2A &= ab \sin \gamma \end{align*}

Dividing these expressions by $$abc$$ gives

\begin{align*} \frac{2A}{abc} &= \frac{\sin \alpha}{a} = \frac{\sin\beta}{b} = \frac{\sin \gamma}{c} \end{align*}

as required.

This page titled B.4 Cosine and Sine Laws is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.