SOLVETUTORMATH SOLVER

Instrument MI-01-130 · Mathematics

Cosine Triangle Calculator

Two sides and the angle pinched between them already decide the third side. This sheet applies the Law of Cosines and shows the arithmetic behind the answer.

Instrument MI-01-130
Sheet 1 OF 1
Rev A
Verified
Type 05 — Geometry SER. 2026-01130

Side c (opposite C)

6.24499800

c = √(a² + b² − 2ab·cosC)

The working Every figure verified twice
  1. sideC = √(5^2 + 7^2 − 2·5·7·cos(1.047198)) = 6.24499800
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The Law of Cosines answers exactly one question: given two sides of a triangle and the angle trapped between them, how long is the side that closes the shape? That side-angle-side combination pins a triangle down completely — there is only one possible third side for a given a, b, and C — so c² = a² + b² − 2ab·cosC is not an approximation but an exact identity, extending the Pythagorean theorem to triangles that need not have a right angle anywhere in them.

The extra term, −2ab·cosC, is doing the work of a correction. Picture angle C sitting at the origin with sides a and b radiating out from it as two vectors; the missing side c is the straight-line gap between their far ends, and the Law of Cosines is just the vector identity |a − b|² = a² + b² − 2a·b written out in full, since a dot product a·b equals ab·cosC by definition. Set C to a right angle and that dot product vanishes — cos90° = 0 — so the whole correction term disappears, leaving the plain a² + b² = c² behind.

Euclid proved the obtuse and acute cases geometrically in Book II of the Elements, propositions 12 and 13, centuries before trigonometric notation existed to write cosC at all; the Persian astronomer Ghiyath al-Kashi later generalized and tabulated the relationship in the fifteenth century, which is why French textbooks still call it le théorème d'Al-Kashi. At the formula's extremes the geometry stays honest: as C opens toward a straight 180°, cosC slides toward −1 and c climbs toward a + b, the triangle flattening into a line; as C closes toward 0°, cosC approaches 1 and c shrinks toward the gap a − b — the formula enforcing the triangle inequality on its own, with nobody stating that rule separately.

c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos Cc=a2+b22abcosCc = \sqrt{a^2 + b^2 - 2ab\cos C}
a, b — the two known sides · C — the angle enclosed between sides a and b · c — the third side, opposite C, that the formula solves for.
  • Enter the two known side lengths into Side a and Side b, in any consistent unit — the third side comes back in that same unit.
  • Enter the angle trapped between those two sides into Included angle C, picking degrees, radians, or turns from its unit menu.
  • Confirm C is the angle where sides a and b actually meet, not one of the triangle's other two corners, since the formula only works with the enclosed angle.
  • Read the missing length straight off Side c (opposite C).

Worked example — 5 and 7 enclosing 60°

Take a triangle with Side a = 5 units, Side b = 7 units, and an Included angle C of 60°, or 1.0471975511965976 radians once converted. The Law of Cosines gives c² = 5² + 7² − 2×5×7×cos(60°) = 25 + 49 − 70×0.5 = 74 − 35 = 39, so Side c (opposite C) = √39 = 6.244997998398397, the exact figure this sheet returns.

Picture that triangle as a plot of land: two fence runs of 5 m and 7 m meet at a corner post bent to 60°, and the survey wants the length of the third run that closes the boundary. Nobody has to walk out and measure it — √39 m ≈ 6.245 m is fixed the moment the two runs and the angle between them are fixed, which is the entire promise of a side-angle-side triangle: three numbers in, one exact triangle out.

Questions

What does the Law of Cosines actually compute?

The length of a triangle's third side from the other two sides and the angle trapped between them: c² = a² + b² − 2ab·cosC. It is the direct extension of the Pythagorean theorem to triangles without a right angle — set C to exactly 90° and the −2ab·cosC term vanishes, leaving the familiar a² + b² = c² behind.

How is this different from the ASA and SSS triangle solvers?

Each starts from a different known trio. This one takes side-angle-side — two sides and the angle squeezed between them — and solves directly for the third side with the Law of Cosines. ASA starts from two angles and the side between them instead, solving with the Law of Sines; SSS starts from all three sides and works backward for the angles. Whichever measurements you already have decides which of the three applies.

Why does a 90° included angle give the same answer as the Pythagorean theorem?

Because cos(90°) equals zero, so the correction term −2ab·cosC disappears entirely and c² = a² + b² − 2ab·cosC reduces to plain c² = a² + b². Sides of 3 and 4 enclosing a right angle return c = 5 exactly — the Pythagorean theorem was never a separate rule, just the Law of Cosines at its one special angle.

Does a wider included angle always make the third side longer?

Yes, for fixed side lengths — cosine falls as an angle opens from 0° toward 180°, so −2ab·cosC grows and c grows with it. Two 5-unit sides enclosing 120° close to a third side of 5√3 ≈ 8.660, longer than the same two sides would give at a right angle; push C toward 180° and c climbs all the way toward the flat-line limit of a + b.

Which angle counts as the included angle C?

Specifically the one where sides a and b physically meet, not either of the triangle's other two corners. Plugging in a non-included angle still returns a number from the formula, but it will not be the correct third side, because the −2ab·cosC term is derived from the vertex where a and b actually join.

Can the Law of Cosines produce an impossible triangle?

No — given any positive a, b and any C strictly between 0° and 180°, the formula always returns a valid c that satisfies the triangle inequality on its own. As C approaches 180° the answer approaches a + b, and as C approaches 0° it approaches the gap a − b — the two boundaries a real triangle can never reach — so every output between them is guaranteed constructible.

References