The Law of Sines and the Law of Cosines: Solving Any Triangle Step by Step

Learn when to use the Law of Sines or the Law of Cosines, with worked examples, a decision table and tips on the tricky ambiguous SSA case.

Share on Linkedin Share on WhatsApp

Estimated reading time: 7 minutes

Article image The Law of Sines and the Law of Cosines: Solving Any Triangle Step by Step

SOH-CAH-TOA is a fantastic tool, but it has one big limitation: it only works in right triangles. Real problems, from surveying a plot of land to calculating the distance between two ships, often involve triangles with no 90° angle at all. For those, trigonometry gives us two powerful formulas: the Law of Sines and the Law of Cosines.

In this guide you will learn what each law says, how to decide which one to use, and how to work through typical problems step by step, including the famous “ambiguous case.”

Notation: how triangles are labeled

Both laws use a standard labeling convention. The three angles are written with capital letters A, B and C. The side opposite each angle uses the same letter in lowercase: side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C. Keeping this pairing straight is the single most important habit for avoiding mistakes.

Remember too that the angles of any triangle always add up to 180°. Once you know two angles, the third comes for free.

The Law of Sines

The Law of Sines states that the ratio between a side and the sine of its opposite angle is the same for all three sides of a triangle:

a / sin A = b / sin B = c / sin C

In practice, you only ever use two of the three fractions at once. The law is useful whenever you know a complete pair, meaning a side and its opposite angle, plus one more piece of information.

Worked example (AAS)

Suppose A = 40°, B = 60° and a = 10. Find the remaining parts.

  1. Find the third angle: C = 180° − 40° − 60° = 80°.
  2. Find b: b = a · sin B / sin A = 10 · sin 60° / sin 40° ≈ 10 · 0.8660 / 0.6428 ≈ 13.47.
  3. Find c: c = a · sin C / sin A = 10 · sin 80° / sin 40° ≈ 10 · 0.9848 / 0.6428 ≈ 15.32.

A quick sanity check: the largest side should face the largest angle. Here c ≈ 15.32 faces the 80° angle, so the answer is consistent.

The Law of Cosines

The Law of Cosines connects all three sides with one angle:

c² = a² + b² − 2ab · cos C

The same pattern works for the other sides (a² = b² + c² − 2bc · cos A, and so on). If you look closely, it is the Pythagorean theorem with a correction term. When C = 90°, cos C = 0, the last term disappears, and you are left with c² = a² + b². That is why many teachers describe the Law of Cosines as a “generalized Pythagorean theorem.”

Worked example 1 (SAS): finding a side

Two sides measure a = 7 and b = 9, and the angle between them is C = 60°. Find side c.

c² = 7² + 9² − 2 · 7 · 9 · cos 60° = 49 + 81 − 126 · 0.5 = 130 − 63 = 67, so c = √67 ≈ 8.19.

Worked example 2 (SSS): finding an angle

A triangle has sides a = 5, b = 6 and c = 7. Find angle C. Rearranging the formula gives:

cos C = (a² + b² − c²) / (2ab) = (25 + 36 − 49) / 60 = 12 / 60 = 0.2, so C = cos⁻¹(0.2) ≈ 78.46°.

A helpful detail: if the cosine comes out negative, the angle is obtuse (greater than 90°). The Law of Cosines handles this automatically, which makes it safer than the Law of Sines when finding angles.

Which law should you use?

The choice depends on what information you are given. Use the letters S (side) and A (angle) to describe it:

You knowAbbreviationStart with
Two angles and a side not between themAASLaw of Sines
Two angles and the side between themASAFind the third angle, then Law of Sines
Two sides and the angle between themSASLaw of Cosines
All three sidesSSSLaw of Cosines
Two sides and an angle not between themSSALaw of Sines (watch for the ambiguous case)
Three angles onlyAAANot solvable: infinitely many similar triangles

A simple rule of thumb: if you have a side together with its opposite angle, the Law of Sines is usually quickest. If you don’t, reach for the Law of Cosines.

The ambiguous case (SSA)

When you know two sides and an angle that is not between them, the information may describe zero, one or two different triangles. This happens because the equation sin B = (some value) has two possible solutions between 0° and 180°: an acute angle B and its supplement, 180° − B.

  • No triangle: if the calculation gives sin B greater than 1, the sides cannot meet, and there is no solution.
  • One triangle: if sin B equals exactly 1, or if the supplementary angle would make the angle sum exceed 180°, only one solution exists.
  • Two triangles: if both the acute angle and its supplement fit with the given angle (their sum stays below 180°), both triangles are valid.

Whenever you meet an SSA problem, always test the supplementary angle before declaring your answer final. Many exam questions are designed specifically to check whether students remember this step.

Common mistakes to avoid

  • Calculator in the wrong mode. If your angles are in degrees, make sure the calculator is set to degrees, not radians.
  • Mismatched pairs. In the Law of Sines, each side must be divided by the sine of its own opposite angle.
  • Order of operations. In the Law of Cosines, compute 2ab · cos C first, then subtract. Writing (a² + b² − 2ab) · cos C is a classic error.
  • Rounding too early. Keep several decimal places during the calculation and round only at the end.

Where these laws show up in real life

Surveyors use them to measure land and distances across rivers without crossing them. Navigators apply them to calculate positions and courses, and engineers rely on them when designing roof trusses, bridges and other structures where forces meet at angles. Triangulation, the technique of locating a point from two known positions and the angles to it, is a direct application of the Law of Sines.

Conclusion

The Law of Sines and the Law of Cosines extend trigonometry from right triangles to every triangle you will ever meet. Label the triangle carefully, identify what you know (AAS, SAS, SSS or SSA), choose the matching law, and double-check the result by confirming that the largest side faces the largest angle. With a little practice, solving an oblique triangle becomes a routine, almost mechanical process.

If you would like to strengthen your foundations in angles, the unit circle and trigonometric identities, take a look at the free Trigonometry courses available on Cursa and practice at your own pace.

The Bronze Age Collapse: When an Entire Interconnected World Fell Apart

Around 1200 BCE several Mediterranean civilisations collapsed within decades. Here is what happened, the leading explanations, and why it still matters.

Correlation Is Not Causation: How to Read a Data Chart Without Being Fooled

Two lines moving together rarely prove one caused the other. Learn the traps behind correlation and how analysts test for real causal links.

Sample Size and Margin of Error: How a Survey of 1,000 People Represents Millions

Why polling 1,000 people can describe a whole country, what margin of error really means, and how bad sampling ruins good statistics.

The Silk Road: How a Network of Trade Routes Connected the Ancient World

The Silk Road was never one road, and silk was only part of the story. A clear look at the routes, the goods, the ideas and why the network faded.

Why Steel Ships Float: Buoyancy and Archimedes’ Principle Explained

Density, displacement and pressure explain why a steel ship floats while a steel bolt sinks. A clear introduction to buoyancy for beginners.

The Pythagorean Theorem: What It Is and How to Use It

Learn what the Pythagorean theorem is, why it works, and how to use this essential geometry rule to find the sides of right triangles.

What Is Stoicism? A Beginner’s Guide to the Ancient Philosophy

Discover the core ideas of Stoicism, the philosophers behind it, and practical ways to apply its wisdom to daily life.

Why Every World Map Is Wrong: Map Projections Explained

Every flat map distorts the round Earth. Learn what map projections trade away, why Greenland looks huge, and how to read maps critically.