Shape studies / Triangles

Law of Cosines Side: from inputs to a useful answer

The law of cosines extends the right-triangle relation to any included angle. The required angle lies between the two known sides.

First side compared with the result of Law of Cosines Side; the example conditions stay fixed
Figure 1. Calculated scenarios for law of cosines side. The highlighted point uses the example input. Lines connect sampled points and do not imply valid fractional counts.

Start with the relationship

The question this tool answers is specific: given first side, second side, included angle, what value follows from the stated model? The result is expressed in cm. The calculation below makes that relationship visible, so the answer can be checked independently instead of accepted as an unexplained number.

square root of (a² + b² − 2ab cos C)

Start with a dimensioned sketch and label the units beside every measurement. Distinguish the outer edge from an internal opening, and distinguish a radius from a diameter. A geometric model is most useful when the shape actually matches the assumptions in the formula.

A worked example

Use the following values as a reproducible starting point. They are illustrative inputs, not measurements of your situation or a recommendation for a particular project. The calculator opens with the same values, making it possible to compare a manual calculation with the on-screen answer.

InputExample valueUnit
First side5cm
Second side7cm
Included angle60degrees

Substitute these quantities into the displayed relationship: first side = 5 cm; second side = 7 cm; included angle = 60 degrees. Carry out the operations before rounding the final value. This gives 6.244998 cm. The number is a result for this particular set of inputs; changing the measurement basis or the conditions can change its practical meaning.

What changes when an input changes?

In the illustrated range, changing first side from 3 to 7 cm moves the result from 6.082763 to 7 cm. The output increases between those endpoints. The table gives intermediate samples so you can see whether the response is smooth, stepped or nonmonotonic; the endpoints alone do not establish that behaviour.

Every other input keeps the value shown in the example table. This controlled comparison isolates one relationship at a time. For a real decision, try a lower, central and higher plausible input instead of treating an uncertain measurement as perfectly exact.

First side (cm)Result (cm)
36.082763
46.082763
56.244998
66.557439
77

The assumption that matters

Using an angle opposite one of the entered sides gives a different problem and an incorrect result here.

A valid numerical result only means the entered values can be evaluated by this formula. It does not confirm that the formula describes every feature of the real situation. Read the unit labels, check the measurement method and keep the specific limitation above with the result when sharing it.

Use the result in your own work

Open the calculator, replace the example values and select Calculate. The result is evaluated on your device. Reset example restores this article's scenario, while Copy result keeps the quantity and unit together. If an input is outside the model's allowed range, correct it before interpreting the output.

Keep more digits during a chain of calculations than you show in a finished note. Displayed values are rounded for readability; extra decimals do not make a rough measurement more accurate. When your decision depends on a tight tolerance, compare the original measurements and assumptions before relying on the last displayed digit.

Open Law of Cosines Side

Further reading & method notes

OpenStax — mathematics and physics learning resources provides background for this subject. This article's numerical examples and chart were calculated from the formula shown above. See the editorial policy for how this collection presents assumptions and corrections.

Keep exploring