The cosine function returns the cosine of an angle provided in radians. In geometric terms, the function returns the horizontal component of the point formed by the angle on the unit circle.
Given the angle of a right triangle in radians, the cosine function returns the ratio of the triangle’s adjacent side over its hypotenuse. For example, given the angle of radians (equivalent to ) the function returns the ratio .
The graph of the cosine function is shown below. The x-axis represents the input of angles from 0 to τ (tau) radians. The y-axis represents the ratio of the right triangle’s adjacent side over its hypotenuse. Note: Radians are a unit of measure used to measure angles - a full rotation (360°) in radians is equal to approximately radians or (tau) radians.
Geometrically, the function can be visualized with a right triangle of hypotenuse length 1 which forms the unit circle. The shape of this right triangle is a similar triangle to all triangles corresponding to the input angle formed between the x-axis and hypotenuse of the triangle. Click and drag either of the two control points to see how the input angle changes the output of the function.
Since the right triangle in the unit circle is the general case of the cosine function, the definition simplifies to correspod directly with the length of the adjacent side of the triangle. In applications, the result of the cosine function is often scaled by the hypotenuse of the right triangle.