Solve Triangles with the Law of Sines and Cosines
Screenshot any triangle — right-angled or not — and get the rule choice, the substitution, and every missing side and angle.
Try for free- Works on any screenshot — textbook, PDF, or worksheet
- Full step-by-step solutions, not just the final answer
- Free to start — no account needed
- 1A matched pair ( with ) exists, so use the law of sines.
- 2.
- 3.
What are the law of sines and the law of cosines?
SOHCAHTOA only works when there is a right angle to define a hypotenuse. Most triangles do not have one, and for those you need two more general results: the law of sines and the law of cosines. Between them they solve any triangle from any three pieces of information (as long as one is a side).
The law of sines says each side divided by the sine of its opposite angle gives the same value: . It needs a matched side–angle pair to get started, and works whenever you have one.
The law of cosines, , is the Pythagorean theorem with a correction term for the angle not being . When , , the correction vanishes, and it reduces exactly to . It is the rule for when no side–angle pair is available.
Where you'll actually use this
- Surveying distances across a river or ravine, where only angles and one accessible baseline can be measured.
- Navigation and bearings: two legs of a course and the angle between them give the direct distance home.
- Triangulation in GPS and cell-tower positioning.
- Structural engineering, resolving forces in non-right-angled truss members.
- Astronomy, where distances to nearby stars are computed by parallax triangles.
- Oblique triangle
- Any triangle without a right angle — the case these two rules exist to handle.
- Included angle
- The angle enclosed between two named sides — required by the law of cosines.
- Ambiguous case (SSA)
- Two sides and a non-included angle, which may describe two triangles, one, or none.
- Matched pair
- A side together with the angle opposite it — what the law of sines needs to start.
The formulas you need
Keep these on hand — every method below builds on them.
Each side over the sine of the angle opposite it. Needs one complete side–angle pair.
Flip both fractions when the unknown is an angle — keeps it out of the denominator.
Angle C must be the one enclosed between sides a and b.
Rearranged for SSS — a negative result means C is obtuse.
Two sides and the angle between them — no height needed.
Two angles known gives the third with no trigonometry at all.
How to solve law of sines and cosines
Pick the method that fits the problem in front of you.
- 1Find the third angle first with .
- 2Pair the known side with its opposite angle to form the working ratio.
- 3Set the unknown side over its opposite angle equal to that ratio: .
- 4Cross-multiply and divide: .
Law of Sines and Cosines, solved step by step
From easy to hard — pick a problem to see its full solution.
- 1A matched pair ( with ) exists, so use the law of sines.
- 2.
- 3.
- 1The angle sits between the two known sides — SAS, so law of cosines.
- 2.
- 3.
- 1The largest angle is opposite the longest side, so find opposite .
- 2.
- 3 — negative cosine, so obtuse, as expected.
- 1SSA — flag the ambiguous case. .
- 2, giving .
- 3Check the obtuse partner: , and .
- 4Both work, so there are two triangles: or .
- 1Third angle: .
- 2.
- 3.
- 1Two sides and the included angle, so use .
- 2.
- 3 square units.
- 1The two paths and the gap between the ships form a triangle with a angle enclosed by the known sides — SAS.
- 2.
- 3, so km.
Try it on your own law of sines and cosines homework
Photo Math Solver reads a non-right triangle straight from a screenshot — a labelled diagram, a bearings problem, a surveying question — and shows which rule applies to the information you have, the substitution, and the rearrangement. It flags the ambiguous SSA case and gives both possible triangles when both are valid, which is where these questions are usually lost.

Now you try
Work each one on paper first, then check your answer.
Stuck on your law of sines and cosines homework? Screenshot it
Choosing between the two rules depends entirely on which parts of the triangle are labelled, and whether the marked angle sits between the marked sides. Screenshot the whole diagram with Photo Math Solver and the solution classifies the case — AAS, SSA, SAS or SSS — before picking a rule, and warns you when the data is ambiguous.
Where points get lost
Each of these shows up on real graded work — and each has a simple fix.
| The mistake | Why it happens | The fix |
|---|---|---|
| Missing the second triangle in the ambiguous SSA case. | The calculator returns only the acute inverse sine, and that single answer looks complete. | For SSA, always test as well. If it leaves a positive third angle when added to the given angle, that second triangle is equally valid and the question wants both. |
| Using the law of cosines with an angle that is not between the two given sides. | The formula gets treated as three interchangeable letters rather than a statement about a specific configuration. | In , angle must be enclosed by and , and must be opposite it. If your angle sits elsewhere, relabel the triangle first. |
| Evaluating as . | The expression is read left to right and the subtraction looks like it groups the terms. | Only the is multiplied by . Compute as one quantity, then subtract it from . |
| Finding a large angle with the law of sines and getting the acute answer. | and are identical, so the inverse sine cannot tell them apart and defaults to acute. | Find the largest angle with the law of cosines instead — cosine is negative for obtuse angles, so it identifies them unambiguously. Then use the sine rule for the remaining, definitely acute, angles. |
| Rounding intermediate angles to whole degrees and carrying the error forward. | Each rounded value looks tidy, and the drift only becomes visible in the final answer. | Keep full calculator precision through every intermediate step and round only the final answer. Rounding early can shift a side length by a whole unit. |
Photo Math Solver shows every intermediate step, so slips like these are easy to catch before they cost you marks.
Frequently asked questions
Related topics
SOHCAHTOA for missing sides and inverse functions for missing angles, including elevation and depression.
Trig IdentitiesThe full identity toolkit plus a reliable strategy for verifying an identity one side at a time.
Trigonometric EquationsEvery solution in the interval, not just the first — reference angles, quadrants, and quadratic forms.
Area and PerimeterEvery plane-shape formula, plus composite figures and working backwards from a known area.