Trig without Tears Part 5:
Solving Triangles
revised 13 Apr 2014
Copyright © 1997–2014 Stan Brown, Oak Road Systems
Trig without Tears Part 5:
revised 13 Apr 2014
Copyright © 1997–2014 Stan Brown, Oak Road Systems
Summary: A triangle has six parts, three sides and three angles. Given almost any three of them—three sides, two sides and an angle, or one side and two angles—you can find the other three values. This is called solving the triangle, and you can do it with any triangle, not just a right triangle.
Let’s look at a specific example to start with. Suppose you have a triangle where one side has a length of 180, an adjacent angle is 42°, and the opposite angle is 31°. You’re asked to find the other angle and the other two sides.
It’s always a good idea to draw a rough sketch, like this one. Not only does it help you organize your solution process better, but it can help you check your work. For instance, since the 31° angle is the smallest, you know that the opposite side must also be the shortest. If you were to come up with an answer of, say, 110 for one of the other sides, you’d know at once that you had made a mistake somewhere because 110 is < 180 and the other two sides must both be > 180.
How would you go about solving this problem? It’s not immediately obvious, I agree. But maybe we can get some help from some useful general techniques in problem solving:
We’ve already got the diagram, but let’s see if those other techniques will be helpful. (By the way, they’re not original with me, but are from a terrific book on problemsolving techniques that I think you should know about.)
“Can you use what you already know to solve a piece of this problem?” For example, if this were a right triangle you’d know right away how to write down the lengths of sides in terms of sines or cosines.
But it’s not a right triangle, alas. Is there any way to turn it into a right triangle? Not exactly, but if you construct a line at right angles to one side and passing through the opposite vertex, you’ll have two right triangles. Maybe solving those right triangles will show how to solve the original triangle.
This diagram shows the same triangle after I drew that perpendicular. I’ve also used another principle (“Can you solve a more general problem?”) and replaced the specific numbers with the usual letters for sides and angles. Dropping perpendicular CD in the diagram divides the big triangle (which you don’t know how to solve) into two right triangles ACD and BCD, with a common side CD. And you can solve those right triangles.
We’re going to use this simple diagram to develop two important tools for solving triangles: the Law of Sines and the Law of Cosines. Just drawing this one perpendicular line will show you how to solve not just the triangle we started with, but any triangle. (Some trig courses teach other laws like the Law of Tangents and the Law of Segments. I’m ignoring them because you can solve triangles just fine without them.)
The Law of Sines is simple and beautiful and easy to derive. It’s useful when you know two angles and any side of a triangle, or sometimes when you know two sides and one angle.
Let’s start by writing down things we know that relate the sides and angles of the two right triangles in the diagram above. You remember how to write down the lengths of the legs of a right triangle? The leg is always equal to the hypotenuse times either the cosine of the adjacent angle or the sine of the opposite angle. (If that looks like just empty words to you, or even if you’re not 100% confident about it, please go back and review that section until you feel confident.)
In the diagram above, look at triangle ADC at the left: the right angle is at D and the hypotenuse is b. We don’t know how much of original angle C is in this triangle, so we can’t use C to find the lengths of any sides. What can we write down using angle A? By using its cosine and sine we can write the lengths of both legs of the triangle:
AD = b×cos A and CD = b×sin A
By the same reasoning, in the other triangle you have
DB = a×cos B and CD = a×sin B
This is striking: you see two different expressions for the length CD. But things that are equal to the same thing are equal to each other. That means that
b×sin A = a×sin B
Divide through by sin A and you have the solution:
b = a×sin B / sin A
b = 180 ×sin 42° / sin 31° = about 234
What about the third angle, C, and the third side, c? Well, when you have two angles of a triangle you can find the third one easily:
A+B+C = 180°
C = 180°−A−B
In this case, C = 180−31−42° = 107°.
For the third side, there are a couple of ways to go. You wrote expressions above for AD and DB, and you know that c = AD+DB, so you could compute c = b×cos A + a×cos B.
But that’s two multiplies and an add, a bit more complicated than the one multiply and one divide to find side b. I’m lazy, and I like to reduce the amount of tapping I do on my calculator. Is there an easier way, even if just slightly easier? Yes, there is. Go back a step, to
a×sin B = b×sin A
Divide left and right by (sin A)(sin B) to get
a / sin A = b / sin B
But there’s nothing special about the two angles A and B. You could just as well have dropped a perpendicular from A to BC or from B to AC. Shown at right is the result of dropping a perpendicular from B to line CD.
Because C > 90°, this perpendicular happens to be outside the triangle and the two right triangles ABD and CBD overlap. But this won’t affect the algebra. By the way, the angle in triangle CBD is not C but 180°−C, the supplement of C. Angle C belongs to the original triangle ABC.
You can write the length of the common side BD as
BD = c×sin A (in triangle ABD)
and
BD = a×sin(180−C) (in triangle CBD)
But sin(180−C) = sin C, so you have
BD = a×sin C (in triangle CBD)
Set the two computed lengths of BD equal to each other, and divide by (sin A)(sin C):
a×sin C = c×sin A
a / sin A = c / sin C
But we already figured out earlier that
a / sin A = b / sin B
Combining these two equations you have the Law of Sines:
a / sin A = b / sin B = c / sin C
It’s nice that the derivation doesn’t make you worry about obtuse versus acute triangles. As you see, when an obtuse angle is involved some dropped perpendicular will lie outside the original triangle, and in that case the derivation uses 180° minus an angle of the original triangle. But since sin x = sin(180°−x), you end up with the same form of the Law of Sines whether the perpendicular is inside or outside the triangle, whether all three angles are acute or one is obtuse.
(28) Law of Sines—First Form:
a / sin A = b / sin B = c / sin C
This is very simple and beautiful: for any triangle, if you divide any of the three sides by the sine of the opposite angle, you’ll get the same result. This law is valid for any triangle.
The Law of Sines is sometimes given upside down:
(29) Law of Sines—Second Form:
sin A / a = sin B / b = sin C / c
Of course that’s the same law, just as 2/3 = 6/9 and 3/2 = 9/6 are the same statement. Work with it either way and you’ll come up with the same answers.
You can derive the Law of Sines at need, so I don’t specifically recommend memorizing it. But it’s so simple and beautiful that it’s pretty hard not to memorize if you use it at all. It’s also pretty hard to remember it wrong: there are no alternating plus and minus signs or combinations of different functions.
In most cases where you use the Law of Sines, you get a unique solution. But sometimes you get two solutions (or none) in the sidesideangle case, where you know two sides and an angle that’s not between them. Please see the Special Note below, after the table.
The Law of Sines is fine when you can relate sides and angles. But suppose you know three sides of the triangle—for instance a = 180, b = 238, c = 340—and you have to find the three angles. The Law of Sines is no good for that because it relates two sides and their opposite angles. If you don’t know any angles, you have an equation with two unknowns and you can’t solve it.
But a triangle can be solved when you know all three sides; you just need a different tool. And knowing me, you can be sure I’m going to help you develop one! It’s called the Law of Cosines.
Let’s look back at that generic triangle with a perpendicular dropped from vertex C. You may remember that when we first looked at this picture, we pulled out information using both the sine and the cosine of the two angles. We used the sine information to develop the Law of Sines, but we never went anywhere with the cosine information, which was
AD = b cos A and DB or BD = a cos B
Let’s see where that can lead us. You remember that the way we came up with the Law of Sines was to write two equations that featured the length of the construction line CD, and then combine the equations to eliminate CD. Can we do anything like that here?
Well, we know the other two sides of those right triangles, so we can write an expression for the height CD using the Pythagorean theorem—actually, two expressions, one for each triangle.
a² = (CD)² + (BD)² ⇒ (CD)² = a² − (BD)²
b² = (CD)² + (AD)² ⇒ (CD)² = b² − (AD)²
and therefore
a² − (BD)² = b² − (AD)²
Substitute the known values of BD and AD in terms of angles and sides of the original triangle, and you have
a² − a²cos²B = b² − b²cos²A
Bzzt! No good! That uses two sides and two angles, but we need an equation in three sides and one angle, so that we can solve for that angle. Let’s back up a step, to a² − (BD)² = b² − (AD)², and see if we can go in a different direction.
Maybe the problem is in treating BD and AD as separate entities when actually they’re parts of the same line. Since BD+AD = c, we can write
BD = c−AD = c − b×cos A.
Notice that this brings in the third side, c, and angle B drops out. Substituting, we now have
a² − (BD)² = b² − (AD)²
a² − (c − b×cos A)² = b² − (b×cos A)²
This looks worse than the other one, but actually it’s better because it’s what we’re looking for: an equation for the three sides and one angle. We can solve it with a little algebra:
a² − c² + 2bc cos A − b²cos²A = b² − b²cos²A
a² − c² + 2bc cos A = b²
2bc cos A = b² + c² − a²
cos A = (b² + c² − a²) / 2bc
We were a long time getting there, but finally we made it. Now we can plug in the lengths of the sides and come up with a value for cos A, which in turn will tell us angle A:
cos A = (238² + 340² − 180²) / (2×238×340)
cos A = 0.864088
A = about 30.2°
Do the same thing to find the second angle (or use the Law of Sines, since it’s less work), then subtract the two known angles from 180° to find the third angle.
You can find the Law of Cosines for the other angles by following the same process using the other two perpendiculars.
(30) Law of Cosines—First Form:
cos A = (b² + c² − a²) / 2bc
cos B = (a² + c² − b²) / 2ac
cos C = (a² + b² − c²) / 2ab
Just for fun, let’s find angle C for that triangle:
cos C = (a² + b² − c²) / 2ab
cos C = (180² + 238² − 340²) / 2×180×238
cos C = −0.309944
Don’t be surprised at the negative number. Remember from the diagram in Functions of Any Angle that cos A < 0 when A is between 90° and 180°. Because the cosine has unique values all the way from 0° to 180°, you never have to worry about multiple solutions of a triangle when you use the Law of Cosines. In this case, C is about 108°.
There’s another wellknown form of the Law of Cosines, which may be a bit easier to remember. Start with the above form, multiply through by 2ab, and isolate c on one side:
cos C = (a² + b² − c²) / 2ab
2ab×cos C = a² + b² − c²
c² = a² + b² − 2ab×cos C
Notice the arrangement: side c is opposite angle C in the triangle, and they’re at opposite ends of this equation. Sides a and b are adjacent to angle C both in the triangle and in the equation. And you can play the same game to solve for the other two sides:
(31) Law of Cosines—Second Form:
a² = b² + c² − 2bc cos A
b² = a² + c² − 2ac cos B
c² = a² + b² − 2ab cos C
Depending on how you’re using it, you may need the Law of Cosines in either of the two forms that we’ve obtained, the first form for finding an angle and the second form for finding a side.
With just the definitions of sine, cosine, and tangent, you can solve any right triangle. If you’ve got the Law of Sines and the Law of Cosines under your belt, you can solve any triangle that exists. (Some sets of givens lead to an impossible situation, like a “triangle” with sides 349.)
In this section I’ll run down the various possibilities and give you some pointers. But really it’s pretty straightforward: whenever you have to solve a triangle, think about what you have and then think about which formula you can use to get what you need. (When you have two angles, you can always find the third by A+B+C = 180°.)
Many people find it easier to think about the known elements of a triangle as a “case”. For instance, if you know two angles and the side between them, that’s case ASA; if you know two angles and a side that’s not between them, that’s case AAS, and so on.
I’m not presenting the following table for you to memorize. Instead, what I hope to do is show you that between the Law of Sines and the Law of Cosines you can solve any triangle, and that you simply pick which law to use based on which one has just one unknown and otherwise uses information you already have.
Most cases can be solved with the Law of Sines. But if you have three sides (SSS), or two sides and the angle between them (SAS), you must begin with the Law of Cosines.
The table is just an exhaustive elaboration of those two principles, so you probably don’t even need to read it! <grin>
If you know this...  You can solve the triangle this way...  

three angles  There’s not enough information. Without at least one side you have the shape of the triangle, but no way to scale it correctly. For example, the same angles could give you a triangle with sides 71213, 356065, or any other multiple.  
two angles and a side, AAS or ASA  Find the third angle by subtracting from 180°. then use the Law of Sines* (equation 28) twice to find the second and third sides.  
two sides and ...  the included angle, SAS  Use the Law of Cosines* (equation 31) to find the third side. Then use either the Law of Sines* (equation 29) or the Law of Cosines* (equation 30) to find the second angle. 
a nonincluded angle, SSA  Use the Law of Sines*
twice, equation 29 to get the second angle and
equation 28 to get the third side.
But...


three sides, SSS  With the first form equation 30 of the Law of Cosines you use all the sides to compute one angle. Use that angle and its opposite side in the Law of Sines equation 29 to find the second angle.  
* If a 90° angle is given, the Law of Sines and the Law of Cosines are overkill. Just apply the definitions of the sine and cosine (equation 1) and the tangent (equation 4) to find the other sides and angles. 
For most sets of facts, either there’s a unique solution or they’re obviously absurd. (If you don’t see why a “triangle” with sides 5060200 is absurd, try to sketch it.) But the SSA case can be tricky.
Suppose you know acute angle B and sides a and b. Given those facts, there are two different ways you could draw the triangle, as shown in the picture. How can this be? Well, you use the Law of Sines to find the sines of angles A and C. Let’s say you find sin C = 0.5. That means C could be either 30° or the supplement, 150°. Remember that the sine of any angle and the sine of its supplement are the same.
This is the infamous ambiguous case. You can see the problem from the picture: the known opposite side b can take either of two positions that satisfy the given the lengths of a and b. Those two positions give rise to two different values for angle A, two different values for angle C, and two different values for side c. Think about it for a while, and you’ll see that this ambiguity can arise only when the known angle is acute, and the adjacent side is longer than the opposite side, and the opposite side is greater than the height.
Here’s a complete rundown of all the possibilities with the SSA case:
Possibilities within the SSA Case  

known angle < 90°  known angle ≥ 90°  
adjacent side < opposite side  one solution  one solution 
adjacent side = opposite side  one solution  no solution (Angles that are opposite equal sides must be equal, but you can’t have two angles both ≥ 90° in a triangle.) 
adjacent side > opposite side  Compute the triangle height h (adjacent side times sine of known
angle).

no solution (The conditions violate the theorem that the longest side is always opposite the largest angle.) 
For heaven’s sake, don’t try to memorize that table! Instead, always draw a picture. If you can draw two pictures that both fit all the available facts, you have two legitimate solutions. If only one picture fits all the facts, it will show you which angle (if any) is > 90°. And if you can’t make any picture that fits the facts, the triangle has no solution.
If you do have two solutions, what do you do? If you have no other information to go on, of course you report both solutions. But check the situation carefully. Maybe you’re told explicitly which is the largest angle, or it’s implied by other facts you know. In that case your solution is constrained, and you reject the solution that doesn’t meet the constraints.
I’ve written a TI83/84 program to solve all types of triangles (and find their area). If you have TI Graph Link software, you can download the program, unzip it, and install it on your TI83/84.
For those who don’t have the Graph Link software, here is the
program in ASCII form. Special keys or menu selections are indicated
between backslashes; for instance \>\
means the
STO
key. (This is the TI83/84 export format.)
Naturally, I’d be happy to know of any corrections or improvements to this program.
\start83P\comment=Program file dated 09/16/02, 00:23 \protected=FALSE \name=TRIANGLE \file=H:\TRIANGLE.TXT Degree Menu("WHICH CASE?","AAS",1,"ASA",2,"SAS",3,"SSA",4,"SSS",5) Lbl 1 Disp "NEED <A,<B,SA" Input "<A=",A Input "<B=",B Input "SA=",D 180AB\>\C Dsin(B)/sin(A)\>\E Dsin(C)/sin(A)\>\F Goto 0 Lbl 2 Disp "NEED <A,SB,<C" Input "<A=",A Input "SB=",E Input "<C=",C 180AC\>\B Esin(A)/sin(B)\>\D Esin(C)/sin(B)\>\F Goto 0 Lbl 3 Disp "NEED <A,SB,SC" Input "<A=",A Input "SB=",E Input "SC=",F \root\(E\^2\+F\^2\2EFcos(A))\>\D sin\^1\(Esin(A)/D)\>\B 180AB\>\C Goto 0 Lbl 4 Disp "NEED SA,SB,<A" Input "SA=",D Input "SB=",E Input "<A=",A Esin(A)\>\H If (D<H)+(A\>=\180)(D\<=\E):Then Disp "IMPOSS":Stop End If (H<D)(D<E):Then sin\^1\(Esin(A)/D)\>\B Menu("AMBIGIS B","ACUTE",41,"OBTUSE",42) Lbl 42:180B\>\B Goto 41 End sin\^1\(Esin(A)/D)\>\B Lbl 41 180AB\>\C D*sin(C)/sin(A)\>\F Goto 0 Lbl 5 Input "SA=",D Input "SB=",E Input "SC=",F cos\^1\((E\^2\+F\^2\D\^2\)/(2EF))\>\A cos\^1\((D\^2\+F\^2\E\^2\)/(2DF))\>\B 180AB\>\C Lbl 0 .5DEsin(C)\>\G Disp "AREA <S SIDES",round(G,2),{round(A,1),round(B,1), round(C,1)},round(D,2),round(E,2),round(F,2)
Caution: that long DISP command at the end should be entered as a single command; I’ve just broken it into two lines for readability.
next: 6/Squared Identities
this page: http://oakroadsystems.com/twt/solving.htm
Was this page useful? Visit
my other Math Articles.
Want to show your appreciation? Please
donate a few bucks to the author.