Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Trigonometry

How to Solve Any Triangle, Case by Case

By MathSolver Pro Editorial Team · Published

To solve a triangle is to find all three sides and all three angles from the parts you are given. Which tool to use depends on which three parts you know, so the first step is always to identify the case.

What it means to solve a triangle

Every triangle has six parts: three sides and three angles. In general, knowing three of them, including at least one side, fixes the triangle, and the other three can be calculated. Knowing only the three angles is not enough, because similar triangles of every size share the same angles; that case is sometimes called AAA and has no unique solution.

The known parts are described by the order in which they appear around the triangle. ASA means two angles with the side between them; SAS means two sides with the angle between them. The six possible patterns, and the tool for each, are:

  • Right triangle with any two other parts: basic ratios and the Pythagorean theorem.
  • AAS or ASA: angle sum, then the law of sines.
  • SAS: the law of cosines for the third side, then the remaining angles.
  • SSS: the law of cosines for the angles.
  • SSA: the law of sines with a check for zero, one or two triangles.
  • AAA: shape only, no unique size.

Always sketch the triangle and label the given parts before choosing a method. Most errors come from pairing a side with the wrong angle.

Right triangles: SOH CAH TOA

In a right triangle, for an acute angle θ\theta, the three basic ratios relate the angle to the sides: the opposite side, the adjacent side and the hypotenuse.

sin⁡θ=opphyp,cos⁡θ=adjhyp,tan⁡θ=oppadj\sin\theta = \frac{\text{opp}}{\text{hyp}}, \qquad \cos\theta = \frac{\text{adj}}{\text{hyp}}, \qquad \tan\theta = \frac{\text{opp}}{\text{adj}}

Example 1: hypotenuse 10, one angle 35∘35^\circ

  1. Opposite side: 10sin⁡35∘≈5.73610\sin 35^\circ \approx 5.736.
  2. Adjacent side: 10cos⁡35∘≈8.19210\cos 35^\circ \approx 8.192.
  3. Other acute angle: 90∘−35∘=55∘90^\circ - 35^\circ = 55^\circ.
  4. Check: 5.7362+8.1922≈32.90+67.10=100=1025.736^2 + 8.192^2 \approx 32.90 + 67.10 = 100 = 10^2.

Example 2: height of a tree from its shadow

  1. A tree casts an 18 m shadow when the sun is 40∘40^\circ above the horizon.
  2. The height is opposite the angle and the shadow is adjacent, so use tangent: h=18tan⁡40∘≈15.10h = 18\tan 40^\circ \approx 15.10 m.

To find an angle, use an inverse ratio. A 3, 4, 5 right triangle has its smaller acute angle at tan⁡−134≈36.87∘\tan^{-1}\frac{3}{4} \approx 36.87^\circ.

Two angles and a side (AAS, ASA)

Find the third angle by subtracting from 180∘180^\circ. You then have every angle and one side, which is a complete pair for the law of sines:

asin⁡A=bsin⁡B=csin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}

Example 3 (ASA): A=50∘A = 50^\circ, B=65∘B = 65^\circ, c=12c = 12

  1. C=180∘−50∘−65∘=65∘C = 180^\circ - 50^\circ - 65^\circ = 65^\circ.
  2. a=12sin⁡50∘sin⁡65∘≈10.14a = \frac{12\sin 50^\circ}{\sin 65^\circ} \approx 10.14.
  3. B=CB = C, so the triangle is isosceles and b=c=12b = c = 12 without further calculation.

These cases always have exactly one solution, provided the two given angles add to less than 180∘180^\circ.

Two sides and the included angle (SAS)

Use the law of cosines to find the side opposite the known angle. Then find a second angle. The safest choice is the angle opposite the shorter of the two original sides, because it must be acute, so the inverse sine gives it without ambiguity.

Example 4: b=10b = 10, c=14c = 14, A=110∘A = 110^\circ

  1. a2=102+142−2(10)(14)cos⁡110∘≈296+95.77=391.77a^2 = 10^2 + 14^2 - 2(10)(14)\cos 110^\circ \approx 296 + 95.77 = 391.77, so a≈19.79a \approx 19.79.
  2. Since AA is obtuse, BB and CC are both acute. sin⁡B=10sin⁡110∘19.79\sin B = \frac{10\sin 110^\circ}{19.79} gives B≈28.34∘B \approx 28.34^\circ.
  3. C=180∘−110∘−28.34∘≈41.66∘C = 180^\circ - 110^\circ - 28.34^\circ \approx 41.66^\circ.
  4. Check: the longest side, 19.79, faces the largest angle, 110∘110^\circ.

Three sides (SSS)

First confirm the sides satisfy the triangle inequality: each side must be shorter than the sum of the other two. Then use the cosine form of the law of cosines, starting with the angle opposite the longest side:

cos⁡C=a2+b2−c22ab\cos C = \frac{a^2 + b^2 - c^2}{2ab}

Example 5: sides 6, 8 and 9

  1. Angle opposite 9: cos⁡C=36+64−8196=1996\cos C = \frac{36 + 64 - 81}{96} = \frac{19}{96}, so C≈78.58∘C \approx 78.58^\circ.
  2. Angle opposite 6: cos⁡A=64+81−36144=109144\cos A = \frac{64 + 81 - 36}{144} = \frac{109}{144}, so A≈40.80∘A \approx 40.80^\circ.
  3. Angle opposite 8: 180∘−78.58∘−40.80∘≈60.61∘180^\circ - 78.58^\circ - 40.80^\circ \approx 60.61^\circ.
  4. All three angles are acute, as predicted by 81<36+6481 < 36 + 64.

Two sides and a non-included angle (SSA)

This is the ambiguous case. Solve for the unknown angle with the law of sines, sin⁡B=bsin⁡Aa\sin B = \frac{b\sin A}{a}, and then examine the result:

  • If sin⁡B>1\sin B > 1, no triangle exists.
  • If sin⁡B=1\sin B = 1, there is one right triangle.
  • If sin⁡B<1\sin B < 1, test both BB and 180∘−B180^\circ - B. Each one that leaves a positive third angle gives a valid triangle.

For example, A=30∘A = 30^\circ, a=6a = 6 and b=10b = 10 give sin⁡B=56\sin B = \frac{5}{6}, so B≈56.44∘B \approx 56.44^\circ or 123.56∘123.56^\circ. Both leave room for a third angle, so there are two triangles. The law of sines article works both of them out in full, along with the no-triangle and one-triangle cases.

Angles of elevation and depression

Many applied problems describe angles measured from the horizontal. An angle of elevation is measured upwards to an object; an angle of depression is measured downwards. Because the horizontal lines at the observer and at the object are parallel, the angle of depression from A to B equals the angle of elevation from B to A.

Example 6: a road's rise

  1. A straight road climbs at 3∘3^\circ for 200 m measured horizontally. How much height does it gain?
  2. Rise =200tan⁡3∘≈10.48= 200\tan 3^\circ \approx 10.48 m.
  3. As a grade, that is about 5.2 percent, since tan⁡3∘≈0.0524\tan 3^\circ \approx 0.0524.

Problems with two observations, such as sighting the top of a building from two points along the ground, are solved by combining a right triangle with an oblique one, often using the law of sines in the oblique part.

A checklist for every answer

  • The three angles add to 180∘180^\circ.
  • The longest side is opposite the largest angle, and the shortest side opposite the smallest.
  • Every side is shorter than the sum of the other two.
  • Recomputing one side with the other law gives the same value, up to rounding.
  • Answers are rounded only at the end, to the precision the question asks for.

Once a triangle is solved, its area follows from 12absin⁡C\frac{1}{2}ab\sin C using any two sides and the angle between them. The law of cosines calculator solves all the oblique cases with steps, and the distance formula calculator handles triangles given by coordinates.

Rounding and precision

Triangle problems chain several calculations together, so small rounding errors early on can grow into visible differences at the end. Keep full calculator precision for every intermediate value, either by storing results in memory or by writing at least four significant figures. Round only the final answers, and round them to the precision the question asks for, usually one or two decimal places for angles in degrees and a sensible number of significant figures for lengths.

Because of rounding, the three angles you report may add to 179.9∘179.9^\circ or 180.1∘180.1^\circ. That is not an error in method. If the sum is off by a whole degree or more, though, something has gone wrong, most often a side paired with the wrong angle or a missed obtuse solution. A second independent calculation, such as finding the last side with both laws, is the most reliable way to confirm that your answer is right.

Frequently asked questions

How many parts do I need to solve a triangle?

Three, including at least one side. Three angles alone determine only the shape. The SSA arrangement may give zero, one or two triangles, so it needs an extra check.

Which law should I start with for an oblique triangle?

If you have a side and its opposite angle, start with the law of sines. If you have SAS or SSS, there is no such pair, so start with the law of cosines.

Why find the largest angle first in SSS problems?

Only the largest angle can be obtuse. Finding it with the inverse cosine identifies it correctly, and the other two angles are then certain to be acute, so no ambiguity remains.

Can a triangle be solved from three angles?

Not uniquely. Every enlargement of the triangle has the same angles, so you can find the ratios of the sides but not their lengths. One side length is needed to fix the size.

What does SOH CAH TOA stand for?

It is a memory aid for the right triangle ratios: Sine is Opposite over Hypotenuse, Cosine is Adjacent over Hypotenuse, and Tangent is Opposite over Adjacent.

MathSolver Pro Editorial Team

Math content and review

Our editorial team writes every guide to explain the reasoning behind each method, not just the answer. Each worked example is checked against the site's own solver engines and automated tests before it is published, and articles are revised whenever a method or an exam format changes.