Wolfram Computation Meets Knowledge

Law of Cosines

The law of cosines relates the lengths of the sides of a triangle to the cosine of one of its angles.

The square of the length of the third side equals the length of the first side squared plus the length of the second side squared minus twice the product of the length of the first side, the length of the second side and the cosine of the angle opposite the third side.

Formula

QuantityVariable["c", "Length"]^2 == QuantityVariable["a", "Length"]^2 - 2*Cos[QuantityVariable["γ", "Angle"]]*QuantityVariable["a", "Length"]*QuantityVariable["b", "Length"] + QuantityVariable["b", "Length"]^2

symbol description physical quantity
c third side length "Length"
a first side length "Length"
γ angle opposite third side "Angle"
b second side length "Length"

Forms

Examples

Get the resource:

In[1]:=
ResourceObject["Law of Cosines"]
Out[1]=

Get the formula:

In[2]:=
FormulaData[ResourceObject["Law of Cosines"]]
Out[2]=

Use some values:

In[3]:=
FormulaData[
 ResourceObject[
  "Law of Cosines"], {QuantityVariable["c","Length"] -> 8, 
  QuantityVariable["\[Gamma]","Angle"] -> 
   Quantity[75.5`, "AngularDegrees"], 
  QuantityVariable["a","Length"] -> 7}]
Out[3]=

Source Metadata

Publisher Information