Cosine Rule: Complete Guide with Calculator & Examples
Master the Law of Cosines | Find Sides & Angles in Any Triangle | Interactive Calculator | GCSE, IGCSE, A-Level & IB Math
What is the Cosine Rule?
The cosine rule (also called the law of cosines) is a fundamental formula in trigonometry that relates the lengths of the sides of any triangle to the cosine of one of its angles. Unlike the Pythagorean theorem which only works for right-angled triangles, the cosine rule works for any triangle – whether it's acute, obtuse, or right-angled.
🎯 Key Points About the Cosine Rule
- Universal application: Works for all triangles (acute, obtuse, right-angled)
- Two main uses: Finding unknown sides or finding unknown angles
- Extension of Pythagoras: Reduces to \(a^2 = b^2 + c^2\) when angle is 90°
- Essential for GCSE, IGCSE, A-Level, and IB Math
- Complements the sine rule for solving all types of triangle problems
The cosine rule is particularly useful when you're given specific information about a triangle and need to find missing measurements. It bridges the gap between pure geometry and trigonometry, making it an essential tool for students studying GCSE Maths, IGCSE, A-Level Mathematics, and IB Math.
Cosine Rule Formulas
📏 Cosine Rule for Finding a Side
When you know two sides and the included angle (SAS), use this formula to find the third side:
\[a^2 = b^2 + c^2 - 2bc \cos(A)\]
Where:
• \(a\) = the side you want to find
• \(b\) and \(c\) = the two known sides
• \(A\) = the angle between sides \(b\) and \(c\) (opposite side \(a\))
💡 Tip: To find side \(a\), take the square root of both sides: \(a = \sqrt{b^2 + c^2 - 2bc \cos(A)}\)
📐 Cosine Rule for Finding an Angle
When you know all three sides (SSS), rearrange the formula to find any angle:
\[\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}\]
Where:
• \(A\) = the angle you want to find
• \(a\) = the side opposite angle \(A\)
• \(b\) and \(c\) = the other two sides
💡 Tip: After calculating \(\cos(A)\), use inverse cosine to find the angle: \(A = \arccos\left(\frac{b^2 + c^2 - a^2}{2bc}\right)\) or \(A = \cos^{-1}\left(\frac{b^2 + c^2 - a^2}{2bc}\right)\)
📋 Complete Set of Cosine Rule Formulas
The cosine rule can be written for any side or angle in the triangle:
\[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)\]
🧮 Cosine Rule Calculator
Find Side Length (SAS)
Enter two sides and the included angle
Result:
Find Angle (SSS)
Enter all three sides
Result:
How to Use the Cosine Rule
The cosine rule is used in two main scenarios. Here's how to identify when and how to use it:
⚡ When to Use the Cosine Rule
📏 Scenario 1: Find a Side (SAS)
Given: Two sides and the included angle
Find: The third side
Example: Sides = 7, 9; Angle between them = 60°
Use: \(a^2 = b^2 + c^2 - 2bc \cos(A)\)
📐 Scenario 2: Find an Angle (SSS)
Given: All three sides
Find: Any angle
Example: Sides = 5, 7, 9
Use: \(\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}\)
📝 Step-by-Step: Finding a Side
Label the Triangle
Label the sides as \(a\), \(b\), and \(c\). The side you're finding (\(a\)) should be opposite the angle you know (\(A\)).
Write the Formula
Write \(a^2 = b^2 + c^2 - 2bc \cos(A)\) where \(b\) and \(c\) are your known sides and \(A\) is the known angle.
Substitute Values
Replace \(b\), \(c\), and \(A\) with your known values. Make sure your calculator is in degree mode.
Calculate and Square Root
Work out the right side to get \(a^2\), then take the square root: \(a = \sqrt{a^2}\). Length is always positive.
📝 Step-by-Step: Finding an Angle
Identify Sides and Angle
The angle you're finding (\(A\)) must be opposite the side you label as \(a\). The other sides are \(b\) and \(c\).
Use Rearranged Formula
Write \(\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}\) with all three known side lengths.
Calculate cos(A)
Substitute values and calculate. The result should be between -1 and 1 (otherwise check your working).
Apply Inverse Cosine
Press cos-1 (or arccos) on your calculator: \(A = \cos^{-1}(\text{your result})\). Ensure calculator is in degree mode.
Worked Examples
📌 Example 1: Finding Side Length (SAS)
Question: In triangle ABC, side \(b = 7\) cm, side \(c = 9\) cm, and the angle between them \(A = 60°\). Find side \(a\).
Solution:
Step 1: Identify what we know: \(b = 7\), \(c = 9\), \(A = 60°\)
Step 2: Apply the cosine rule formula:
Step 3: Substitute the values:
Step 4: Calculate (\(\cos(60°) = 0.5\)):
Step 5: Take the square root:
\[a = \sqrt{67} \approx 8.19 \text{ cm}\]
📌 Example 2: Finding an Angle (SSS)
Question: Triangle ABC has sides \(a = 8\) cm, \(b = 7\) cm, and \(c = 9\) cm. Find angle \(A\).
Solution:
Step 1: Identify what we know: \(a = 8\), \(b = 7\), \(c = 9\)
Step 2: Use the rearranged cosine rule:
Step 3: Substitute the values:
Step 4: Calculate:
Step 5: Apply inverse cosine:
\[A = \cos^{-1}(0.5238) \approx 58.41°\]
Sine Rule vs Cosine Rule
Both the sine rule and cosine rule are essential tools for solving triangles, but they're used in different situations. Here's how to choose between them:
📊 Quick Comparison
| Aspect | Sine Rule | Cosine Rule |
|---|---|---|
| Formula | \(\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}\) | \(a^2 = b^2 + c^2 - 2bc \cos(A)\) |
| When to Use | Two angles + one side (AAS/ASA) Two sides + non-included angle (SSA) |
Two sides + included angle (SAS) All three sides (SSS) |
| Triangle Types | Any triangle | Any triangle |
| Complexity | Simpler calculations | More complex (squaring, square roots) |
| Best For | Finding angles or sides when you know opposite pairs | Finding sides when angle is included, or finding angles from all sides |
📐 The Sine Rule (Quick Reference)
\[\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}\]
Use the sine rule when:
• You know two angles and one side (find the other sides)
• You know two sides and one non-included angle (find other angles - but watch for the ambiguous case!)
• You're working with ratios of sides to opposite angles
⚠️ Note: The sine rule can give ambiguous results in SSA cases (two sides and non-included angle) because sine is positive for both acute and obtuse angles. The cosine rule doesn't have this ambiguity problem.
Frequently Asked Questions
❓ What is the cosine rule?
The cosine rule (also called the law of cosines) is a formula that relates the lengths of the sides of a triangle to the cosine of one of its angles. It states: \(a^2 = b^2 + c^2 - 2bc \cos(A)\), where \(a\), \(b\), \(c\) are the sides and \(A\) is the angle opposite side \(a\). It's used to find unknown sides or angles in non-right-angled triangles. The cosine rule is an extension of the Pythagorean theorem that works for all triangles, not just right-angled ones.
❓ When should I use the cosine rule instead of the sine rule?
Use the cosine rule when: (1) You know two sides and the included angle (SAS) and need to find the third side, or (2) You know all three sides (SSS) and need to find an angle. Use the sine rule when: (1) You know two angles and one side (AAS/ASA), or (2) You know two sides and a non-included angle (SSA). The cosine rule is necessary for SAS and SSS cases because the sine rule doesn't work with these configurations. The cosine rule is also preferred when you want to avoid the ambiguous case that can occur with the sine rule.
❓ How do you rearrange the cosine rule to find an angle?
To find angle \(A\), rearrange the cosine rule to: \(\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}\), then calculate \(A = \arccos\left(\frac{b^2 + c^2 - a^2}{2bc}\right)\) or \(A = \cos^{-1}\left(\frac{b^2 + c^2 - a^2}{2bc}\right)\). This formula works when you know all three sides of the triangle. The rearrangement comes from solving the original formula for \(\cos(A)\) by moving terms around algebraically. Remember that the result of the fraction must be between -1 and 1 (the range of cosine values), otherwise you've made a calculation error or the sides don't form a valid triangle.
❓ What is the difference between sine rule and cosine rule?
The sine rule relates sides to opposite angles using ratios: \(\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)}\). The cosine rule relates all three sides to one angle: \(a^2 = b^2 + c^2 - 2bc \cos(A)\). The sine rule is simpler to use but only works in specific cases (when you know angle-side pairs), while the cosine rule works for SAS and SSS cases but requires more calculation (squaring, multiplication, square roots). The sine rule uses division and proportions, while the cosine rule uses quadratic relationships. Both are essential for solving all types of triangle problems in GCSE, IGCSE, A-Level, and IB Mathematics.
❓ Does the cosine rule work for right-angled triangles?
Yes! The cosine rule works for all triangles, including right-angled triangles. In fact, when you use the cosine rule on a right-angled triangle (where one angle is 90°), it simplifies to the Pythagorean theorem. Since \(\cos(90°) = 0\), the term \(-2bc \cos(A)\) becomes zero, leaving you with \(a^2 = b^2 + c^2\), which is Pythagoras' theorem. This shows that the cosine rule is actually a generalization of the Pythagorean theorem that works for any triangle. However, for right-angled triangles, it's usually easier to just use Pythagoras or basic trigonometry (SOH CAH TOA).
❓ Can I use degrees or radians in the cosine rule?
You can use either degrees or radians, but you must be consistent and ensure your calculator is in the correct mode. For GCSE and IGCSE Mathematics, angles are typically given in degrees, so make sure your calculator is in degree mode (DEG). For A-Level and IB Mathematics, you might work with radians in some contexts. The important thing is that when you press the cos button on your calculator, it interprets the angle correctly. Most calculator errors in the cosine rule come from being in the wrong angle mode. Always check your calculator mode before starting!
❓ What does SAS and SSS mean?
SAS stands for "Side-Angle-Side" – it means you know two sides of a triangle and the angle between them (the included angle). Use the cosine rule to find the third side. SSS stands for "Side-Side-Side" – it means you know all three sides of the triangle. Use the rearranged cosine rule to find any angle. Other abbreviations you might see include AAS (Angle-Angle-Side), ASA (Angle-Side-Angle), and SSA (Side-Side-Angle). These letters help you quickly identify what information you have and which formula to use for solving triangles.
❓ Why do I get an error when calculating an angle with the cosine rule?
Common reasons for errors: (1) Calculator in wrong mode – check it's in degree mode (DEG) if working in degrees, (2) Invalid triangle – the three sides don't satisfy the triangle inequality (the sum of any two sides must be greater than the third side), (3) Calculation error – double-check your arithmetic, especially when squaring and dividing, (4) Value outside cosine range – if your calculation gives a value greater than 1 or less than -1, the sides don't form a valid triangle or there's an arithmetic error. The inverse cosine function (\(\cos^{-1}\)) only accepts values between -1 and 1. Always verify your inputs form a valid triangle before applying the formula.
Need Help with the Cosine Rule or Trigonometry?
Struggling with the cosine rule, sine rule, or trigonometry in general? NUM8ERS offers expert GCSE, IGCSE, A-Level, and IB Math tutoring in Dubai with experienced teachers who specialize in making complex concepts clear and simple.
Our math tutors break down trigonometry step-by-step, provide practice problems, and ensure you master formulas like the cosine rule through personalized 1-on-1 or small-group sessions. Available online via Zoom or in-centre at Al Barsha 1, Dubai.
📍 204, API Business Suites, Al Barsha 1, Dubai | ☎️ +971-04-399-1044 | 🕐 12:00 PM - 09:00 PM Daily