Solving triangles: which rule to use, and the SSA ambiguous case
A table for choosing the law of sines or the law of cosines, a worked SSA example with two valid answers, and the step-order and rounding traps that make hand-solved triangles go wrong.
Law of sines or law of cosines: which one do you use?
Use the law of cosines when you know three sides (SSS) or two sides and the angle between them (SAS). Use the law of sines when you know two angles and a side (ASA or AAS). With two sides and an angle that is not between them (SSA), the law of sines works, but the data can fit no triangle, one or two, so count them first. If one angle is 90°, the Pythagorean theorem with sine, cosine and tangent is quicker than either law.
| What you know | Method | Triangles |
|---|---|---|
| SSS: three sides | Law of cosines for the largest angle (opposite the longest side), then either law | One, if every pair of sides adds up to more than the third |
| SAS: two sides and the angle between them | Law of cosines for the third side, then the law of sines for the angle opposite the shorter known side | One |
| ASA or AAS: two angles and any side | Third angle = 180° minus the other two, then the law of sines | One, if the two angles total less than 180° |
| SSA: two sides and an angle opposite one of them | Compare the side opposite the angle with the height , then the law of sines | None, one or two |
| AAA: three angles | Can’t be solved: angles fix the shape, not the size | Infinitely many |
You always need at least one side. The law of sines needs a known side together with its opposite angle. SSS and SAS don’t supply that pair, so they start with the law of cosines.
What do the two laws say?
The law of sines says that each side divided by the sine of its opposite angle gives the same number for all three sides:
The law of cosines is the Pythagorean theorem with a correction term for the angle between two sides:
Label the triangle so that each side has the same letter as the angle across from it: side is opposite angle , is opposite , and is opposite . The formulas won’t warn you if you pair an angle with the wrong side, so write the labels on a sketch first.
To find an angle from three sides, rearrange the law of cosines: . Cycle the letters for and . Once the triangle is solved, its area is , or from the three sides alone, Heron’s formula with .
Why does the law of sines sometimes give the wrong angle?
Because an angle and its supplement have the same sine. Both and equal 0.7645, and arcsin only returns the acute one. Cosine is negative for obtuse angles, so arccos returns the correct angle anywhere from 0° to 180°.
Example measurements: a triangular garden bed has edges of 4 m and 9 m that meet at 30°. That is SAS with , and .
- Third side: , so m.
- The trap: the law of sines for angle , opposite the 9 m edge, gives , and arcsin returns 49.86°. That would make . Both are wrong.
- The fix: use the law of cosines. , so .
- Last angle: . The area is m², and the perimeter is 18.89 m.
Only the largest angle, opposite the longest side, can be 90° or more. Find it with the law of cosines, and arcsin is safe for the other two.
Why can SSA give two triangles, or none?
Because the side opposite the known angle is free to pivot, it can meet the third side’s line twice, once or not at all. Draw angle at the left end of a baseline, with side rising from it. Side swings from the top of down to the baseline. Whether it reaches, and how many times, depends on how compares with and with the height of that top point, :
| Angle A | Side a | Triangles |
|---|---|---|
| Acute | Shorter than | None: can’t reach the baseline |
| Acute | Equal to | One, with a right angle at |
| Acute | Between and | Two: meets the baseline at two points |
| Acute | or longer | One: the second crossing falls at or behind |
| 90° or more | or shorter | None |
| 90° or more | Longer than | One |
In law-of-sines terms, . A value above 1 means no triangle. Below 1, both and have that sine, and the second counts only if is less than 180°.
To skip arcsin entirely, treat the law of cosines as a quadratic in the unknown side: . A negative number under the root means no triangle, and each positive is one triangle.
Worked example: a lighthouse that comes into view twice
Example assumptions: a ship holds a straight course. At point A, a lighthouse is 10 km away, 40° off the course, and its light can be seen from up to 7 km. How far along the course does the light come into view, and where does it drop out of view?
So , km (ship to lighthouse), km (lighthouse to the point where the ship is exactly at the edge of the range), and is the distance sailed. This is SSA.
- Count the triangles. km, the course’s closest approach to the lighthouse. Because 6.428 < 7 < 10, there are two.
- Angle B. . Arcsin gives 66.67°, and its supplement is 113.33°. Both leave room for a third angle.
- Angle C. , or .
- Distance c. : km and km.
- Cross-check. The quadratic gives , which is 4.89 km or 10.43 km.
| Detail | Triangle 1 | Triangle 2 |
|---|---|---|
| Angle B, at the ship | 113.33° | 66.67° |
| Angle C, at the lighthouse | 26.67° | 73.33° |
| Distance along the course, c | 4.89 km | 10.43 km |
| Meaning | Light comes into view | Light drops out of view |
Both answers are real. The ship is in range for 5.54 km of its course and passes closest (6.43 km) at 7.66 km, halfway between the two points. Change the range and the count changes:
- 6 km range, shorter than the closest approach: , which is impossible. No triangle; the light never comes into view.
- 12 km range, longer than the 10 km starting distance: one triangle. The ship starts in range and leaves it after 17.79 km. The quadratic’s other root, −2.47 km, lies behind the start.
How do you know which of the two triangles you need?
The three measurements can’t tell you, because both triangles fit all of them. The deciding fact has to come from elsewhere: a sketch or photo showing whether angle is obtuse, a fourth measurement, or the wording of the question. In the example, “comes into view” means the nearer point. When nothing decides it, report both.
How much can rounding change the answer?
Usually only the last digit, if you keep full precision until the final answer. In two situations, though, small roundings change the answer outright.
Near the SSA boundary. With a 6.5 km range, just above the 6.428 km closest approach, the light appears at 6.69 km and disappears at 8.63 km. Read the angle as 41° instead of 40° and the closest approach becomes 6.56 km, so there is no triangle at all. Close to the boundary, angle approaches 90° (81.46° here), and Kahan’s notes show that the arcsin step can lose up to half the digits carried there.
In long, thin triangles. Example measurements: two stakes are 50 m and 48 m from a survey point, 3° apart. , so they are 3.252 m apart. That is a small difference between two numbers near 4,800, so any rounding in is magnified:
| Value of cos 3° used | Distance a | Error |
|---|---|---|
| 0.99862953 (full precision) | 3.252 m | None |
| 0.9986 (4 decimal places) | 3.274 m | +0.7% |
| 0.999 (3 decimal places) | 2.966 m | −8.8% |
The form , which follows from , avoids the subtraction: m, and rounding to 0.0262 still gives 3.254 m. Kahan recommends it, with a rearranged Heron’s formula, for needle-shaped triangles.
The measurement limits you more than the arithmetic. If the 3° was read to the nearest degree, the true angle could be anywhere from 2.5° to 3.5°, which puts the stakes 2.93 m to 3.60 m apart. For a triangle this thin, measure the short side directly if you can.
When can you use right-triangle shortcuts instead?
Whenever one angle is 90°. Then turns the law of cosines into the Pythagorean theorem, and SOH-CAH-TOA does the rest: sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent. The two acute angles add up to 90°.
Example measurements: a shed’s gable end is 10 ft wide, and the ridge is 2.5 ft above the top of the 8 ft walls. Each half of the gable is a right triangle with legs of 5 ft and 2.5 ft.
- Sloped edge: ft.
- Roof angle: , a rise of 6 in for every 12 in of run. That leaves 63.43° at the ridge in each half, or 126.87° across the full peak.
- End-wall area: the gable is ft², and the 10 ft × 8 ft rectangle below it is 80 ft², so the wall is 92.5 ft².
Some right triangles have exact ratios:
| Triangle | Side ratio | Angles |
|---|---|---|
| 45-45-90 | 1 : 1 : √2 | 45°, 45°, 90° |
| 30-60-90 | 1 : √3 : 2 | 30°, 60°, 90° |
| 3-4-5 | 3 : 4 : 5 | 36.87°, 53.13°, 90° |
| 5-12-13 | 5 : 12 : 13 | 22.62°, 67.38°, 90° |
The converse holds too: if , the angle opposite is exactly 90°. That is why marking 3 and 4 units along two edges and measuring 5 across confirms a square corner.
What if you know the corners’ coordinates instead of the sides?
Use the distance formula, , on each pair of corners, then solve as SSS. For corners at (0, 0), (8, 0) and (2, 5) on a site plan in meters, the sides are 8 m, m and m. The law of cosines gives angles of 68.20° at (0, 0), 39.81° at (8, 0) and 72.00° at (2, 5). One side lies on the x-axis, so the area is m², and Heron’s formula agrees. The 68.20° angle also equals the angle of inclination of the line from (0, 0) to (2, 5), which makes a quick check.
Mistakes that give wrong answers
- Calculator in radian mode. returns 0.7451, the sine of 40 radians, instead of 0.6428. 180° is π radians, so check the mode first.
- A misread case. In SSA the known angle is opposite one of the known sides. If it sits between them, the case is SAS and there is only one triangle.
- Impossible data. Sides where one is at least as long as the other two combined (1, 2 and 3, for example) don’t close into a triangle, and neither do two angles totaling 180° or more.
Try it
- Triangle calculator: the page opens with an example filled in, so press Reset before each set of values. Enter side a =
7, side b =10and angle A =40°. Expect two triangles: c = 4.8887 with B = 113.3258°, and c = 10.4322 with B = 66.6742°. Change a to6for no triangle, or to12for one with c = 17.7937. - Same calculator: b =
4, c =9, A =30° gives a = 5.8861, C = 130.1363°, B = 19.8637° and area 9. For the thin triangle, b =50, c =48, A =3° gives a = 3.2524; A =2.5and3.5give 2.9272 and 3.599. For half the gable, a =2.5, b =5, C =90° gives c = 5.5902 and A = 26.5651°. - Slope, distance and midpoint calculator: points (0, 0) and (2, 5) give distance 5.3852 and angle of inclination 68.1986°; (8, 0) and (2, 5) give 7.8102. Pressing Reset in the triangle calculator and entering a =
7.8102, b =5.3852, c =8returns A = 68.1979°: rounding the sides to four decimals moved the angle by 0.0007°. - Area and perimeter calculator: a 10 × 8 rectangle gives 80 ft². Add the 12.5 ft² gable for the 92.5 ft² end wall.
Questions
Can a triangle have two obtuse angles?
No. The three angles add up to 180°, and two angles over 90° would already total more than that. A triangle has at most one angle of 90° or more, and it is always the angle opposite the longest side.
Is SSA a valid way to prove two triangles congruent?
Not in general. The two triangles in the ambiguous case share both sides and the angle, yet their third sides differ, as in the lighthouse example (4.89 km and 10.43 km). SSA does fix the triangle when the side opposite the known angle is at least as long as the other known side, which includes the right-angle case where that side is the hypotenuse. SSS, SAS, ASA and AAS always fix it.
Sources
- Algebra and Trigonometry 2e, 10.1 Non-right Triangles: Law of Sines OpenStax (Rice University) The law of sines; the labeling convention (each side opposite the angle with the same letter); ASA, AAS and SSA cases; the SSA ambiguous case with no, one or two triangles; inverse sine returns a single value, so check for a second solution; carry exact values to the final answer; area as half of two sides times the sine of the included angle.
- Algebra and Trigonometry 2e, 10.2 Non-right Triangles: Law of Cosines OpenStax (Rice University) The law of sines does not solve SAS or SSS triangles; the law of cosines does, including its rearranged form for an angle; its derivation as a generalized Pythagorean theorem; Heron’s formula.
- Algebra and Trigonometry 2e, 7.2 Right Triangle Trigonometry OpenStax (Rice University) Sine, cosine and tangent as ratios of opposite, adjacent and hypotenuse (SohCahToa); side ratios of the 30-60-90 and 45-45-90 triangles; solving a right triangle from one side and one acute angle.
- Algebra and Trigonometry 2e, 7.1 Angles OpenStax (Rice University) 180° equals π radians, and how to convert between degrees and radians.
- College Algebra 2e, 2.1 The Rectangular Coordinate Systems and Graphs OpenStax (Rice University) The distance formula between two points, derived from the Pythagorean theorem.
- Miscalculating Area and Angles of a Needle-like Triangle (W. Kahan, lecture notes) University of California, Berkeley Rounding errors make the classical formulas (Heron’s formula, arccos for an angle) inaccurate for needle-like triangles; the rearranged side formula with (a − b)² + 4ab sin²(C/2); the arcsin step in SSA is ambiguous, has no solution when a < b sin A, and can lose up to half the digits carried when the angle is close to 90°.
- Euclid’s Elements, Book I, Proposition 20 (D. E. Joyce, ed.) Clark University The triangle inequality (any two sides together are longer than the third); the side opposite the greater angle is the greater side.
- Euclid’s Elements, Book I, Proposition 26 (D. E. Joyce, ed.) Clark University The commentary lists the congruence theorems (side-angle-side, side-side-side, side and two angles), explains that side-side-angle is ambiguous unless the side opposite the given angle is at least as long as the other given side, and cites the angle sum of two right angles (I.32).
- Euclid’s Elements, Book I, Proposition 48 (D. E. Joyce, ed.) Clark University The converse of the Pythagorean theorem; if the square on one side equals the sum of the squares on the other two, the angle between those two sides is right.