Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|improve this question
I'm not sure what exactly you're asking. –  user61527 Apr 18 at 20:55
There is absolutely no reason to. –  naslundx Apr 18 at 20:55
If we asked your professor what he said, I wonder if his version would be different. –  Michael Hardy Apr 18 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 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 at 20:59

4 Answers 4

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|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 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 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 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|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|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|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.