What Is The Law Of Cosines Formula?

Mastering the concepts of sine and cosine is an integral part of trigonometry. But once you have these ideas under your belt, they become the building blocks for other useful tools in trigonometry and, later, calculus. For example, the "law of cosines" is a special formula that you can use to find the missing side of a triangle if you know the length of the other two sides plus the angle between them, or to find the angles of a triangle when you know all three sides.

Advertisement

The Law of Cosines

The law of cosines comes in several versions, depending on which angles or sides of the triangle you're dealing with:

\(a^2 = b^2 + c^2 – 2bc × \cos(A) \
b^2 = a^2 + c^2 – 2ac × \cos(B) \
c^2 = a^2 + b^2 – 2ab × \cos(C)\)

Advertisement

In each case, ​a​, ​b​ and ​c​ are the sides of a triangle, and ​A​, ​B​, or ​C​ is the angle opposite the side of the same letter. So ​A​ is the angle opposite side ​a, B​ is the angle opposite side ​b​, and ​C​ is the angle opposite side ​c​. This is the form of the equation that you use if you're finding the length of one of the triangle's sides.

The law of cosines can also be rewritten in versions that make it easier to find any of the triangle's three angles, assuming you know the lengths of all three of the triangle's sides:

\(cos(A) = \frac{b^2 + c^2 – a^2}{2bc} \
\,\
cos(B) = \frac{c^2 + a^2 – b^2}{2ac} \
\,\
cos(C) = \frac{a^2 + b^2 – c^2}{2ab}\)

Advertisement

Solving for a Side

In order to use the law of cosines to solve for the side of a triangle, you need three pieces of information: the lengths of the triangle's other two sides, plus the angle between them. Choose the version of the formula where the side you want to find is on the left of the equation, and the information you already have is on the right. So if you want to find the length of side ​a​, you'd use the version

Advertisement

\(a^2 = b^2 + c^2 – 2bc × \cos(A)\)

1. Substitute the Side Lengths and Angle

Substitute the values of the two known sides, and the angle between them, into the formula. If your triangle has known sides ​b​ and ​c​ that measure 5 units and 6 units respectively, and the angle between them measures 60 degrees (which might also be expressed in radians as π/3), you'd have:

Advertisement

\(a^2 = 5^2 + 6^2 – (2 × 5 × 6) × \cos(60)\)

2. Insert the Cosine Value

Use a table or your calculator to look up the value of the cosine; in this case, cos(60) = 0.5, giving you the equation:

\(a^2 = 5^2 + 6^2 – (2 × 5 × 6) × 0.5\)

3. Simplify the Equation

Simplify the result of Step 2. This gives you:

\(a^2 = 25 + 36 – 30\)

Which in turn simplifies to:

\(a^2 = 31\)

4. Take the Square Root

Take the square root of both sides to finish solving for ​a​. This leaves you with:

\(a = \sqrt{31}\)

While you could use a chart or your calculator to estimate the value of √31 (it's 5.568), you'll often be allowed – and even encouraged – to leave the answer in its more precise radical form.

Solving for an Angle

You can apply the same process to find any of the triangle's angles if you know all three of its sides. This time, you'll choose the version of the formula that puts the missing or "don't know it" angle on the left side of the equals sign. Imagine that you want to find the measure of angle C (which, remember, is defined as the angle opposite side ​c​). You'd use this version of the formula:

Advertisement

\(\cos(C) = \frac{a^2 + b^2 – c^2}{2ab}\)

1. Substitute Known Values

Substitute the known values – in this type of problem, that means the lengths of all three of the triangle's side – into the equation. As an example, let the sides of your triangle be ​a​ = 3 units, ​b​ = 4 units and ​c​ = 25 units. So your equation becomes:

Advertisement

\(\cos(C) = \frac{3^2 + 4^2 – 5^2}{2 × 3 × 4}\)

2. Simplify the Resulting Equation

Once you simplify the resulting equation, you'll have:

\(\cos(C) = \frac{0}{24}\)

or simply cos(​C​) = 0.

3. Find the Inverse Cosine

Calculate the inverse cosine or arc cosine of 0, often notated as cos-1(0). Or, in other words, which angle has a cosine of 0? There are actually two angles that return this value: 90 degrees and 270 degrees. But by definition you know that every angle in a triangle must be less than 180 degrees, so that leaves only 90 degrees as an option.

So the measure of your missing angle is 90 degrees, which means you happen to be dealing with a right triangle, although this method works with non-right triangles as well.

Cite This Article

MLA

Maloney, Lisa. "What Is The Law Of Cosines Formula?" sciencing.com, https://www.sciencing.com/what-is-the-law-of-cosines-formula-13712267/. 3 December 2020.

APA

Maloney, Lisa. (2020, December 3). What Is The Law Of Cosines Formula?. sciencing.com. Retrieved from https://www.sciencing.com/what-is-the-law-of-cosines-formula-13712267/

Chicago

Maloney, Lisa. What Is The Law Of Cosines Formula? last modified August 30, 2022. https://www.sciencing.com/what-is-the-law-of-cosines-formula-13712267/

Recommended

Advertisement