Cosine Function

Function

cos(θ)

Summary

Given the angle of a right triangle as input, returns the ratio of the triangle's adjacent side over its hypotenuse.

Input

Name Description
θ The symbol θ (theta) is a number representing the angle of a right triangle.

Output

Returns the ratio of the right triangle's adjacent side over its hypotenuse.

Examples

Cosine of π/6

The cosine of π/6 radians or 30° is equal to the square root of 3 divided by 2. This is calculated from the definition of cosine: the adjacent side over the hypotenuse side of the right triangle.

Cosine of π/4

The cosine of π/4 radians or 45° is equal to 1 divided by the square root of 2. This is calculated from the definition of cosine: the adjacent side over the hypotenuse side of the right triangle.

Cosine of π/3

The cosine of π/3 radians or 60° is equal to 1 divided by 2. This is calculated from the definition of cosine: the adjacent side over the hypotenuse side of the right triangle.

Explanation

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 6.28 radians or τ 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.