Two laws, two different sets of known values
Every triangle that is not a right triangle -- called an oblique triangle -- can be fully solved from three known measurements, but which formula applies depends on exactly which three measurements are known. The law of sines and the law of cosines are the two general-purpose tools for this, and each is suited to a different combination of knowns.
| Known values | Method | Notes |
|---|---|---|
| Two angles + any side (AAS or ASA) | Law of sines | Always exactly one solution |
| Two sides + included angle (SAS) | Law of cosines | Always exactly one solution |
| Three sides (SSS) | Law of cosines | Always exactly one solution (if the triangle inequality holds) |
| Two sides + non-included angle (SSA) | Law of sines, with care | Zero, one or two solutions possible -- the ambiguous case |
The law of sines: two angles and a side (AAS/ASA)
The law of sines states that in any triangle, the ratio of a side's length to the sine of the angle directly opposite it is the same for all three sides: a / sin(A) = b / sin(B) = c / sin(C). Given two angles and any one side, the third angle follows immediately from the fact that a triangle's angles sum to 180 degrees, and the two missing sides follow directly from the ratio.
Worked example: angle A = 40 degrees, side a = 15 (opposite angle A), and angle B = 60 degrees. Step 1: angle C = 180 - 40 - 60 = 80 degrees. Step 2: side b = (a x sin B) / sin A = (15 x sin 60 degrees) / sin 40 degrees = (15 x 0.8660) / 0.6428, approximately 20.2094. Step 3: side c = (a x sin C) / sin A = (15 x sin 80 degrees) / sin 40 degrees, approximately 22.9813. The triangle's area, using 1/2 x a x b x sin C, is approximately 1/2 x 15 x 20.2094 x sin(80 degrees), approximately 149.2681 square units.
The law of cosines: two sides and the included angle (SAS), or three sides (SSS)
The law of cosines generalizes the Pythagorean theorem to triangles without a right angle: c^2 = a^2 + b^2 - 2ab x cos(C), where C is the angle included between sides a and b. When C is exactly 90 degrees, cos(C) = 0 and the formula reduces exactly to the Pythagorean theorem, a^2 + b^2 = c^2.
Worked example: sides a = 8 and b = 11, with an included angle of C = 37 degrees. Step 1: c^2 = 8^2 + 11^2 - 2 x 8 x 11 x cos(37 degrees) = 64 + 121 - 176 x 0.7986, approximately 185 - 140.55 = 44.45, so c is approximately 6.6663. Step 2: once all three sides are known, the remaining angles follow from the rearranged formula, cos(A) = (b^2 + c^2 - a^2) / (2bc), giving angle A approximately 46.2375 degrees and angle B approximately 96.7625 degrees (summing with C = 37 degrees to 180 degrees, as required). The area, 1/2 x a x b x sin(C), is approximately 1/2 x 8 x 11 x sin(37 degrees), approximately 26.4799 square units.
The SSA ambiguous case, honestly explained
When two sides and a non-included angle are known (SSA) -- for example, side a, side b and angle A, where A is not the angle between a and b -- the law of sines can still be applied, but the number of valid triangles that satisfy the given measurements is not always one. Depending on the specific values, there may be zero triangles (the given angle and sides cannot form a closed triangle at all), exactly one triangle, or exactly two distinct triangles, both valid.
The deciding factor is the height h = b x sin(A), compared against side a. If a is less than h, no triangle exists. If a equals h, exactly one triangle exists, with a right angle at the vertex opposite side a. If h is less than a and a is less than b, two distinct triangles exist. If a is greater than or equal to b, exactly one triangle exists.
Worked example of the ambiguous case: side a = 20, side b = 25, angle A = 40 degrees. Here h = 25 x sin(40 degrees), approximately 16.0697, and since 16.0697 is less than 20 and 20 is less than 25, two distinct triangles satisfy these measurements. Solving both: the first has angle B approximately 53.4641 degrees, angle C approximately 86.5359 degrees and side c approximately 31.0576; the second has angle B approximately 126.5359 degrees, angle C approximately 13.4641 degrees and side c approximately 7.2446. Both triangles use the identical starting values of a = 20, b = 25 and A = 40 degrees, yet describe two genuinely different shapes -- which is precisely why the SSA case is called ambiguous, and why it requires this extra check that AAS, ASA and SAS do not.
Choosing the right formula in practice
In fields such as surveying, navigation and engineering, the practical guidance is to identify which three measurements are actually available before choosing a formula, rather than defaulting to one law out of habit. If two angles are measured (common when triangulating from two fixed observation points), the law of sines applies directly and unambiguously. If two distances and the angle between them are measured (common when two sides are staked out from a single vertex), the law of cosines applies directly and unambiguously.
The SSA case arises more often than it might seem -- for instance, measuring one known side, a second side, and an angle that is not physically between them -- and because it can silently produce two valid answers, it is worth explicitly checking the a-versus-h comparison described above whenever SSA is the only available combination, rather than assuming the first computed triangle is the only one that fits the data.
Часто задаваемые вопросы
When should I use the law of sines instead of the law of cosines?
Use the law of sines when two angles and any one side are known (AAS or ASA), which always has exactly one solution, or when two sides and a non-included angle are known (SSA), which requires checking for the ambiguous case. Use the law of cosines when two sides and the included angle (SAS) or all three sides (SSS) are known instead.
What is the SSA ambiguous case?
SSA means two sides and a non-included angle are known. Depending on the specific values, this combination can produce zero, one or two valid triangles, unlike AAS, ASA or SAS, which always produce exactly one. For example, with a = 20, b = 25 and angle A = 40 degrees, two distinct triangles both satisfy the given measurements -- one with angle B approximately 53.4641 degrees, the other with angle B approximately 126.5359 degrees.
How do you find a missing side using the law of cosines?
Apply c^2 = a^2 + b^2 - 2ab x cos(C), where C is the angle included between sides a and b, then take the square root. For a = 8, b = 11 and C = 37 degrees, c^2 = 64 + 121 - 176 x cos(37 degrees), approximately 44.45, so c is approximately 6.6663.
How do you find a missing side using the law of sines?
Set up the ratio a / sin(A) = b / sin(B) and solve for the unknown side. For angle A = 40 degrees, side a = 15 and angle B = 60 degrees, side b = (15 x sin 60 degrees) / sin 40 degrees, approximately 20.2094.
Can the law of cosines solve a triangle from three sides alone (SSS)?
Yes. With all three sides known, the law of cosines is rearranged to solve for each angle: cos(A) = (b^2 + c^2 - a^2) / (2bc). The law of sines cannot be used to start an SSS problem, because it requires at least one known angle to set up its ratio, which SSS does not directly provide.
Источники
- Weisstein, Eric W. "Law of Sines" and "Law of Cosines." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.
- Larson R. Trigonometry. Cengage Learning (law of sines, law of cosines and the SSA ambiguous case).
- Stewart J, Redlin L, Watson S. Precalculus: Mathematics for Calculus. Cengage Learning (solving oblique triangles).