Main content

# Solving for a side with the law of cosines

Learn how to use the law of cosines to find the missing side length of a triangle when given two side lengths and the contained angle measure. Created by Sal Khan.

## Want to join the conversation?

- Maybe I'm just not quite getting this, but why not just use the Pythagorean Theorem? It comes out to 15, right?(30 votes)
- You can ONLY use the Pythagorean Theorem when dealing with a right triangle. The law of cosines allows us to find angle (or side length) measurements for triangles other than right triangles. The third side in the example given would ONLY = 15 if the angle between the two sides was 90 degrees. In the example in the video, the angle between the two sides is NOT 90 degrees; it's 87. As such, that opposite side length isn't 15; it's 14.6.(122 votes)

- What's the difference between a theorem and a law?(23 votes)
- Good question!

In science at least, here is the difference between a theory/theorem and a law:

A*theory*is an explanation for a natural occurrence. It tells the "why" about something, but it has not necessarily been proven.

A*law*, on the other hand, states a fact- something that always happens. It tells the "what" without explaining why, and it should always be true.(35 votes)

- Is there a Law of Tangent?(14 votes)
- Yes, you can find it on Wikipedia. But it's equivalent to the Law of Sines, so it's not really useful.(13 votes)

- in the equation,a^2=b^2+c^2-2bc cos(theta),does a have to be the longest side

or can it be any side(7 votes)- "a" in the law of cosines is the side opposite of the angle theta, so it can be of any length.(20 votes)

- In what situation do you use the law of cosines?(4 votes)
- You could use it if you know SSS and want to find an angle, or if you know SAS and want to find the remaining side.(21 votes)

- At0:40couldn't you just use the Pythagorean Theorem?(6 votes)
- No, because it's not a right triangle (or, at the very least, we can't prove it to be a right triangle).(14 votes)

- WHy are they assigning this in preschool(8 votes)
- Lol, I am assigned as the teacher for my brothers and sometimes for fun I would assign them tasks that they couldn't do. XD That was a few years back.(7 votes)

- At just under one minute into the video, Sal discussed; if we draw sides b and closer, the angle between them will be small, and so will the length opposite it... Why did he talk about this in this video at that moment?

What point was he trying to get across?(5 votes)- Well, if sides b and c move closer together, or their angle decreases, side a will become shorter and shorter. Thus, we must figure out the angle of Θ before we attempt to figure out side a's length, as the angle must be a constant, otherwise a will not be a constant.(4 votes)

- why is it whenever sal khan explains it's hard to understand?(3 votes)
- Some people have an easier time with spoken explanations, or written, or demonstrated(10 votes)

- Is there a mnemonic device to help me remember the equation for this?(4 votes)
- For the Law of Cosines, all you really need to memorize is the "-2bc*cos θ" part. The rest of the Law of Cosines is just the Pythagorean Theorem. I'm not sure if that counts as a mnemonic, but it is a way to cut down how much you have to memorize.(7 votes)

## Video transcript

- [Voiceover] Let's say
that I've got a triangle, and this side has length b, which is equal to 12, 12 units or whatever units
of measurement we're using. Let's say that this side right over here, this side right over here, has length c, and that happens to be equal to nine. And that we want to figure out the length of this side, and this side has length a, so we need to figure out what
a is going to be equal to. Now, we won't be able to figure this out unless we also know the angle here, because you could bring the blue side and the green side close together, and then a would be small, but if this angle was larger
than a would be larger. So we need to know what
this angle is as well. So let's say that we know that this angle, which we will call theta, is equal to 87 degrees. So how can we figure out a? I encourage you to pause this
and try this on your own. Well, lucky for us, we
have the Law of Cosines, which gives us a way for
determining a third side if we know two of the sides
and the angle between them. The Law of Cosines tells
us that a squared is going to be equal b squared plus c squared. Now, if we were dealing
with a pure right triangle, if this was 90 degrees, then
a would be the hypotenuse, and we would be done, this would
be the Pythagorean Theorem. But the Law of Cosines
gives us an adjustment to the Pythagorean Theorem,
so that we can do this for any arbitrary angle. So Law of Cosines tell
us a squared is going to be b squared plus c squared, minus two times bc, times the cosine of theta. And this theta is the angle that opens up to the side that we care about. So we can use theta because
we're looking for a. If they gave us another
angle right over here, that's not the angle that we would use. We care about the angle that opens up into the side that we
are going to solve for. So now let's solve for a, because we know what bc
and theta actually are. So a squared is going to
be equal to b squared... so it's going to be equal to 144, plus c squared which is 81, so plus 81, minus two times b times c. So, it's minus two,
I'll just write it out. Minus two times 12 times nine, times the cosine of 87 degrees. And this is going to be equal to, let's see, this is 225 minus, let's see, 12 times nine is 108. 108 times two is 216. Minus 216 times the cosine of 87 degrees. Now, let's get our calculator out in order to approximate this. And remember, this is a squared. Actually, before I get my calculator out, let's just solve for a. So a is just going to be
the square root of this. So a is going to be equal
to the square root... of all of this business, which
I can just copy and paste. It's going to be equal to
the square root of that. So let me copy and paste it. So a is going to be equal
to the square root of that, which we can now use the
calculator to figure out. Let me increase this radical a little bit, so that we make sure we're
taking the square root of this whole thing. So let me get my calculator out. So I want to find that square root of 220. Actually, before I do that,
let me just make sure I'm in degree mode, and I am in degree mode. Because we're evaluating a
trig function in degrees here. So that's fine, so let me exit. So it's going to be 225 minus 216, times cosine of 87 degrees. Not 88 degrees, 87 degrees. And we deserve a drumroll now. This is going to be 14.61, or 14.618. If, say, we wanted to
round to the nearest tenth, just to get an approximation, it would be approximately 14.6. So a is approximately equal to 14.6, whatever units we're using long.