French flag Arrows English flag
Sun Arrows Moon
Return Index

The Al-Kashi's theorem (law of cosines)

Also called the law of cosines, the Al-Kashi's theorem is a generalization of the Pythagorean theorem for any triangle. It is expressed as follows:


In a context of an ordinary triangle \(\{a, b, c\}\), which every angle \(\alpha, \beta, \gamma \) in front of its correspondant side, such as:

$$ \left \{ \begin{gather*} \alpha \enspace opposed \enspace to \enspace a \\ \beta \enspace opposed \enspace to \enspace b \\ \gamma \enspace opposed \enspace to \enspace c \end{gather*} \right \} $$

and such as the following figure:

Al-Kashi's theorem

We do have the three following relations:

$$ a^2 = b^2 + c^2 - 2bc.cos(\alpha) \qquad (Al-Kashi) $$

$$ b^2 = a^2 + c^2 - 2ac.cos(\beta) \qquad (Al-Kashi^*) $$

$$ c^2 = a^2 + b^2 - 2ab.cos(\gamma) \qquad (Al-Kashi^{**}) $$


Demonstration

In all these demonstrations, we will demonstrate the theorem for only one of the three sides. Afterward the two other demonstrations are trivial.


  1. With the Pythagorean theorem

    1. Case of an acute triangle

    2. To demonstrate the theorem, we have projected the height \( h_c \) on the side \( c \) to obtain the following figure:

      Al-Kashi's theorem - acute angle

      In the small triangle \(\{a, h_c, m\}\), the Pythagorean theorem gives us:

      $$ a^2 = m^2 + h_c^2 $$

      $$ a^2 = (c-n)^2 + h_c^2 $$

      $$ a^2 = c^2 - 2cn + n^2 + h_c^2 \qquad (1) $$


      Now, in the other triangle \(\{b, h_c, n\}\),

      $$ n^2 + h_c^2 = b^2 \qquad (2) $$

      But also,

      $$ cos(\alpha) = \frac{n}{b} \Longleftrightarrow n = b.cos(\alpha) \qquad (3) $$

      Injecting \((2)\) and \((3)\) into \((1)\), we do have now:

      $$ a^2 = c^2 - 2cb.cos(\alpha) + b^2 $$


      And finally,

      $$ a^2 = b^2 + c^2 - 2bc.cos(\alpha) \qquad (Al-Kashi) $$


    3. Case of an obtuse triangle

    4. Al-Kashi's theorem - obtuse angle

      In the same way, in the small triangle \(\{a, h_c, m\}\), the Pythagorean theorem gives us that:

      $$ a^2 = m^2 + h_c^2 $$

      $$ a^2 = (n-b)^2 + h_c^2 $$

      $$ a^2 = n^2 - 2nb + b^2 + h_c^2 \qquad (4) $$

      Now, in the other triangle \(\{h_c, n, c\}\),

      $$ h_c^2 + n^2 = c^2 \qquad (5) $$

      But also,

      $$ cos(\alpha) = \frac{n}{c} \Longleftrightarrow n = c.cos(\alpha) \qquad (6) $$

      Injecting \((5)\) and \((6)\) into \((4)\), we do have now:

      $$ a^2 = b^2 + c^2 - 2bc.cos(\alpha) \qquad (Al-Kashi) $$


  2. By the scalar product

  3. Considering the lengths \(a, b, c\) as three vectors, and such as the follwing figure:

    Al-Kashi's theorem - demonstration by the scalar product

    Then, we do have applying the Chasles relation:

    $$ \vec{a} = \vec{b} - \vec{c} \qquad (7) $$

    Al-Kashi's theorem - demonstration by the scalar product (Chasles relation)

    We know from the squared vector property that:

    $$ \forall \vec{u},$$

    $$ \vec{u}.\vec{u} = || \vec{u} ||^2$$

    So,

    $$ \vec{a}.\vec{a} = || \vec{a} ||^2$$

    Injecting \((7)\) into it, we now have:

    $$ (\vec{b} - \vec{c})^2 = || \vec{a} ||^2$$

    Likewise, with the scalar product remarkable identities, we do have the following property:

    $$ \forall (\vec{u}, \vec{v}), $$

    $$ (\vec{u} - \vec{v})^2 = || \vec{u} ||^2 - 2 \vec{u}.\vec{v} + || \vec{v} ||^2 $$

    So in our case,

    $$ || \vec{b} ||^2 - 2 \vec{b}.\vec{c} + || \vec{c} ||^2 = || \vec{a} ||^2$$

    $$ b^2 - 2 bc \ cos(\vec{b}, \vec{c}) + c^2 = a^2 $$

    $$ a^2 = b^2 + c^2 - 2bc.cos(\alpha) \qquad (Al-Kashi) $$

  4. Conclusion

  5. We demonstrated the first formula of the theorem:

    $$ a^2 = b^2 + c^2 -2bc.cos(\alpha) \qquad (Al-Kashi)$$


    Repeating the same process again on the other sides of the triangle we can retrieve two other expressions.

    $$ b^2 = a^2 + c^2 - 2ac.cos(\beta) \qquad (Al-Kashi^*) $$

    $$ c^2 = a^2 + c^2 - 2ab.cos(\gamma) \qquad (Al-Kashi^{**}) $$

Return Index
Scroll top Go to the top of the page