The cosine formula, also known as the cosine rule, describes the relationship between the lengths of the sides of a triangle and the cosine of one of its angles. There are actually several formulas depending on the context.
Cosine in a Right-Angled Triangle
In a right-angled triangle, the cosine of an angle is defined as the ratio of the length of the side adjacent to the angle to the length of the hypotenuse.
-
Formula: cos(x) = (adjacent side) / (hypotenuse)
Where:
- x is the angle.
- The adjacent side is the side next to angle x.
- The hypotenuse is the longest side, opposite the right angle.
-
Example: In a right-angled triangle with an angle of 30 degrees, if the adjacent side is 10cm and hypotenuse 11.55 cm, then cos(30°) = 10/11.55 ≈ 0.866.
Law of Cosines (for any triangle)
For any triangle (not just right-angled ones), the Law of Cosines provides a more general relationship:
-
Formula: c² = a² + b² - 2ab * cos(C)
Where:
- a, b, and c are the lengths of the sides of the triangle.
- C is the angle opposite side c.
-
Example: If a=5, b=7, and C=60°, then c² = 5² + 7² - 2(5)(7)cos(60°) = 25 + 49 - 70(0.5) = 34, therefore c = √34.
Cosine Function in Other Contexts
Beyond trigonometry in triangles, the cosine function is used widely in:
- Unit Circle: The cosine of an angle represents the x-coordinate of a point on the unit circle.
- Calculus: The cosine function is used in various calculations, such as derivatives and integrals.
- Physics and Engineering: It's applied in wave phenomena, oscillations, and more.
- Computer Science: Used in signal processing, computer graphics, and machine learning (e.g., cosine similarity).
This covers the most common interpretations of "cos formula." Remember to choose the correct formula depending on the context of your problem.