Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Explain why you should always start with the largest angle or the largest side when using law of cosines. I don't understand why but my professor says so.

share|cite|improve this question
I'm not sure what exactly you're asking. – user61527 Apr 18 '14 at 20:55
There is absolutely no reason to. – naslundx Apr 18 '14 at 20:55
If we asked your professor what he said, I wonder if his version would be different. – Michael Hardy Apr 18 '14 at 20:56
"Start" with the largest side when doing what? If you are using the law of cosines, you already know two of the sides and only one is unknown, what does it mean to "start" with that side? – user7530 Apr 18 '14 at 20:58
She said, when using the law of cosines, you must start with the largest side or largest angle otherwise the formulas break down. I don't see any reason to either as every case is a unique one and here wouldn't be any reason to do this. Am I right in saying this? I don't want to take the test, start with the smallest side and somehow get the entire triangle wrong. I just need some reassurance! – King Squirrel Apr 18 '14 at 20:59
up vote 3 down vote accepted

The law of cosines is true no matter which sides you take as $a$, $b$, $c$. The only thing that can "break down" is that in some cases when solving for one of the adjacent sides given the angle and the other two sides, there may be two solutions.

share|cite|improve this answer
When you have all sides, the Law of Cosines can be used for all angles. There is no ambiguity, because $\cos(\gamma)$ is a one-to-one function on $[0,180^o]$. But if (as jnh suggested) you use the Law of Cosines for one of the angles and Law of Sines to get the others from that, you can run into ambiguity there because $90^o+x$ and $90^o - x$ have the same sine. – Robert Israel Apr 18 '14 at 21:21
Here is a quote from her study guide, "Make sure you are identifying each piece in the correct order (especially when it comes to using law of Cosines followed by the law of sines)". What exactly does she mean by this, if it doesn't matter where you start or how( either law of sines or cosines) then what is she saying here? Please help! – King Squirrel Apr 19 '14 at 15:51
Perhaps it means the problem I mentioned, that $\sin(x)$ doesn't determine $x$ completely if $x$ could be more or less than 90 degrees. Or maybe it's just that having every student do the problem the same way makes grading homework and tests easier for her. – Robert Israel Apr 20 '14 at 4:13

The modern law of cosines applies to any side of any triangle, and the formula in no way breaks down.

I can only think of one scenario in which what your professor claimed makes sense. In the classical Euclidean geometry of Euclid's Elements(which was developed well before invention of trigonometric functions), the precursor of what we'd later call the "law of cosines" had to be split up into separate cases. Specifically, Proposition 12 of BookII states:

In obtuse-angled triangles the square on the side subtending the obtuse angle is greater than the squares on the sides containing the obtuse angle by twice the rectangle contained by one of the sides about the obtuse angle, namely that on which the perpendicular falls, and the straight line cut off outside by the perpendicular towards the obtuse angle.

The above theorem only applies to the obtuse angle in an obtuse triangle (which is of course always the largest). Proposition 13 then handles acute triangles. This is almost certainly the context in which your prof made the statement she did.

That or she is in idiot.

share|cite|improve this answer

There is one case where I can make some sense of your prof's advice: suppose you know the three sides of the triangle, and are trying to compute the angles with the formula $$C = \cos^{-1}\left(\frac{a^2+b^2-c^2}{2ab}\right) = \cos^{-1}(X).$$

If you have a triangle that is very acute (has an angle close to $0$) you will want to solve for the angle first with $X$ closest to zero. This is because the formula above becomes numerically unstable for $X$ close to $\pm1$, where the slope of arccosine diverges (in fact, if due to numerical error $X$ is slightly larger than 1, the calculator is likely to give an error.)

Better yet, calculate the angle using

$$C = 2\operatorname{atan2}(4A, (a+b)^2-c^2)$$ where $A$ is the triangle area, as computed using a robust version of Heron's formula.

share|cite|improve this answer

The law of cosines says $$a^2=b^2+c^2-2bc\cos A$$ where $A$ is the angle opposite the side $a$. If $bc\neq 0$ we have:

$$\cos A=\frac {b^2+c^2-a^2}{2bc}$$If the triangle inequality holds we have the fraction between $-1$ and $1$, and this gives a unique angle $A$ between $0$ and $180^{\circ}$. If you know all the sides you can calculate the angles in this way in any order. The largest angle is the only one which may have a negative cosine.

If you know two sides and an angle, you get a quadratic for the third side giving two solutions. If you have $b,c,A$ then the two solutions are the positive and negative square root and only the positive one is admissible.

If you have $a,b,A$ then there may be two, one or no real solutions for $c$. In the case of two solutions, both may be positive, or one may be negative and the other positive. In the case of no solutions, no triangle is possible.

To my way of thinking there is no ambiguity in any of this.

share|cite|improve this answer

Someone above did touch on the correct answer about obtuse triangles. If you know three sides of a triangle and want to use law of cosines to begin solving it, you must make c the largest side unless you know that it is not an obtuse triangle. If you find an acute angle first in an obtuse triangle, then when you use law of sines to solve for the obtuse angle, you will find the acute angle with the matching sine value. If you were to continue solving the triangle with law of cosines, then it would not be an issue.

For example: A triangle has sides a = 8.8, b = 12.1, and c = 19.7.

If you set up law of cosines to have:

19.7^2 = 8.8^2 + 12.1^2 - 2(8.8)(12.1)cosC the measure of angle C will be about 140.5 degrees.

But if you set it up like this:

12.1^2 = 8.8^2 + 19.7^2 - 2(8.8)(19.7)cosB the measure of angle B will be about 23 degrees. If you then use Law of Sines to solve for angle C:

(sin23)/12.1 = (sinC)/19.7 would now equal about 39.5 degrees, despite it being the same triangle, because the sine of 140.5 and 39.5 is the same.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.