AI-Powered Trigonometry Solver

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
4.4/5 from 35 Chrome Web Store reviews · 2,000+ users
  • Works on any screenshot — textbook, PDF, or worksheet
  • Full step-by-step solutions, not just the final answer
  • Free to start — no account needed
school-portal.com/homework-worksheet.pdf
Photo Math Solver Solved
A=70°,  B=50°,  a=10. Find b.A = 70°,\; B = 50°,\; a = 10. \text{ Find } b.
  1. 1A matched pair (aa with AA) exists, so use the law of sines.
  2. 2bsin50°=10sin70°\frac{b}{\sin 50°} = \frac{10}{\sin 70°}.
  3. 3b=10(0.766)0.9408.15b = \frac{10(0.766)}{0.940} \approx 8.15.
01Definition

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: asinA=bsinB=csinC\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}. It needs a matched side–angle pair to get started, and works whenever you have one.

The law of cosines, c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C, is the Pythagorean theorem with a correction term for the angle not being 90°90°. When C=90°C = 90°, cosC=0\cos C = 0, the correction vanishes, and it reduces exactly to a2+b2=c2a^2 + b^2 = c^2. 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.
02Formulas

The formulas you need

Keep these on hand — every method below builds on them.

Law of sines
asinA=bsinB=csinC\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}

Each side over the sine of the angle opposite it. Needs one complete side–angle pair.

Law of sines for an angle
sinAa=sinBb\frac{\sin A}{a} = \frac{\sin B}{b}

Flip both fractions when the unknown is an angle — keeps it out of the denominator.

Law of cosines
c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C

Angle C must be the one enclosed between sides a and b.

Law of cosines for an angle
cosC=a2+b2c22ab\cos C = \frac{a^2 + b^2 - c^2}{2ab}

Rearranged for SSS — a negative result means C is obtuse.

Area of any triangle
A=12absinCA = \tfrac{1}{2}ab\sin C

Two sides and the angle between them — no height needed.

Angle sum
A+B+C=180°A + B + C = 180°

Two angles known gives the third with no trigonometry at all.

03Methods

How to solve law of sines and cosines

Pick the method that fits the problem in front of you.

When to use it: Two angles and any side are given — always unambiguous.
  1. 1Find the third angle first with A+B+C=180°A + B + C = 180°.
  2. 2Pair the known side with its opposite angle to form the working ratio.
  3. 3Set the unknown side over its opposite angle equal to that ratio: bsin50°=10sin70°\frac{b}{\sin 50°} = \frac{10}{\sin 70°}.
  4. 4Cross-multiply and divide: b=10sin50°sin70°8.15b = \frac{10\sin 50°}{\sin 70°} \approx 8.15.
04Worked examples

Law of Sines and Cosines, solved step by step

From easy to hard — pick a problem to see its full solution.

A=70°,  B=50°,  a=10. Find b.A = 70°,\; B = 50°,\; a = 10. \text{ Find } b.
  1. 1A matched pair (aa with AA) exists, so use the law of sines.
  2. 2bsin50°=10sin70°\frac{b}{\sin 50°} = \frac{10}{\sin 70°}.
  3. 3b=10(0.766)0.9408.15b = \frac{10(0.766)}{0.940} \approx 8.15.

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.

05Practice

Now you try

Work each one on paper first, then check your answer.

Problem 1
A=45°,  B=60°,  a=14. Find b.A = 45°,\; B = 60°,\; a = 14. \text{ Find } b.
Problem 2
a=5,  b=8,  C=100°. Find c.a = 5,\; b = 8,\; C = 100°. \text{ Find } c.
Problem 3
a=4,  b=5,  c=6. Find A.a = 4,\; b = 5,\; c = 6. \text{ Find } A.
Problem 4
Area with a=7,  b=10,  C=55°\text{Area with } a = 7,\; b = 10,\; C = 55°
Problem 5
A=50°,  a=6,  b=10. How many triangles?A = 50°,\; a = 6,\; b = 10. \text{ How many triangles?}

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.

06Common mistakes

Where points get lost

Each of these shows up on real graded work — and each has a simple 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 180°B180° - B 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 c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C, angle CC must be enclosed by aa and bb, and cc must be opposite it. If your angle sits elsewhere, relabel the triangle first.
Evaluating a2+b22abcosCa^2 + b^2 - 2ab\cos C as (a2+b22ab)cosC(a^2 + b^2 - 2ab)\cos C.The expression is read left to right and the subtraction looks like it groups the terms.Only the 2ab2ab is multiplied by cosC\cos C. Compute 2abcosC2ab\cos C as one quantity, then subtract it from a2+b2a^2 + b^2.
Finding a large angle with the law of sines and getting the acute answer.sin30°\sin 30° and sin150°\sin 150° 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.

07FAQ

Frequently asked questions

Related topics

Ready to Solve Math Problems in Seconds?

No credit card required. Works in your browser. Free trial available. Learn math faster and smarter today!