Law of Cosines
Complete Interactive Lesson & Quiz
What is the Law of Cosines?
The Law of Cosines (also called the Cosine Rule) is a fundamental trigonometric formula that relates the lengths of the sides of any triangle to the cosine of one of its angles. It extends the Pythagorean theorem to work with non-right triangles, making it an essential tool in trigonometry, geometry, physics, engineering, and navigation.
This powerful law allows us to solve triangles when we know either two sides and the included angle (SAS) or all three sides (SSS), situations where the Law of Sines cannot be applied directly.
The Law of Cosines Formula
For any triangle with sides a, b, c and opposite angles A, B, C respectively, the Law of Cosines states:
Alternative Form - To find an angle when all three sides are known:
Connection to Pythagorean Theorem
The Law of Cosines is a generalization of the Pythagorean Theorem. When angle C is 90° (a right angle), \( \cos 90° = 0 \), and the formula simplifies to:
This is exactly the Pythagorean Theorem! Therefore, the Law of Cosines works for all triangles - right, acute, and obtuse.
Proof of the Law of Cosines
Consider a triangle ABC with sides a, b, c. Draw an altitude from vertex B to side AC, creating point D on AC with height h.
Step 1: From the right triangle BCD:
Step 2: Also from triangle BCD:
Step 3: The remaining segment DA:
Step 4: Apply Pythagorean Theorem to triangle ADB:
Step 5: Substitute values:
Step 6: Expand:
Step 7: Factor and simplify using \( \sin^2 C + \cos^2 C = 1 \):
When to Use the Law of Cosines
Use the Law of Cosines when you have one of these two scenarios:
📐 Case 1: SAS (Side-Angle-Side)
You know two sides and the angle between them. You want to find the third side.
Example: Given sides b = 7, c = 9, and angle A = 60°, find side a.
📐 Case 2: SSS (Side-Side-Side)
You know all three sides. You want to find any angle.
Example: Given sides a = 5, b = 7, c = 8, find angle A.
Law of Cosines vs Law of Sines
Knowing when to use which law is crucial for solving triangle problems efficiently:
Criteria | Law of Cosines | Law of Sines |
---|---|---|
Given Information | SAS or SSS | ASA, AAS, or SSA |
Formula Type | Relates 3 sides and 1 angle | Relates 2 sides and 2 angles |
Best For | Finding a side or angle when sides dominate | Finding angles or sides when angles dominate |
Complexity | More calculations | Simpler calculations |
Worked Examples
Example 1: Finding a Side (SAS)
Problem: In triangle ABC, b = 8 cm, c = 5 cm, and angle A = 60°. Find side a.
Solution:
Use the formula: \( a^2 = b^2 + c^2 - 2bc \cos A \)
Substitute values: \( a^2 = 8^2 + 5^2 - 2(8)(5) \cos 60° \)
\( a^2 = 64 + 25 - 80(0.5) \)
\( a^2 = 89 - 40 = 49 \)
\( a = 7 \) cm
Example 2: Finding an Angle (SSS)
Problem: In triangle ABC, a = 7 m, b = 8 m, and c = 5 m. Find angle C.
Solution:
Use the formula: \( \cos C = \frac{a^2 + b^2 - c^2}{2ab} \)
Substitute values: \( \cos C = \frac{7^2 + 8^2 - 5^2}{2(7)(8)} \)
\( \cos C = \frac{49 + 64 - 25}{112} = \frac{88}{112} = 0.7857 \)
\( C = \cos^{-1}(0.7857) \)
\( C \approx 38.2° \)
Example 3: Real-World Application
Problem: Two ships leave port at the same time. Ship A travels 40 km in a direction 30° north of east. Ship B travels 60 km due east. How far apart are the ships?
Solution:
The angle between the paths is 30°. We have SAS: b = 40 km, c = 60 km, A = 30°.
Use: \( a^2 = b^2 + c^2 - 2bc \cos A \)
\( a^2 = 40^2 + 60^2 - 2(40)(60) \cos 30° \)
\( a^2 = 1600 + 3600 - 4800(0.866) = 5200 - 4156.8 = 1043.2 \)
\( a = \sqrt{1043.2} \)
The ships are approximately 32.3 km apart.
Real-World Applications
The Law of Cosines is used extensively in various fields:
🧭 Navigation
Calculating distances and bearings for ships, aircraft, and GPS systems.
📐 Surveying
Measuring land boundaries and determining inaccessible distances.
🌌 Astronomy
Calculating distances between celestial objects and planetary positions.
🏗️ Engineering
Designing structures, calculating forces, and analyzing mechanical systems.
📱 Computer Graphics
3D modeling, game development, and animation calculations.
⚾ Physics
Vector resolution, projectile motion, and force analysis.
Important Facts & Tips
💡 Historical Note
The Law of Cosines appears in Euclid's Elements (circa 300 BCE) as a geometric theorem, more than 2000 years before modern trigonometry!
💡 Calculator Mode
Always ensure your calculator is in the correct mode (degrees or radians) matching the angle units in your problem.
💡 Sign Convention
The term \( -2bc \cos A \) is negative. For obtuse angles (\( > 90° \)), \( \cos A \) is negative, making the overall term positive and \( a^2 \) larger.
💡 Triangle Inequality
Before using the Law of Cosines, verify that the sum of any two sides is greater than the third side. Otherwise, no triangle exists!
💡 Curriculum Coverage
The Law of Cosines appears in IB Math (SL & HL), AP Precalculus, GCSE/IGCSE Mathematics, A-Level Mathematics, and SAT Math Level 2.
📝 Interactive Quiz
Test your understanding of the Law of Cosines!
Question 1: In a triangle with sides b = 6, c = 8, and angle A = 60°, what is the length of side a?
Question 2: When should you use the Law of Cosines instead of the Law of Sines?
Question 3: In a triangle with sides a = 5, b = 7, and c = 9, is angle C acute, right, or obtuse?
Question 4: What does the Law of Cosines reduce to when the angle is 90°?
Question 5: A triangle has sides of length 10, 12, and 15. Find angle A opposite to side a = 10. (Use \( \cos A = \frac{b^2 + c^2 - a^2}{2bc} \))
👨🏫 About the Author
Adam
Co-Founder @RevisionTown
Math Expert in various curricula including IB, AP, GCSE, IGCSE, and more.