# The Pythagorean Theorem and the Law of Cosines

The Pythagorean Theorem is one of the most important theorems in Geometry. To remind you: The Pythagorean Theorem: If one of the angles of a triangle is 90 degrees, then the square of the lengths of the two legs on either side of 90 degree angle sum to the square of the length of the side opposite the 90 degree angle. In other words, if triangle ABC has a 90 degree angle at C, and sides a and b are adjacent to C, and side c is opposite angle C, then . Usually, the sides on either side of the 90 degree angle are called "legs" and the side opposite the 90 degree angle is called the "hypotenuse." With these terms, the Pythagorean Theorem can be stated a little more sleekly: The Pythagorean Theorem (re-stated with new terminology): The two legs, a and b, and the hypotenuse, c, of a right triangle always satisfy The Pythagorean theorem is particularly useful because if you know any two sides of a right triangle, you can use the above equation to find the third. For instance if a=3 and b=4, you can solve the equation for c: The Pythagorean Theorem is useful because it applies to all right triangles in the plane. It's a statement that holds true in infinitely many different cases. To get your head around this, check out this applet which illustrates the Pythagorean Theorem in a dynamic way showing that a2 and b2 is always equal c2. Adjust the blue dots at the vertices of the right triangle on the right side of the screen, and observe that the equality between a2+b2 and c2 always holds true no matter how you adjust the points.
The Pythagorean Theorem is tremendously useful. In many realistic scenarios it is possible to measure a and b with ease, but it is often difficult to measure c. For instance, c might pass through a lake or private property or might be up in the air! We'll do a few example puzzles in class together to show you how this works.
Nonetheless, the Pythagorean Theorem still presents a substantial limitation to utility. Specifically, it requires that the angle between a and b is 90 degrees. If the angle is not 90 degrees, the Pythagorean Theorem doesn't help. This is where the Law of Cosines comes in. The Law of Cosines allows us to find c even when the angle between a and b is not 90 degrees. Check out this applet which illustrates the relationship between a2 and b2 and c2 that also takes into account the angle C (note the angle is capital C to distinguish it from lower case c, the side opposite angle C) between the legs a and b. Adjust the blue dots in the triangle on the right right side of the screen to see the relationship. At the outset, when angle C is 90 degrees, a2+b2 is exactly equal to c2. However, when you move any of the three vertices of the triangle, note that the equality is not maintained. The problem is that angle C becomes not 90 degrees. The Law of Cosines accommodates for other angles at C besides a 90 degree angle. Specifically: By taking away 2*a*b*cos(C) from a2+b2, the result is exactly c2. This is the Law of Cosines and it's tremendously useful. This was the formula that was behind our "mystery numbers" in projects 2 and 3.
A few things to note:
• Don't be nervous if you don't know what cos(C) is. For now, just think of it as a number. You can calculate it any number of ways, but I recommend simply googling it. For example check this link to calculate cosine of 108 degrees﻿. Just don't forget to add "degrees" to your search.
• When C is less than 90 degrees, cosine is positive (try out a few calculations in Google like this one﻿), so -2*a*b*cos(C) is negative, and so takes something away from a2+b2
• On the other hand, ﻿when C is greater than 90 degrees, cosine is negative (again, try out a few calculations like this one﻿), so -2*a*b*cos(C) is positive, and adds something to a2+b2