Triangle Solver | Law of Sines & Cosines
Solve any triangle given SSS, SAS, ASA, or AAS using law of sines and cosines.
Known Information
Three sides known
What Is the Triangle Solver | Law of Sines & Cosines?
A triangle has six elements, three sides and three angles. Given any three that include at least one side, the remaining three can be determined. Different known combinations require different solution methods: the Law of Sines (angle-side relationships) or the Law of Cosines (side-side-angle / side-side-side).
Input Combinations (Cases)
- ›SSS (3 sides): use Law of Cosines to find all angles
- ›SAS (2 sides + included angle): Law of Cosines for third side, then Law of Sines
- ›ASA or AAS (2 angles + a side): third angle = 180° − A − B, then Law of Sines
- ›SSA (2 sides + non-included angle): ambiguous case, may have 0, 1, or 2 solutions
The SSA Ambiguous Case
- ›Given sides a, b and angle A (not the included angle), two triangles may exist
- ›If sin B = b·sin(A)/a < 1, compute B₁ = arcsin(sinB) and B₂ = 180° − B₁
- ›B₂ is valid only if C₂ = 180° − A − B₂ > 0 (remaining angle must be positive)
- ›The calculator detects and displays both solutions when the ambiguous case arises
Formula
Law of Cosines
c² = a² + b² − 2ab·cos(C)
Law of Sines
a/sin A = b/sin B = c/sin C
Area (SAS)
Area = ½ab·sin(C)
Heron's Formula
s=(a+b+c)/2; Area=√(s(s−a)(s−b)(s−c))
Inradius
r = Area / s
Circumradius
R = abc / (4·Area)
How to Use
- 1Select the input case: SSS, SAS, ASA, AAS, or SSA.
- 2Enter the required values (sides in any consistent unit, angles in degrees).
- 3Click Solve, all remaining sides, angles, area, and properties are computed.
- 4For SSA: if two solutions exist, both triangles are displayed with an ambiguous-case note.
- 5The SVG diagram updates to show your triangle with labelled sides and angles.
- 6Computed properties include: area, perimeter, inradius, circumradius, altitudes, and type classification.
Example Calculation
SAS case: side a = 7, side b = 10, included angle C = 40°:
Result
Understanding Triangle | Law of Sines & Cosines
Triangle Solving, Input Cases Quick Reference
| Case | Given | Method | Unique? | Notes |
|---|---|---|---|---|
| SSS | 3 sides | Law of Cosines | Yes (if valid) | Check triangle inequality first |
| SAS | 2 sides + included angle | Law of Cosines → Sines | Yes | Most common case in practice |
| ASA | 2 angles + included side | Law of Sines | Yes | Third angle = 180° − A − B |
| AAS | 2 angles + non-incl. side | Law of Sines | Yes | Same as ASA once third angle found |
| SSA | 2 sides + non-incl. angle | Law of Sines | 0, 1, or 2 | The ambiguous case |
| AAA | 3 angles only | Not uniquely solvable | No | Infinite similar triangles |
Frequently Asked Questions
What is the SSA ambiguous case in triangle solving?
SSA (two sides + non-included angle) is the only case that can be ambiguous:
- ›If sin B = b·sin(A)/a > 1: no triangle exists (the arc cannot reach the opposite side)
- ›If sin B = 1: exactly one right triangle exists
- ›If sin B < 1: two possible triangles, B₁ = arcsin(sinB) and B₂ = 180° − B₁
- ›B₂ gives a second valid triangle only if C₂ = 180° − A − B₂ > 0
What is the Law of Cosines used for?
- ›SSS: rearrange to find angle, cos C = (a² + b² − c²) / (2ab)
- ›SAS: find the third side, c² = a² + b² − 2ab·cos(C)
- ›When C = 90°: cos(90°) = 0 → c² = a² + b², reduces to Pythagorean theorem
- ›More numerically stable than the Law of Sines for obtuse angles
What is the Law of Sines used for?
- ›Relates each side to the sine of its opposite angle: a/sin A = b/sin B = c/sin C
- ›ASA: two angles known → third angle = 180° − A − B; then use ratio for remaining sides
- ›AAS: same approach, find third angle, then apply the sines ratio
- ›SSA: use to find angle B from sin B = b·sin(A)/a, then check for the ambiguous case
What is the inradius of a triangle?
- ›The incircle is the largest circle that fits entirely inside the triangle
- ›Formula: r = Area / s, where s = (a + b + c) / 2 (semi-perimeter)
- ›Every triangle has exactly one incircle, its centre is the triangle's incentre
- ›For an equilateral triangle with side a: r = a / (2√3) ≈ 0.289a
What is the circumradius?
- ›The circumcircle passes through all three of the triangle's vertices
- ›Formula: R = abc / (4·Area) = a / (2·sin A)
- ›For a right triangle: R = c/2, where c is the hypotenuse (Thales' theorem)
- ›The circumcentre is equidistant from all three vertices, it's the centre of the circumcircle
How are triangle types classified?
- ›By angles, Acute: all angles < 90°; Right: one angle = 90°; Obtuse: one angle > 90°
- ›By sides, Equilateral: all three sides equal (also equiangular, all 60°)
- ›By sides, Isosceles: exactly two sides equal (base angles are also equal)
- ›By sides, Scalene: all three sides different (all angles also different)
What is the triangle inequality?
- ›Rule: each side must be strictly less than the sum of the other two
- ›Equivalently: the longest side must be less than the sum of the two shorter sides
- ›Violation example: sides 3, 4, 10 fail because 10 > 3 + 4 = 7, no triangle possible
- ›This is validated automatically for SSS input, the calculator will show an error if violated