Introduction to the Law of Cosines

Complete guide to the Law of Cosines: definition, applications, and solved examples for non-right triangles in trigonometry.

Law of Cosines Fundamentals
1 Law of Cosines Definition
Law of Cosines Formula
For any triangle ABC with sides a, b, c opposite to angles A, B, C respectively:
Formula: \(c^2 = a^2 + b^2 - 2ab\cos C\)
Definition:

Law of Cosines: A fundamental trigonometric law that relates the lengths of the sides of a triangle to the cosine of one of its angles. It generalizes the Pythagorean theorem to non-right triangles and allows solving for unknown sides or angles when certain combinations of sides and angles are known.

Understanding the law:
  1. The Law of Cosines relates three sides and one angle of a triangle
  2. It generalizes the Pythagorean theorem: when C = 90°, cos(90°) = 0, so c² = a² + b²
  3. It can be written for any side-angle combination
Triangle
ABC
Sides
a, b, c
Angles
A, B, C
Step 1: Identify the triangle elements

Label the vertices as A, B, C and the corresponding opposite sides as a, b, c respectively. Angle C is opposite to side c.

Step 2: Apply the Law of Cosines

The Law of Cosines states that: \(c^2 = a^2 + b^2 - 2ab\cos C\)

This can be rearranged to solve for the angle: \(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\)

Step 3: Understand the relationship

The Law of Cosines shows that the square of any side equals the sum of squares of the other two sides minus twice their product times the cosine of the included angle.

Step 4: Recognize applications

The Law of Cosines is used when you know: two sides and the included angle (SAS), or all three sides (SSS).

\(c^2 = a^2 + b^2 - 2ab\cos C\)
Final answer:

The Law of Cosines establishes a relationship between sides and angles in any triangle.

Applied rules:

• Generalization: Extends Pythagorean theorem to non-right triangles

• SAS configuration: Two sides and included angle

• SSS configuration: All three sides

2 SAS Case (Side-Angle-Side)
SAS Example
Given: a = 5, b = 7, and angle C = 60°. Find side c.
Visual: 📐 Triangle with two sides and included angle
Definition:

SAS Case: When two sides and the included angle are known, we can find the third side using the Law of Cosines.

Given
a=5, b=7, C=60°
Find
c=?
Result
c≈6.24
Step 1: Identify the known elements

We have sides a = 5 and b = 7, with the included angle C = 60°. We need to find the third side c.

Step 2: Set up the Law of Cosines

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

\(c^2 = 5^2 + 7^2 - 2(5)(7)\cos 60°\)

Step 3: Substitute known values

\(c^2 = 25 + 49 - 70\cos 60°\)

Since \(\cos 60° = 0.5\):

\(c^2 = 74 - 70(0.5) = 74 - 35 = 39\)

Step 4: Solve for c

\(c = \sqrt{39} \approx 6.24\)

Step 5: Verify the solution

Check that the calculated side length makes sense geometrically and satisfies the triangle inequality.

c ≈ 6.24
Final answer:

Side c ≈ 6.24 units

Applied rules:

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

• Trigonometric values: cos 60° = 0.5

• Algebraic manipulation: Proper substitution and simplification

3 SSS Case (Side-Side-Side)
SSS Example
Given: a = 3, b = 4, c = 5. Find angle C.
Visual: 📐 Triangle with all three sides known
Definition:

SSS Case: When all three sides are known, we can find any angle using the rearranged Law of Cosines.

Given
a=3, b=4, c=5
Find
C=?
Result
C=90°
Step 1: Identify the known elements

We have all three sides: a = 3, b = 4, c = 5. We need to find angle C opposite to side c.

Step 2: Rearrange the Law of Cosines

To find angle C, we rearrange: \(c^2 = a^2 + b^2 - 2ab\cos C\)

Solving for cos C: \(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\)

Step 3: Substitute known values

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

\(\cos C = \frac{9 + 16 - 25}{24} = \frac{0}{24} = 0\)

Step 4: Find angle C

Since \(\cos C = 0\), then \(C = \arccos(0) = 90°\)

Step 5: Verify the solution

This confirms that (3, 4, 5) is a Pythagorean triple and forms a right triangle.

C = 90°
Final answer:

Angle C = 90°

Applied rules:

• Law of Cosines rearranged: \(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\)

• Trigonometric values: \(\arccos(0) = 90°\)

• Pythagorean verification: 3² + 4² = 5²

Law of Cosines Properties and Applications
\(c^2 = a^2 + b^2 - 2ab\cos C\)
Law of Cosines
Standard Form
\(c^2 = a^2 + b^2 - 2ab\cos C\)
Find side c when a, b, and angle C are known
Rearranged Form
\(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\)
Find angle C when all sides are known
Alternative Forms
\(a^2 = b^2 + c^2 - 2bc\cos A\)
For finding side a or angle A
Key definitions:

Law of Cosines: Relates the lengths of sides of a triangle to the cosine of one of its angles

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

SSS (Side-Side-Side): All three sides are known

Generalization: Extends the Pythagorean theorem to non-right triangles

Triangle Inequality: The sum of any two sides must be greater than the third side

When to use the Law of Cosines:
  1. SAS Case: When two sides and the included angle are known
  2. SSS Case: When all three sides are known
  3. Checking triangle validity: To verify if given sides can form a triangle
  4. Alternative to Law of Sines: When the Law of Sines cannot be applied
Tip 1: Use Law of Cosines when you have SAS or SSS configurations.
Tip 2: Remember the Law of Cosines reduces to Pythagorean theorem when the angle is 90°.
Tip 3: For finding angles, use the rearranged form: cos C = (a² + b² - c²)/(2ab).
Tip 4: Always check that your calculated angle is reasonable (between 0° and 180°).
Common errors: Forgetting to square sides properly, misapplying the negative sign in the formula, using Law of Cosines when Law of Sines would be more appropriate, not checking triangle inequality, making calculation errors with cosines.
Applications: Navigation, surveying, astronomy, engineering, physics, computer graphics, architecture, and distance calculations.
Essential rules to know:

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

• Angle version: \(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\)

• Alternative forms: \(a^2 = b^2 + c^2 - 2bc\cos A\) and \(b^2 = a^2 + c^2 - 2ac\cos B\)

• Pythagorean connection: When C = 90°, Law of Cosines becomes \(c^2 = a^2 + b^2\)

• Triangle validity: If cos C > 1 or cos C < -1, no triangle exists

Advanced Examples and Verification
4 Navigation Application
Navigation Problem
A ship sails 10 miles on a bearing of N30°E, then changes course to S60°E for 15 miles. Find the distance and bearing back to the starting point.
Visual: 🧭 Ship navigation forming a triangle
Definition:

Navigation Triangle: A practical application where the Law of Cosines helps solve real-world problems involving bearings and distances.

Given
Two legs of journey
Find
Return path
Result
Distance ≈ 19.36 mi
Step 1: Model the situation

The ship's path forms a triangle with sides 10 miles and 15 miles. The angle between these paths needs to be calculated.

Step 2: Calculate the included angle

The first bearing is N30°E (30° East of North), and the second is S60°E (60° East of South). The angle between North and South is 180°, so the angle between the two paths is: 180° - 30° - 60° = 90°.

Step 3: Apply the Law of Cosines

With a = 10, b = 15, and C = 90°: \(c^2 = 10^2 + 15^2 - 2(10)(15)\cos 90°\)

Since \(\cos 90° = 0\): \(c^2 = 100 + 225 - 0 = 325\)

So \(c = \sqrt{325} = 5\sqrt{13} \approx 18.03\) miles

Step 4: Find the return bearing

Using the Law of Cosines to find angle A (at the starting point): \(\cos A = \frac{b^2 + c^2 - a^2}{2bc}\)

\(\cos A = \frac{15^2 + (5\sqrt{13})^2 - 10^2}{2(15)(5\sqrt{13})} = \frac{225 + 325 - 100}{150\sqrt{13}} = \frac{450}{150\sqrt{13}} = \frac{3}{\sqrt{13}}\)

\(A = \arccos(\frac{3}{\sqrt{13}}) \approx 33.69°\)

Distance ≈ 18.03 miles, Bearing ≈ N33.69°W
Final answer:

The ship is approximately 18.03 miles away at a bearing of N33.69°W from its starting point.

Applied rules:

• Problem modeling: Translate real-world scenario to geometric model

• Bearing interpretation: Convert compass directions to geometric angles

• Law of Cosines: When two sides and included angle are known

5 Triangle Validation
Triangle Validation
Can a triangle exist with sides of length 2, 3, and 7? Use the Law of Cosines to verify.
Visual: ❌ Checking triangle validity
Definition:

Triangle Validation: Using the Law of Cosines to verify whether given side lengths can form a valid triangle.

Given
a=2, b=3, c=7
Test
Triangle validity
Result
No triangle exists
Step 1: Apply the Law of Cosines

Try to find angle C using: \(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\)

\(\cos C = \frac{2^2 + 3^2 - 7^2}{2(2)(3)} = \frac{4 + 9 - 49}{12} = \frac{-36}{12} = -3\)

Step 2: Check the result

Since \(\cos C = -3\), and the cosine of any angle must be between -1 and 1, this is impossible.

Step 3: Verify with triangle inequality

For a valid triangle: a + b > c, a + c > b, and b + c > a

Here: 2 + 3 = 5 < 7, so the triangle inequality is violated.

Step 4: Conclusion

No triangle can exist with sides of length 2, 3, and 7.

No triangle exists with these sides
Final answer:

No triangle exists with sides of length 2, 3, and 7.

Applied rules:

• Range of cosine: -1 ≤ cos(θ) ≤ 1 for any angle θ

• Triangle inequality: Sum of any two sides must exceed the third

• Validation method: Use Law of Cosines to check feasibility

Detailed Summary: Law of Cosines Introduction
\(c^2 = a^2 + b^2 - 2ab\cos C\)
The Law of Cosines
Comprehensive definitions:

Law of Cosines: A fundamental relationship in trigonometry that connects the lengths of sides of a triangle to the cosine of one of its angles. It states that the square of any side equals the sum of squares of the other two sides minus twice their product times the cosine of the included angle.

Non-right Triangle: A triangle that does not contain a 90° angle, requiring special trigonometric laws like the Law of Cosines and Law of Sines for solving.

SAS Configuration: Side-Angle-Side setup where two sides and the included angle are known, perfectly suited for the Law of Cosines.

SSS Configuration: Side-Side-Side setup where all three sides are known, allowing calculation of any angle using the rearranged Law of Cosines.

Complete solving methodology:
  1. Identify the given information: Determine which case applies (SAS or SSS).
  2. Draw the triangle: Sketch the triangle with known elements labeled.
  3. Select the appropriate form: Use the standard form for SAS or rearranged form for SSS.
  4. Apply the Law of Cosines: Set up the appropriate equation based on known elements.
  5. Solve for unknowns: Use algebraic manipulation to find missing sides or angles.
  6. Find remaining elements: Use additional applications of Law of Cosines or Law of Sines.
  7. Verify the solution: Check triangle inequality and geometric reasonableness.
Tip 1: Always use the Law of Cosines when you have SAS or SSS configurations.
Tip 2: Remember that the Law of Cosines reduces to the Pythagorean theorem when the angle is 90°.
Tip 3: For finding angles, use the rearranged form: cos C = (a² + b² - c²)/(2ab).
Tip 4: Always check that your calculated cosine value is between -1 and 1.
Common errors: Forgetting the negative sign in the formula, misapplying the formula for the wrong configuration, not checking that calculated angles are reasonable (0° < angle < 180°), making arithmetic errors with cosines, using Law of Cosines when Law of Sines would be more appropriate.
Applications: Surveying and land measurement, navigation and GPS systems, astronomy and celestial calculations, structural engineering, physics and wave mechanics, computer graphics and game development.
Essential rules and properties to memorize:

• Law of Cosines: \(c^2 = a^2 + b^2 - 2ab\cos C\) (works for any triangle)

• Angle form: \(\cos C = \frac{a^2 + b^2 - c^2}{2ab}\) (use when finding angles)

• Alternative forms: \(a^2 = b^2 + c^2 - 2bc\cos A\) and \(b^2 = a^2 + c^2 - 2ac\cos B\)

• Pythagorean connection: When C = 90°, cos(90°) = 0, so c² = a² + b²

• Range check: If cos C > 1 or cos C < -1, no triangle exists

Visualization: Law of Cosines Triangle Relationships
Side-Angle Relationships
Visualization of how the Law of Cosines maintains relationships in any triangle

Analysis: The chart demonstrates how the Law of Cosines relates sides and angles in various triangle configurations, showing the relationship between side lengths and cosine of included angles.

Configuration Known Elements Unknown Element Formula Used
SAS a, b, C c c² = a² + b² - 2ab cos C
SSS a, b, c C cos C = (a² + b² - c²)/(2ab)
SAS b, c, A a a² = b² + c² - 2bc cos A
SAS a, c, B b b² = a² + c² - 2ac cos B

Questions & Answers

Question: How is the Law of Cosines related to the Pythagorean theorem? Is it just an extension?

Answer: Yes, the Law of Cosines is indeed a generalization of the Pythagorean theorem! Here's the relationship:

Pythagorean Theorem: c² = a² + b² (for right triangles where C = 90°)

Law of Cosines: c² = a² + b² - 2ab cos C (for any triangle)

Connection: When angle C = 90°, cos(90°) = 0, so the Law of Cosines becomes:

c² = a² + b² - 2ab cos(90°) = a² + b² - 2ab(0) = a² + b²

This is exactly the Pythagorean theorem! So the Law of Cosines extends the Pythagorean theorem to work with any triangle, not just right triangles. The term -2ab cos C accounts for how much the triangle deviates from being a right triangle.

When C is acute (<90°), cos C > 0, so c² < a² + b² (the side is shorter than in a right triangle). When C is obtuse (>90°), cos C < 0, so c² > a² + b² (the side is longer than in a right triangle).

Question: When do I use the Law of Cosines versus the Law of Sines? They seem to solve similar problems.

Answer: The choice between the Law of Cosines and Law of Sines depends on the given information:

Use Law of Cosines when you have:

  • SAS (Side-Angle-Side): Two sides and the included angle
  • SSS (Side-Side-Side): All three sides

Use Law of Sines when you have:

  • AAS (Angle-Angle-Side): Two angles and a side
  • ASA (Angle-Side-Angle): Two angles and the included side
  • SSA (Side-Side-Angle): Two sides and a non-included angle (with caution for ambiguous case)

As a rule of thumb: if you have sides and the included angle, or all three sides, use the Law of Cosines. If you have angles and sides that form angle-side pairs, use the Law of Sines.

The Law of Cosines is generally more robust because it doesn't have an ambiguous case like the Law of Sines does in the SSA configuration.

Question: What happens if I get cos(C) > 1 or cos(C) < -1 when using the Law of Cosines to find an angle?

Answer: If you calculate cos(C) > 1 or cos(C) < -1 when using the Law of Cosines to find an angle, this means no triangle can exist with the given measurements. This is a valuable check for triangle validity.

Why this happens: The cosine of any angle must always be between -1 and 1 inclusive. Since cos(θ) = (adjacent/hypotenuse) in a right triangle, and the hypotenuse is always the longest side, the absolute value of cosine cannot exceed 1.

What it means: If you get cos(C) = 1.5 (for example), then C would have to be an angle whose cosine is 1.5, which is impossible. This tells you that the given side lengths violate the triangle inequality theorem.

Triangle inequality: For a valid triangle, the sum of any two sides must be greater than the third side. If cos(C) is outside the [-1, 1] range, the triangle inequality is violated.

This is a powerful validation tool: the Law of Cosines can simultaneously solve for an angle and verify whether a triangle is possible!

Question: How does the sign of the cosine affect the length of the side in the Law of Cosines?

Answer: The sign of the cosine significantly affects the length of the side in the Law of Cosines. Let's analyze the formula: c² = a² + b² - 2ab cos C

When C is acute (0° < C < 90°):

  • cos C > 0 (positive)
  • So -2ab cos C is negative
  • This means c² = a² + b² - (positive number)
  • Therefore c² < a² + b², so c is shorter than it would be in a right triangle

When C is a right angle (C = 90°):

  • cos C = 0
  • So -2ab cos C = 0
  • This means c² = a² + b² (Pythagorean theorem)

When C is obtuse (90° < C < 180°):

  • cos C < 0 (negative)
  • So -2ab cos C is positive (negative times negative)
  • This means c² = a² + b² + (positive number)
  • Therefore c² > a² + b², so c is longer than it would be in a right triangle

This makes geometric sense: in an obtuse triangle, the side opposite the obtuse angle is the longest side, while in an acute triangle, all sides are "shortened" compared to the right triangle case.

Question: How can I remember the three different forms of the Law of Cosines?

Answer: Here are several strategies to remember the three forms of the Law of Cosines:

Pattern recognition: Each form follows the pattern: (side)² = (other side)² + (other side)² - 2(other side)(other side)cos(angle opposite to first side)

The three forms:

  • c² = a² + b² - 2ab cos C (find c when a, b, and angle C are known)
  • a² = b² + c² - 2bc cos A (find a when b, c, and angle A are known)
  • b² = a² + c² - 2ac cos B (find b when a, c, and angle B are known)

Memory trick: "Square of any side equals sum of squares of other two sides minus twice their product times cosine of the angle opposite the first side."

Letter rotation: Notice that the letters cycle: a² = b² + c² - 2bc cos A, then shift everything by one letter: b² = a² + c² - 2ac cos B, then c² = a² + b² - 2ab cos C.

The key insight is that whatever side you're solving for appears on the left side of the equation, and the angle on the right side is the one opposite to that side.