Law of Cosines - Math Steps, Examples & Questions (2024)

High Impact Tutoring Built By Math Experts

Personalized standards-aligned one-on-one math tutoring for schools and districts

Request a demo

In order to access this I need to be confident with:

Sin cos tan

SOHCAHTOA Solving equations

Rearranging equations

Introduction

What is the law of cosines?

Using the law of cosines to find an unknown sideUsing the law of cosines to find an unknown angle

Common Core State Standards

How to find the missing side or angle of a triangle using the law of cosines

Cosine rule examples (missing side)

Example 1: find a missing side using the cosine ruleExample 2: find a missing side using the cosine ruleExample 3: find a missing side using the cosine rule

Law of cosines examples (missing angle)

Example 4: find a missing angle using the cosine rule Example 5: find a missing angle using the cosine ruleExample 6: find a missing obtuse angle using the cosine rule

Teaching tips for the law of cosines

Easy mistakes to make

Related trigonometry lessons

Practice law of cosine questions

Law of cosines FAQs

Next lessons

Still stuck?

Math resources Geometry

Trigonometry

Law of cosines

Here is everything you need to know about the law of cosines or cosine rule. You’ll learn how to use the cosine rule to find missing sides and angles in an oblique triangle (non-right triangle) and understand when to use the cosine rule instead of using the law of sines, Pythagorean theorem, or SOHCAHTOA (right triangle trigonometry).

Students first learn how to work with the law of cosines in geometry and expand that knowledge as they progress through Algebra 2 and precalculus.

What is the law of cosines?

The law of cosines (or cosine rule) is a formula that can be used to calculate a missing side or missing angle in a triangle. To apply the law of cosines, you need to know the correct arrangement of the formula and what each variable represents.

The law of cosines is typically used when you are given the three sides of a triangle (SSS) or given two sides of a triangle with the included angle measurement, (SAS).

Take a look at the triangle ABC below.

Law of Cosines - Math Steps, Examples & Questions (3)

The way you label the sides of a triangle and the angles of a triangle is the same as how you label them when using the law of sines, opposite the angle is the side.

For example, opposite angle A is side a, opposite angle B is side b, and opposite angle C is side c.

The law of cosines or the cosine rule is:

a^{2}=b^{2}+c^{2}-2bc\cos(A)

Take a look at this triangle. If you wanted to solve for the length of side a, you would use the formula a^{2}=b^{2}+c^{2}-2bc\cos(A).

Notice how side a in the formula is isolated on the left hand side of the equation with angle A being used on the right hand side of the equation.

Law of Cosines - Math Steps, Examples & Questions (4)

If you need to find a different side or angle, you can use the alternate forms of the law of cosines.

The law of cosines can also be written as:

b^2=a^2+c^2-2 a c \cos (B)

or

c^2=a^2+b^2-2 a b \cos (C)

Let’s look at how to use the law of cosines to solve the triangle.

Law of Cosines - Math Steps, Examples & Questions (5)

[FREE] Trigonometry Check for Understanding Quiz (Grade 9 to 12)

Law of Cosines - Math Steps, Examples & Questions (6)

Use this quiz to check your grade 9 to 12 students’ understanding of Trigonometry. 15+ questions with answers covering a range of 9th to 12th grade trigonometry topics to identify areas of strength and support!

DOWNLOAD FREE

x

Law of Cosines - Math Steps, Examples & Questions (7)

[FREE] Trigonometry Check for Understanding Quiz (Grade 9 to 12)

Law of Cosines - Math Steps, Examples & Questions (8)

Use this quiz to check your grade 9 to 12 students’ understanding of Trigonometry. 15+ questions with answers covering a range of 9th to 12th grade trigonometry topics to identify areas of strength and support!

DOWNLOAD FREE

Using the law of cosines to find an unknown side

Find side a in the triangle. Remember that side a is opposite angle A and side b is opposite angle B and side c is opposite angle C.

Law of Cosines - Math Steps, Examples & Questions (9)

Using the law of cosines,

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}&x^2=(6.5)^2+(7.1)^2-2(6.5)(7.1) \cos (32) \\\\ &x^2=42.25+50.41-78.27 \\\\ &x^2=14.39 \\\\ &\sqrt{x^2}=\sqrt{14.39} \\\\ &x=3.79 \end{aligned}

Side a is approximately 3.79 \, cm which makes sense looking at the sketch of the triangle.

Using the law of cosines to find an unknown angle

Find angle \theta in the triangle. Remember to label the triangle as A, \, B, \, C and a, \, b, \, c to help decide which equation to use.

Law of Cosines - Math Steps, Examples & Questions (10)

The way the triangle is labeled, angle \theta is angle B so the arrangement of the law of cosines that should be used is:

b^2=a^2+c^2-2 a c \cos (B)

Substitute the values into the equation.

(27.5)^2=(13.8)^2+(29.7)^2-2(13.8)(29.7) \cos B

\begin{aligned} & 756.25=190.44+882.09-819.72 \cos B \\\\ & 756.25=1072.53-819.72 \cos B \end{aligned}

756.25-1072.53=1072.53-1072.53-819.72 \cos B

\begin{aligned} & - \, 316.28=- \, 819.72 \cos B \\\\ & \cfrac{- \, 316.28}{- \, 819.72}=\cfrac{- \, 819.72 \cos B}{- \, 819.72} \end{aligned}

(0.3858)=\cos B \quad (Use the inverse cosine to solve)

\begin{aligned} & \cos ^{-1}(0.3858)=\cos ^{-1}(\cos B) \\\\ & 67.31=\text { angle } B \\\\ & \text { Angle } B=\text { angle } \theta \approx 67.31^{\circ} \end{aligned}

Law of Cosines - Math Steps, Examples & Questions (11)

Common Core State Standards

How does this relate to high school math?

  • High School Geometry – Similarity, Right Triangles, and Trigonometry – HSG-SRT.D.10 (+)
    Prove the Laws of Sines and Cosines and use them to solve problems.
  • High School Geometry – Similarity, Right Triangles, and Trigonometry – HSG-SRT.D.11 (+)
    Understand and apply the Law of Sines and the Law of Cosines to find unknown measurements in right and non-right triangles (example, surveying problems, resultant forces).

How to find the missing side or angle of a triangle using the law of cosines

In order to find the missing side or angle of a triangle using the law of cosines:

  1. Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.
  2. State the law of cosines, then substitute the given values into the formula.
  3. Solve the equation.

Cosine rule examples (missing side)

Example 1: find a missing side using the cosine rule

Find the value of x for triangle ABC, correct to 2 decimal places.

Law of Cosines - Math Steps, Examples & Questions (12)
  1. Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.
Law of Cosines - Math Steps, Examples & Questions (13)

2State the law of cosines, then substitute the given values into the formula.

Looking at how the triangle is labeled, x is the same as side c.

So, the arrangement of the law of cosines should be:

c^2=a^2+b^2-2 a b \cos C

Substitute in the values:

x^2=(12.5)^2+(14)^2-2(12.5)(14) \cos (38)

3Solve the equation.

\begin{aligned}& x^2=(12.5)^2+(14)^2-2(12.5)(14) \cos (38) \\\\& x^2=156.25+196-350(0.7880) \\\\& x^2=352.25-275.8 \\\\& x^2=76.25 \\\\& \sqrt{x^2}=\sqrt{76.25} \\\\& x=8.74 \\\\& x=\text { side } c \approx 8.74\mathrm{~cm} \end{aligned}

Example 2: find a missing side using the cosine rule

Find the length of XY for triangle XYZ.

Law of Cosines - Math Steps, Examples & Questions (14)

Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.

State the law of cosines, then substitute the given values into the formula.

Solve the equation.

\begin{aligned}& a^2=(0.8)^2+(0.6)^2-2(0.8)(0.6) \cos 39 \\\\& a^2=0.64+0.36-0.96 \cos 39 \\\\& a^2=1-0.7461 \\\\& a^2=0.2539 \\\\& \sqrt{a^2}=\sqrt{0.2539} \\\\& a=0.5 \\\\& \text { side } a=\text { side } X Y \approx 0.5 \mathrm{~mm} \end{aligned}

Example 3: find a missing side using the cosine rule

Find the length of side b in triangle ABC. Round your answer to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (16)

Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.

State the law of cosines, then substitute the given values into the formula.

Solve the equation.

\begin{aligned}& b^2=(12.1)^2+(25.2)^2-2(12.1)(25.2) \cos 43 \\\\& b^2=146.1+635.04-446.01 \\\\& b^2=335.13 \\\\& \sqrt{b^2}=\sqrt{335.13} \\\\& b=18.31 \approx 18.3 \\\\& b=18.3 \mathrm{~cm} \end{aligned}

Law of cosines examples (missing angle)

Example 4: find a missing angle using the cosine rule

Find the measure of the angle \theta for the isosceles triangle ABC. Round your answer to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (18)

Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.

State the law of cosines, then substitute the given values into the formula.

Solve the equation.

Example 5: find a missing angle using the cosine rule

Find the measure of angle \theta for triangle EFG. Round your answer to the nearest hundredth.

Law of Cosines - Math Steps, Examples & Questions (20)

Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.

State the law of cosines, then substitute the given values into the formula.

Solve the equation.

Example 6: find a missing obtuse angle using the cosine rule

Find the measure of angle \theta for triangle XYZ. Write your answer to 2 decimal places.

Law of Cosines - Math Steps, Examples & Questions (22)

Label each angle \textbf{(A, \, B, \, C)} and each side \textbf{(a, \, b, \, c)} of the triangle.

State the law of cosines, then substitute the given values into the formula.

Teaching tips for the law of cosines

  • Provide opportunities for students to investigate the law of cosines through platforms such as Desmos where they can determine when the law of cosines works and when it doesn’t.
  • Give students different scenarios to determine when the law of cosines works. For example, when the triangle has known parts set up as ASA, \, AAS, \, SAS, \, and SSS.
  • Instead of giving students a worksheet to practice problems, have them do scavenger hunts or game playing.
  • Incorporate game playing using math apps for students to practice skills.

Easy mistakes to make

  • Using the Pythagorean Theorem instead of the Law of Cosines
    For example, solving for x by doing:

    \begin{aligned}& 12^2+12^2=x^2 \\\\ & 144+144=x^2 \\\\ & 288=x^2 \\\\ & \sqrt{288}=x \end{aligned}

    This would be incorrect because the triangle does not have a right angle so the Pythagorean Theorem cannot be used. Instead, apply the law of cosines.

    Law of Cosines - Math Steps, Examples & Questions (24)

  • Labeling the triangle incorrectly
    Labeling the triangle incorrectly can lead to incorrect calculations and incorrect use of the law of sines. For example, this triangle has been incorrectly labeled with the side next to the angle.

    Law of Cosines - Math Steps, Examples & Questions (25)
    Remember, the correct way is to label the angles and across from the angle is the side.

  • Using the sine function instead of the cosine function
    For example, when applying the law of cosines accidentally typing the sin function or the inverse sine function on the calculator.
  • Using the law of cosines incorrectly
    For example, using a^2=b^2+c^2+2 b c \cos (A) instead of a^2=b^2+c^2-2 b c \cos (A). A common error is to add the 2 b c \operatorname {cos}(A) instead of subtracting it.
  • Solving the law of cosines incorrectly
    For example, when using the law of cosines when the side lengths are given to be a = 20, \, b = 14, \, c = 17 and you have to find the angle A .

    \begin{aligned}& a^2=b^2+c^2-2 b c \operatorname {cos}(A) \\\\ & 20^2=14^2+17^2-2(14)(17) \cos A \\\\ & 400=196+289-476 \cos A \\\\ & 400=485-476 \cos A \end{aligned}

    - \, 85

    9 \cos A

    The correct way to solve this would be:

    \begin{aligned}& 20^2=14^2+17^2-2(14)(17) \cos A \\\\ & 400=196+289-476 \cos A \\\\ & 400=485-476 \cos A \end{aligned}

    - \, 85=- \, 476 \cos A \quad (divide both sides by - \,476)

    0.1786=\cos A \quad (use the inverse cosine function)

    \begin{aligned} & \cos ^{-1}(0.1786)=\cos ^{-1}(\cos A) \\\\ & 79.71^{\circ}=\text { Angle } A \end{aligned}

Related trigonometry lessons

  • Trig functions
  • How to find the exact value of a trig function
  • Sin cos tan
  • SOHCAHTOA
  • Trig formula for area of a triangle
  • Trig formulas
  • Trig identities
  • Law of sines
  • Trig table

Practice law of cosine questions

1. Use the law of cosines to find the length of the third side of a triangle which is represented by x. Round your answer to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (26)

13.6 \, cm

Law of Cosines - Math Steps, Examples & Questions (27)

13.2 \, cm

Law of Cosines - Math Steps, Examples & Questions (28)

15.2 \, cm

Law of Cosines - Math Steps, Examples & Questions (29)

4.2 \, cm

Law of Cosines - Math Steps, Examples & Questions (30)

Label the triangle:

Law of Cosines - Math Steps, Examples & Questions (31)

Use the labeled triangle to write the correct arrangement of the law of cosines:

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}& x^2=12^2+8^2-2 \times 12 \times 8 \times \cos (97) \\\\& x^2=208-192 \cos (97) \\\\& x^2=231.3989 \end{aligned}

x=\sqrt{231.3989} \quad (take the square root)

x=15.2 \quad (rounded to the nearest tenth)

2. Find the length of x for triangle PQR. Write your answer to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (32)

10.2 \, cm

Law of Cosines - Math Steps, Examples & Questions (33)

5.8 \, cm

Law of Cosines - Math Steps, Examples & Questions (34)

8.3 \, cm

Law of Cosines - Math Steps, Examples & Questions (35)

10.5 \, cm

Law of Cosines - Math Steps, Examples & Questions (36)

Label the triangle:

Law of Cosines - Math Steps, Examples & Questions (37)

Use the labeled triangle to write the correct arrangement of the law of cosines:

The law of cosines states:

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}& x^2=6.3^2+5.4^2-2 \times 6.3 \times 5.4 \times \cos (59) \\\\& x^2=68.85-68.04 \cos (59) \\\\& x^2=33.8068 \end{aligned}

x=\sqrt{33.8068} \quad (take the square root)

x=5.8 \quad (rounded to the nearest tenth)

3. Find the length of XY for triangle XYZ. Write your answer to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (38)

11.6 \, cm

Law of Cosines - Math Steps, Examples & Questions (39)

3.3 \, cm

Law of Cosines - Math Steps, Examples & Questions (40)

5.8 \, cm

Law of Cosines - Math Steps, Examples & Questions (41)

10.5 \, cm

Law of Cosines - Math Steps, Examples & Questions (42)

Label the triangle:

Law of Cosines - Math Steps, Examples & Questions (43)

Use the labeled triangle to write the correct arrangement of the law of cosines.

The law of cosines states:

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}& a^2=6^2+6^2-2 \times 6 \times 6 \times \cos (122) \\\\& x^2=72-72 \cos (122) \\\\& x^2=110.154187 \end{aligned}

x=\sqrt{110.154187} \quad (take the square root)

x=10.5 \quad (nearest tenth)

4. Find the measure of angle \theta for triangle ABC. Round the angle to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (44)

43.8^{\circ}

Law of Cosines - Math Steps, Examples & Questions (45)

1.00^{\circ}

Law of Cosines - Math Steps, Examples & Questions (46)

28.0^{\circ}

Law of Cosines - Math Steps, Examples & Questions (47)

134^{\circ}

Law of Cosines - Math Steps, Examples & Questions (48)

Label the triangle:

Law of Cosines - Math Steps, Examples & Questions (49)

Use the labeled triangle to write the correct arrangement of the law of cosines:

The law of cosines states:

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}& 12^2=5.2^2+7.8^2-2(5.2)(7.8) \cos A \\\\& 144=27.04+60.84-81.12 \cos A \\\\& 144=87.88-81.12 \cos A \\\\& 56.12=- \, 81.12 \cos A \\\\& \cfrac{56.12}{- \, 81.12}=\cfrac{- \, 81.12 \cos A}{- \, 81.12} \\\\& – \, 0.6918=\cos A \end{aligned}

\cos ^{-1}(- \, 0.6918)=\cos ^{-1}(\cos A) \quad (use the inverse cosine function)

\begin{aligned}& 133.8^{\circ}=\text { Angle } A=\theta \\\\& 133.8^{\circ}=\theta \end{aligned}

5. Find the measure of angle \theta for triangle XYZ. Round your answer to the nearest tenth.

Law of Cosines - Math Steps, Examples & Questions (50)

30.4^{\circ}

Law of Cosines - Math Steps, Examples & Questions (51)

59.6^{\circ}

Law of Cosines - Math Steps, Examples & Questions (52)

1.00^{\circ}

Law of Cosines - Math Steps, Examples & Questions (53)

36.7^{\circ}

Law of Cosines - Math Steps, Examples & Questions (54)

Label the triangle:

Law of Cosines - Math Steps, Examples & Questions (55)

Use the correct arrangement for the law of cosines

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}& 8.3^2=15.1^2+9.8^2-2(15.1)(9.8) \cos A \\\\& 68.89=228.01+96.04-295.96 \cos A \\\\& 68.89=324.05-295.96 \cos A \\\\& – \, 255.16=- \, 295.96 \cos A \\\\& \cfrac{- \, 255.16}{- \, 295.96}=\cfrac{- \, 295.96 \cos A}{- \, 295.96} \\\\& 0.8621=\cos A \end{aligned}

\cos ^{-1}(0.8621)=\cos ^{-1}(\cos A) \quad (use the inverse cosine function)

\theta=30.4^{\circ}

6. Find the measure of angle \theta for triangle EFG. Write your answer to 2 decimal places.

Law of Cosines - Math Steps, Examples & Questions (56)

73.60^{\circ}

Law of Cosines - Math Steps, Examples & Questions (57)

16.10^{\circ}

Law of Cosines - Math Steps, Examples & Questions (58)

1.00^{\circ}

Law of Cosines - Math Steps, Examples & Questions (59)

81.95^{\circ}

Law of Cosines - Math Steps, Examples & Questions (60)

Label the triangle:

Law of Cosines - Math Steps, Examples & Questions (61)

Use the correct arrangement for the law of cosines

a^2=b^2+c^2-2 b c \cos (A)

Substitute in the values:

\begin{aligned}& 7^2=25^2+25^2-2(25)(25) \cos A \\\\& 49=625+625-1250 \cos A \\\\& 49=1250-1250 \cos A \\\\& – \, 1201=- \, 1250 \cos A \\\\& \cfrac{- \, 1201}{- \, 1250}=\cfrac{- \, 1250}{- \, 1250} \cos A \\\\& 0.9608=\cos A \end{aligned}

\cos ^{-1}(0.9608)=\cos ^{-1}(\cos A) \quad (Use the inverse cosine function)

\begin{aligned}& 16.1^{\circ}=\text { Angle } A=\theta \\\\& 16.1^{\circ}=\theta \end{aligned}

Law of cosines FAQs

Can you use the law of cosines to solve for the sides and angles of any triangle?

You can use the law of cosines to find the angles and sides of any triangle. However, if the triangle is a right triangle using Pythagoras’s theorem or right triangle trigonometry might be more efficient.

Is there a law of tangents rule?

There is a law of tangents, but it is rarely or never taught in high school. However, if you pursue mathematics in college, there is a possibility you will learn about it.

Can you use the law of cosines to find the angles and sides of an acute triangle?

Yes, you can use the law of cosines to find the missing sides and angles of any acute triangle. However, look to see what values are given because the law of sines might be more efficient.

Are there other ways to find the area of a triangle other than \bf \textbf{A}=\bf{\cfrac{1}{2}} \, \textbf{b}\textbf{h}?

Yes, there are other ways you can find the area of a triangle.

When learning trigonometry, you will learn how to find the area of a triangle using the formula, A=\cfrac{1}{2} \, b c \sin A which can also be written as A=\cfrac{1}{2} \, a c \sin B or A=\cfrac{1}{2} \, a b \sin C.

These formulas can be used when you have two known sides of a triangle and the angle in between them.

When using the law of cosines, will you have to solve quadratic equations?

Yes, there might be situations when you will have to solve quadratic equations when using law of cosines. For example, when you have two sides and a non-included angle.

Will I have to use law of cosines or law of sines to solve word problems?

Yes, just like the pythagorean theorem, you will have to be able to apply the law of sines and cosines to word problems. The rules can also be used when working with vectors.

The next lessons are

  • Circle math
  • Sectors Arcs and Segments
  • Circle Theorems

Still stuck?

At Third Space Learning, we specialize in helping teachers and school leaders to provide personalized math support for more of their students through high-quality, online one-on-one math tutoring delivered by subject experts.

Each week, our tutors support thousands of students who are at risk of not meeting their grade-level expectations, and help accelerate their progress and boost their confidence.

Law of Cosines - Math Steps, Examples & Questions (62)

Find out how we can help your students achieve success with our math tutoring programs.

Introduction

What is the law of cosines?

Using the law of cosines to find an unknown sideUsing the law of cosines to find an unknown angle

Common Core State Standards

How to find the missing side or angle of a triangle using the law of cosines

Cosine rule examples (missing side)

Example 1: find a missing side using the cosine ruleExample 2: find a missing side using the cosine ruleExample 3: find a missing side using the cosine rule

Law of cosines examples (missing angle)

Example 4: find a missing angle using the cosine rule Example 5: find a missing angle using the cosine ruleExample 6: find a missing obtuse angle using the cosine rule

Teaching tips for the law of cosines

Easy mistakes to make

Related trigonometry lessons

Practice law of cosine questions

Law of cosines FAQs

Next lessons

Still stuck?

x

[FREE] Common Core Practice Tests (Grades 3 to 6)

Prepare for math tests in your state with these Grade 3 to Grade 6 practice assessments for Common Core and state equivalents.

40 multiple choice questions and detailed answers to support test prep, created by US math experts covering a range of topics!

Download free

We use essential and non-essential cookies to improve the experience on our website. Please read our Cookies Policy for information on how we use cookies and how to manage or change your cookie settings.Accept

Law of Cosines - Math Steps, Examples & Questions (2024)
Top Articles
Latest Posts
Article information

Author: Twana Towne Ret

Last Updated:

Views: 6534

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Twana Towne Ret

Birthday: 1994-03-19

Address: Apt. 990 97439 Corwin Motorway, Port Eliseoburgh, NM 99144-2618

Phone: +5958753152963

Job: National Specialist

Hobby: Kayaking, Photography, Skydiving, Embroidery, Leather crafting, Orienteering, Cooking

Introduction: My name is Twana Towne Ret, I am a famous, talented, joyous, perfect, powerful, inquisitive, lovely person who loves writing and wants to share my knowledge and understanding with you.