Cosine (source code)

= Cosine
{title2=$\cos$}
{wiki}

= Cosine function
{synonym}

For a real <angle> $\theta$, $\cos\theta$ is the horizontal coordinate on the <unit circle> reached by a counterclockwise <rotation> through $\theta$ <radians>. For an acute <angle> in a <right triangle>, it is the adjacent side divided by the <hypotenuse>. Basic values include
$$
\cos0=1,\qquad \cos(\pi/3)=\frac12,\qquad
\cos(\pi/2)=0,\qquad \cos\pi=-1.
$$
At $\theta=2\pi/3$, the horizontal coordinate is $-1/2$ even though the vertical <sine> coordinate remains positive. A positive <angle> need not produce a positive <cosine>.

Reflection across the horizontal axis leaves this coordinate unchanged, giving $\cos(-\theta)=\cos\theta$: <cosine> is an <even function>. A full turn gives $\cos(\theta+2\pi)=\cos\theta$. For real arguments, its range is $[-1,1]$ and its <zeros of a function> occur at $\theta=\pi/2+k\pi$. A quarter-turn shifts between the two coordinate traces, with $\cos\theta=\sin(\theta+\pi/2)$.