Match a side to the included angle
γ is between sides a and b and opposite c. Cyclic renaming gives the other two forms.[1]
The sides must be positive and use a common length unit. A genuine triangle requires . Two sides and this included angle (SAS) give c after taking the positive square root. Angles 0° or 180° describe a degenerate collinear limit. The algebraic relation has these limits, but the triangle calculator assumes a nondegenerate triangle.[1]
With three sides (SSS), check the strict triangle inequalities first: in particular, . Only then does define an interior angle. Cosine is strictly decreasing on the triangle-angle range, so there is no second angular choice as with arcsine. An invalid ratio calls for checking the data, not arbitrary clamping.[1]
Coordinate proof and a stable length expression
Place the angle vertex at the origin. The endpoints of the known sides are and . Their distance is c. Summing the squared coordinate differences proves the formula. It also works for an obtuse angle, when the second endpoint has a negative first coordinate.[1]
The identity cos2γ+sin2γ=1 combines the squared angular terms.[1]
An equivalent form avoids subtracting nearly equal large squares when a≈b and γ is small.[1]
For γ=90°, the cosine term vanishes and Pythagoras remains. With fixed a and b, c is less than for an acute angle and greater for an obtuse one. In applied diagrams, a stated turn may be an exterior angle: the interior angle at the bend is then its supplement. Establish units and geometric roles before calculating.[1]
Calculate an obtuse corner and an SSS angle
Two sides with an obtuse included angle
- Given
- a=5 m, b=7 m and γ=120°.
- Find
- Calculate the third side c.
Setup: solve for the positive side length.
Insert the negative cosine of the obtuse angle.
Result: The side is approximately 10.440 m long.
Check: , so c exceeds the right-angle value but remains below a+b. Independently, the half-angle form gives .
Interior angle from three sides
- Given
- a=5 cm, b=8 cm, c=7 cm.
- Find
- Calculate γ opposite side c.
Setup: first check the triangle inequality, then isolate the cosine.
Insert all lengths in centimetres; square units cancel.
Select the unique interior triangle angle.
Result: γ equals 60°.
Check: Back-substitution gives . The longest side b faces a larger angle: , hence β>γ.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Square roots, data checks and angle conventions
Calculate · Foundation
a=9 cm, b=12 cm,γ=90°: find c.
Show hint
cos 90°=0.
Learning goal: Use a right angle as an exact special case.
Show solution and calculation
cm.
Check: . The answer is a length, not 225 cm2.
Rearrange · Application
A triangle has a=b=c=5 m. Find γ without rounded intermediate values.
Show hint
Cancel equal square factors.
Learning goal: Find an angle from equal sides.
Show solution and calculation
, so γ=60°.
Cyclic symmetry gives the same for all three angles; their sum is 180°.
Error analysis · Application
An angle γ is calculated for a=2, b=3, c=6. Explain the error.
Show hint
Compare the longest side with the sum of the others.
Learning goal: Recognize nonexistent triangles.
Show solution and calculation
6>2+3, so no triangle exists.
The angle formula gives , with no real arccosine.
Clamping to −1 would falsely replace the data by a degenerate case.
Interpret · Application
a=3 m, b=4 m: compare c for γ=60° and γ=120°.
Show hint
The cosines are ±1/2.
Learning goal: Compare included angles while keeping sides fixed.
Show solution and calculation
At 60°, m; at 120°, m.
The obtuse corner gives the longer opposite side; both lie strictly between 1 m and 7 m.
Transfer · Challenge
A route goes straight for 3 km, then turns by 60°. After another 4 km, how far is the endpoint from the start?
Show hint
The interior triangle angle at the turn is 120°.
Learning goal: Interpret an exterior turning angle in a route.
Show solution and calculation
The triangle angle at the bend is 120°, not 60°.
Thus km≈6.083 km.
A vector check with displacements (3,0) and (2,2√3) km gives .
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Connect angles, dot products and areas
The law of sines handles known opposite pairs and potentially double SSA solutions. The dot product supplies the same cosine term as a vector relation. Triangle area using sine additionally gives area from the known sides and their angle.[1][2]
Sources for this explanation
Quanta · Updated November 1, 2026
- OpenStax Precalculus2e §8.2: law of cosines, coordinate proof and SSS/SAS cases
- OpenStax Precalculus2e §8.1: law of sines, height proof and ambiguous SSA cases
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Authored a full German-English article with an original explanation, two worked examples and five varied exercises.
Cite this reference page
Quanta. Law of Cosines. Updated November 1, 2026. https://quanta-study.de/en/formula-sheet/kosinussatz
When citing a specific scientific statement, also cite the specialist source linked to that statement.