# Derivation of the Cosine Law

Introduction

In the previous post, we have discussed an elementary proof of the sine law. In this post, we derive the cosine law. Just like the sine law, the cosine law relates the sides and angles of a triangle. The cosine law states that for any triangle $ABC$ $a^2 = b^2 + c^2 - 2bc \cos A$ $b^2 = a^2 + c^2 - 2ac \cos B$ $c^2 = a^2 + b^2 - 2ab \cos C$.

The proof is as follows.

Theorem

Let $ABC$ be a triangle, $a^2 = b^2 + c^2 - 2bc \cos A$ $b^2 = a^2 + c^2 - 2ac \cos B$ $c^2 = a^2 + b^2 - 2ab \cos C$.

Proof

Let $h$ be the height of triangle $ABC$ as shown in the figure above. Triangle $BCD$ is a right triangle, so by the Pythagorean theorem, $a^2 = (c - x)^2 + h^2$ $a^2 = c^2 -2cx + x^2 + h^2$ (1).

However, in triangle $ADC$ $b^2 = x^2 + h^2$

therefore, substituting in (1), we have $a^2 = c^2 - 2cx + b^2$ (2).

Also, in triangle $ADC$, $\cos A = \frac{x}{b}$

so, $x = b \cos A$.  Substituting in (2), we have $a^2 = c^2 - 2c b \cos A + b^2$.

Rearranging the terms on the equation, we have, $a^2 = b^2 + c^2 - 2bc \cos A$.

The proof above can be also used to derive the other two equations.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8785307,"math_prob":1.0000094,"size":685,"snap":"2020-45-2020-50","text_gpt3_token_len":169,"char_repetition_ratio":0.17033774,"word_repetition_ratio":0.0,"special_character_ratio":0.24233577,"punctuation_ratio":0.19333333,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000099,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"im_url_duplicate_count":[null,2,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-01T01:58:11Z\",\"WARC-Record-ID\":\"<urn:uuid:1cf9c830-7f8e-4afa-a3dc-bea27bed04b3>\",\"Content-Length\":\"48145\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bb2dfe42-01ae-483b-9bd9-5899d3c40d30>\",\"WARC-Concurrent-To\":\"<urn:uuid:f1334886-b9ff-4e21-8b81-e0ed0eaa6bc0>\",\"WARC-IP-Address\":\"184.168.164.1\",\"WARC-Target-URI\":\"http://proofsfromthebook.com/2012/12/02/derivation-of-the-cosine-law/\",\"WARC-Payload-Digest\":\"sha1:XLX3XMSP4CYRZ2KHAL5WKNDA2ZIJUP7F\",\"WARC-Block-Digest\":\"sha1:ZBL5YOIAAB5HL5F7MA3T7U6SAA5KHZPV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107922746.99_warc_CC-MAIN-20201101001251-20201101031251-00706.warc.gz\"}"}