Law of Cosines

Home > Mathematics > Geometry > Trigonometry

Law of Cosines

Law of Cosines
\[c^2=a^2+b^2-2ab\cos(C)\]

Variables

a = triangle side a (m)
b = triangle side b (m)
c = triangle side opposite angle C (m)
C = included angle between sides a and b (rad or °)

Description

What is this formula?


The Law of Cosines is a trigonometric formula used to relate the lengths of the sides of a triangle with one of its angles.


It is an extension of the Pythagorean theorem for non-right triangles and allows the calculation of unknown sides or angles in any triangle.


When to use it


Use the Law of Cosines when:


- Two sides and the included angle are known (SAS)

- Three sides are known and an angle must be calculated (SSS)

- Solving oblique triangles

- Working with distances and triangulation problems


It is especially useful when right triangle methods cannot be applied.


Example


If:


a = 5 m

b = 7 m

C = 60°


Then:


c = √(5² + 7² - 2*5*7*cos(60°))


c = √(25 + 49 - 35)


c = √39


c ≈ 6.24 m


Applications


- Geometry and trigonometry

- Civil and mechanical engineering

- Surveying and mapping

- Navigation systems

- Physics calculations

- Computer graphics and 3D modeling


Download the fCalc app to calculate this formula and thousands more:


Language

English | Spanish |