Solve a triangle
Solved from three sides (SSS).
| Part | Value | Exact |
|---|---|---|
| Side a given | 7 | |
| Side b given | 8 | |
| Side c given | 9 | |
| Angle A | 48.1897° | |
| Angle B | 58.4119° | |
| Angle C | 73.3985° | |
| Area | 26.8328 | 12√5 |
| Perimeter | 24 | |
| Semiperimeter s | 12 | |
| Height to a (h_a) | 7.6665 | 24√5/7 |
| Height to b (h_b) | 6.7082 | 3√5 |
| Height to c (h_c) | 5.9628 | 8√5/3 |
| Inradius r | 2.2361 | √5 |
| Circumradius R | 4.6957 | 21√5/10 |
Working
- Law of cosines. cos C = (a² + b² − c²) / (2ab) = (7² + 8² − 9²) / (2 × 7 × 8) = 0.285714 (exactly 2/7), so C = arccos(0.285714) = 73.3985°
- Law of cosines. cos B = (c² + a² − b²) / (2ca) = (9² + 7² − 8²) / (2 × 9 × 7) = 0.52381 (exactly 11/21), so B = arccos(0.52381) = 58.4119°
- Angle sum. A = 180° − B − C = 180° − 58.4119° − 73.3985° = 48.1897°
- Perimeter. a + b + c = 7 + 8 + 9 = 24
- Heron's formula. s = (a + b + c)/2 = 12; area = √(s(s − a)(s − b)(s − c)) = √(12 × 5 × 4 × 3) = 26.8328 (exactly 12√5)
- Area from two sides. ½ab sin C = ½ × 7 × 8 × sin 73.3985° = 26.8328, the same area
- Heights. h = 2 × area / base: h_a = 7.6665, h_b = 6.7082, h_c = 5.9628
- Inradius and circumradius. r = area / s = 2.2361; R = a / (2 sin A) = 4.6957
Using the calculator
Fill in any three of the six boxes and leave the other three empty. At least one has to be a side. The solver works out which case you've given it, solves the triangle and shows each step with the rule it used.
Side a always faces angle A, b faces B and c faces C. So if you know two sides and the angle where they meet, put the angle in the box whose letter isn't one of those sides. With sides a and b, the angle between them is C.
Sides can be whole numbers, decimals, fractions like 3/4 or roots like 5√2 (type sqrt(2) if √ is hard to reach). Angles go in degrees, or switch to radians and type 0.6 or π/3. Whatever you type stays in your browser.
Exact answers appear beside the decimals when the inputs allow it. Whole-number or decimal sides, and angles that are whole multiples of 15°, give results like 12√5 or 10√3 − 10. Anything else gets decimals only.
The five cases
| Case | You know | How it's solved | Triangles |
|---|---|---|---|
| SSS | Three sides | Law of cosines for two angles, angle sum for the third | One, if the two shorter sides add up to more than the longest |
| SAS | Two sides and the angle between them | Law of cosines for the third side, then for an angle, then angle sum | Always one |
| ASA | Two angles and the side between them | Angle sum for the third angle, law of sines for the two sides | One, if the angles add up to less than 180° |
| AAS | Two angles and a side that isn't between them | The same as ASA | One, if the angles add up to less than 180° |
| SSA | Two sides and an angle that isn't between them | Law of sines for a second angle, then check its supplement | Two, one or none |
Worked example: three sides
Take a = 7, b = 8 and c = 9. The law of cosines turns three sides into an angle: cos A = (b² + c² − a²) / 2bc = (64 + 81 − 49) / 144 = 2/3, so A = arccos(2/3) = 48.1897°.
The same rule gives B = 58.4119°. The angles of a triangle add up to 180°, so C = 180° − 48.1897° − 58.4119° = 73.3985°.
For the area, Heron's formula needs only the sides. The semiperimeter is s = (7 + 8 + 9)/2 = 12, and the area is √(12 × 5 × 4 × 3) = √720 = 12√5, about 26.8328.
The calculator works out the largest angle first. A cosine can tell an obtuse angle from an acute one and a sine can't, and only the largest angle can be obtuse.
Worked example: two angles and a side
With A = 45°, B = 60° and c = 10, the third angle comes first: C = 180° − 45° − 60° = 75°. Every angle is now known, and the law of sines scales the one side you have into the other two.
a = c sin A / sin C = 10 × sin 45° / sin 75° = 7.3205, and b = 10 × sin 60° / sin 75° = 8.9658. Since 75° is a multiple of 15°, its sine is exact, (√6 + √2)/4, and a works out to exactly 10√3 − 10.
The ambiguous case: two triangles or none
Two sides and an angle that isn't between them can describe two different triangles. Try a = 6, b = 8 and A = 35°. The law of sines gives sin B = 8 sin 35° / 6 = 0.7648.
Two angles below 180° have that sine, 49.8864° and 130.1136°. Both leave room for a third angle, so both triangles exist. In one, C = 95.1136° and c = 10.419. In the other, C = 14.8864° and c = 2.6874.
Picture side a as a stick hinged at the top of side b, swinging down to the base line. If it's long enough to reach, it can land in two places. Shorten it to a = 3 and sin B would be 1.5295, which no angle has, so the stick misses the line and no triangle fits. Make it longer than b, as with a = 9, and only one landing point is left on the right side of the hinge.
The calculator shows both triangles when there are two, each with its own drawing and working.
Area, perimeter and heights
The area is worked out two ways, as a check. Heron's formula uses the three sides, area = √(s(s − a)(s − b)(s − c)) with s half the perimeter. The other way is ½ab sin C, two sides and the angle between them.
Each height (altitude) runs from a corner at right angles to the opposite side, and h = 2 × area ÷ that side. In an obtuse triangle two of the heights land outside the triangle, on the opposite side extended, and the drawing shows the base extended as a dotted line when that happens to h_c.
The inradius r is the radius of the largest circle that fits inside, area ÷ s. The circumradius R is the radius of the circle through all three corners, a ÷ (2 sin A), and the law of sines says every side over the sine of its angle gives the same 2R.
Types of triangle
| Name | What it means |
|---|---|
| Equilateral | All three sides equal, and every angle 60° |
| Isosceles | At least two sides equal, and the angles opposite them equal |
| Scalene | All three sides different |
| Acute | Every angle less than 90° |
| Right | One angle exactly 90° |
| Obtuse | One angle more than 90° |
Printable triangle worksheet
Solving triangles
Name:
Side a is opposite angle A, b opposite B and c opposite C. Sketches are to scale. Give sides to 1 decimal place and angles to 0.1°.
- Right triangle with C = 90°, hypotenuse c = 16 and A = 20°. Use SOH CAH TOA to find a.
- Right triangle with C = 90°, legs a = 9 and b = 15. Find angle A.
- a = 15, b = 7, c = 11. Find the largest angle.
- a = 12, b = 9 and C = 140°. Find c.
- c = 10, A = 52° and B = 32°. Find a.
- a = 9, A = 42° and B = 32°. Find b.
- a = 8, b = 9 and A = 37°. How many triangles fit? Find B for each.
- a = 13, b = 7 and C = 49°. Find the area.
Solving triangles: answer key
- a = 16 sin 20° = 5.5
- tan A = 9/15, A = 31°
- A = 110.9°
- c = 19.8
- C = 96°, a = 7.9
- b = 7.1
- two: B = 42.6° or B = 137.4°
- ½ × 13 × 7 × sin 49° = 34.3
The worksheet
Eight questions on one page, each with a sketch to scale. Two right-triangle questions for SOH CAH TOA come first, then one each for SSS, SAS, ASA and AAS, an ambiguous case with two answers, and an area from two sides and an angle.
Every sheet number prints its own questions, and the second page is the answer key, worked by the same solver as the calculator. Print on A4 or US Letter.
Questions
How many values do I need to solve a triangle?
Three, and at least one has to be a side. Three angles fix the shape but not the size, since any enlargement has the same angles.
When do I use the law of sines and when the law of cosines?
Use the law of cosines when you know three sides, or two sides and the angle between them. Use the law of sines once you know a side and the angle facing it, as in ASA, AAS and SSA.
Why does SSA sometimes give two triangles?
The law of sines gives the sine of the missing angle, and two angles between 0° and 180° share each sine, such as 30° and 150°. If both leave room for a third angle, both triangles exist.
Why does it say no triangle fits?
Either the two shorter sides don't add up to more than the longest, the angles add up to 180° or more, or in SSA the side opposite the angle is too short to reach the base.
How do I find the area of a triangle from three sides?
Use Heron's formula. Halve the perimeter to get s, then take √(s(s − a)(s − b)(s − c)). Sides 4, 13 and 15 give s = 16 and an area of √(16 × 12 × 3 × 1) = 24.
Can I type angles in radians?
Yes. Switch Angles in to radians. Decimals work, and so do fractions of π such as π/3 or 2pi/3, which keep the answers exact.
Is the drawing to scale?
Yes. Side c lies along the bottom with A on the left, and the shape is scaled to fit. The dashed line is the height from C.
Sources
- Wikipedia: Solution of triangles
- Wikipedia: Law of sines
- Wikipedia: Law of cosines
- Wikipedia: Heron's formula
- Wikipedia: Triangle
- Wikipedia: Altitude (triangle)
- Wikipedia: Incircle and excircles
- Wikipedia: Circumcircle
Added and reviewed . What's new
