 Welcome back to our lecture series math 1060, trigonometry for students at Southern Utah University. As usual, I'll be your professor today, Dr. Andrew Misildine. In lecture 25, we're going to continue what we've developed in chapter eight from previously. We're trying to study oblique triangles and bill to solve them. In lecture 24, we introduced the law of signs. In lecture 25, we'll introduce the law of cosines. As the name suggests, the law of cosines uses the cosine ratio to help us have a better understanding of oblique triangles. The way we do that is we're going to take a triangle, and we're going to basically dissect it into right triangles using altitudes. There's really two cases that have to be considered. You have acute triangles and obtuse triangles. Because with an acute triangle, the altitude will be interior to the triangle. But for an obtuse triangle, the altitude will be exterior. That's how we're going to relate so katoa relationships to these oblique triangles, thus giving us the law of cosines, similar to the law of signs. Although the law of cosines is a little bit more complicated, people usually prefer the law of signs when possible because it is a much simpler formula. The law of cosines kind of looks like the Pythagorean equation. And in the special case where the angle in play is a 90-degree angle, it simplifies to the Pythagorean relationship. And we'll see that right now. So there's three versions of the law of cosines, depending on which angle you're focusing on. So if you have the triangle ABC, again with the angles A, B and C, we get that little a squared is equal to b squared plus c squared minus two times bc cosine of a right here. So let's focus on this equation for a moment. Notice that a squared equals b squared plus c squared. That sure sounds like the Pythagorean equation. A sum of squares is equal to a perfect square right there. Well, the law of cosines does have this extra little bit, this negative two bc cosine of a. So notice that on the side where you have a sum of two squares, that's where this negative two bc cosine of a is. Now the angle in play here is the angle of the side that's isolated, that's squared. And then there's a product of bc right here, which is then the two sides on the same side of the equation, like so. Now notice that if a was in fact 90 degrees, like so, cosine of 90 degrees is equal to in fact zero. So this entire term would disappear and you're left with just a squared equals b squared plus c squared. So really the Pythagorean equation is a special case of the law of cosines. Now to avoid sort of circular reasoning, we did have to prove the Pythagorean equation without the law of cosines because the law of cosines will use Sokotoa to develop it which was derived from the Pythagorean theorem. So even though the law of cosines does generalize it, we use the Pythagorean relationship as a stepping zone to get to the law of cosines. Now this is the law of cosines angle a variant. Of course, there are two other versions. If you focus on angle b, this will tell you that b squared is equal to a squared plus c squared minus two ac cosine of b. Notice that the side that's being squared all by itself, that's the angle in play, that's the AOS there, angle on its opposite side. The two other sides whose angle is not being represented in this formula, they will show up twice. You have an a squared, but you also have a negative two ac and then you have a c squared, negative two ac like so. And then the third variant, if you do with respect to angle c, you're gonna get that c squared equals a squared plus b squared minus two ab cosine of c. So which of the three versions of the law of cosines do you use? Well, it really depends on which angle do you wanna use. Do you wanna use angle a, angle b or angle c and it changes from there. All right, so why does the law of cosines hold? Well, like the law of signs, the argument, the proof actually does require we separate into two cases. There's the acute case and there is the obtuse case. So in this proof, we're gonna focus on angle c and consider its altitude. Remember, an altitude of a triangle is a line segment that connects one vertex and is perpendicular to the other side of the triangle, like so. So we're gonna focus on the altitude of angle c and break up our triangle into two right triangles. In the acute case, because the altitude is interior, you get one right triangle, which is adb and you get another right triangle, which is cdb, like so. And so our triangle gets cut into two pieces, right? In the obtuse case, it's a little bit different because the altitude is exterior to the triangle, the right triangle adc is actually not part of the triangle abc. And then we compare that to the right triangle cbd, which also includes things that are not part of abc as a triangle. So the name of the right triangles will be the same, but their reference to the actual triangle abc is a little bit different. In the case of the acute triangle, we have this adc little triangle. If we call h, if h, excuse me, is the altitude of the triangle, we often call it h because we're thinking of the height of the triangle in play right here. That's gonna be one of the legs of the right triangle. The side length b would be the hypotenuse of that triangle. The distance ad would be unknown in that situation. Let's call it x. We're gonna do the same thing in the obtuse case when we think of the triangle adc. Call the altitude h for height, that hypotenuse of adc would then be b. And then let's call adx again. Now the critical difference here is that angle a right here is part of the triangle. Angle a would, part of the triangle abc would be that angle right here. Theta would actually be its supplement, which is exterior to the triangle. That's an important difference there, which we'll talk about with the last signs, it wasn't too much of a problem because the sign function can't tell the difference between acute angles and obtuse angles. So it turned out to be the same thing because in the first and second quadrant, signs positive in both of those. Cosine on the other hand is more refined in that regard. That is cosine can tell the difference between an acute angle and obtuse angles. In the first quadrant, cosine gives you a positive value, but in the second quadrant, where you have an obtuse angle, cosine's gonna be negative in that situation. So we have to pay attention to that distinction. Then the triangle a, or excuse me, cdb right here, its height, the height of triangle abc would be a leg of that triangle, dcb. And then the hypotenuse would be a. That statement's true when we look at the two cases. The main difference here is how angle, how the side length c comes into play. For the acute case, when you look into the triangle dbc, the other distance here, the other leg would be c-x. And that's because the total distance is c. And if this distance is x, you subtract that from c, you get this distance right here. Because the altitude is exterior in the obtuse case, this distance would be c, ab. And so the total distance between the points d and b would actually be c plus x. So because of these important differences between the acute case and the obtuse case, we actually need to separate the proofs of the two. So for the first one, let's talk about the acute case. It's a little bit simpler to understand. And we're gonna write this in green to make it a little bit more clear what we're talking about. So looking at the triangle adc, which is a right triangle, we can apply the Pythagorean theorem in that situation. And we end up with the hypotenuse b squared is equal to x squared plus h squared, like so. It's also a right triangle, so I can do trigonometric ratios like I can do the cosine ratio with respect to angle a adjacent over hypotenuse would give us that cosine of a is equal to x over b, for which if you clear the denominators, you end up with x is equal to b cosine of a, like so. Next, let's focus on the right triangle, cdb. Again, it's also a right triangle, so the Pythagorean relationship holds there. The hypotenuse is a squared. And then the other sides are gonna be h squared plus c minus x squared, like so. I'm gonna foil out that c minus x, and so we get a squared equals h squared plus c squared minus two cx plus x squared. Regrouping these things, you get a squared equals h squared plus x squared plus c squared minus two cx. Why did I do that? Well, remember that x squared plus h squared is equal to b squared. So I can substitute that into my equation and end up with a squared equals b squared plus c squared minus two cx. And then the other observation is x equals b times cosine of a. And so when you plug that in, you end up with a squared equals b squared plus c squared minus two. x becomes b cosine of a, so you get bc cosine of a. And this gives us the first version of the law of cosines. a squared equals b squared plus c squared minus two bc cosine of a. And so we obtained that, of course, by focusing on angle a. If we had focused on angle b instead, we actually would gotten the second version of the law of cosines, b squared equals a squared plus c squared minus two ac cosine of b. That's using the altitude with respect to c. If we did the altitude with respect to b, we get something like this. We can then focus on angle c and we can get the last version, c squared equals a squared plus b squared minus two ab cosine of c. This is, of course, if we had an acute triangle. Let's change our focus now to the obtuse triangle case. How does that change things? Well, we have to be a little bit more careful because the angle theta is really what's gonna start off here. So looking at this triangle here, let's kind of mimic what we did before. That's a right triangle, adc. So we're gonna see, same thing basically as before, b squared is equal to x squared plus eight squared. That part doesn't change, but the cosine ratio does change a little bit. You get cosine of theta is equal to x over b. So theta is the supplement of angle a in this situation. So theta plus angle a gives us 180 degrees. In particular, if we wanted to switch this to cosine of a, the thing is if you have two angles that are supplementary, the cosine ratio of those angles will have opposite signs. So cosine of theta is actually equal to negative cosine of a. You have to switch the signs because of how reference angles work here. Solving for x, you end up with x is equal to negative b cosine of a. And because we wanna relate to the cosine of the original angle a, not this artificial variable theta that we considered later on, all right? So next thing we wanna do is we wanna look at the right triangle here of CBD, right? For which the sides are gonna be a, h, and c plus x. So there is a change of signs right there, but that also compensates for the change of signs we saw there. So it's gonna turn out to be great in the end. So we end up with a squared is equal to h squared plus c, excuse me, plus c plus x quantity squared. Foiled out the c plus x squared, we end up with c squared plus two cx plus x squared. We're gonna put together the h squared and the h squared and the x squared again, leaving behind a c squared plus two cx. h squared plus x squared again becomes a b squared. So that part's similar. a squared equals b squared plus c squared. And then we get a plus two cx. And then using the substitution from before, x equals negative b cosine of a. And so we get a squared equals b squared plus c squared minus two bc cosine of a. So we end up with the exact same formula again for slightly different reasons, but we end up with the same formula again. So whether we have an acute triangle or an obtuse triangle, when we focus on angle a here, we get the following equation. If you did similar arguments using different altitudes and different angles, you would then produce the formulas for the law of cosines associated to angle b, angle c. The law of cosines will be very important when we wanna solve various oblique triangles particular, we're gonna be interested in the cases where we have the side angle side condition or the side, side, side condition. So side, side, side means we know the three side lengths of the triangle. So we know little a, little b, little c. Using the law of cosines, we can solve for the unknown angles a, b, or c. We can do any of those we want. With the side angle side condition, we know two of the sides and we know the angle that's between them. We can likewise use the law of cosines to find out the unknown sides, the unknown angles. And we will do that in the subsequent videos here of lecture 25.