From Pythagoras to Law of Cosines

The field of geometry offers tools that have withstood the test of time, empowering us to understand and solve a variety of triangular problems. Among these, the Pythagorean Theorem and the Law of Cosines are cornerstone concepts. This article provides a step-by-step exploration of these mathematical principles, demonstrating how they are used to unravel the mysteries of triangles.

Law of cosines is actually really simple, even Pythagoras follows it.

TLDR:

Pretty much, Pythagoras theorem states that c^2 = a^2 + b^2, but this one works only for right angle triangles. This is fixed, when we actually know the angle between the two sides and thus we can calculate it with the Cosinus Theorem = c^2 = a^2 + b^2 – 2*a*b*cos(c).

In the code below this is carried out. First we calculate the missing side and then we even plot it with Python.

Law of cosines – triangle.

The Jupyter Notebook with the code and the pdf is here:

Tagged with: , , , , , ,