Sine and Cosine

By Victor Powell

with text by Lewis Lehe

Sine and cosine — a.k.a., sin(θ) and cos(θ) — are functions revealing the shape of a right triangle. Looking out from a vertex with angle θ, sin(θ) is the ratio of the opposite side to the hypotenuse, while cos(θ) is the ratio of the adjacent side to the hypotenuse. No matter the size of the triangle, the values of sin(θ) and cos(θ) are the same for a given θ, as illustrated below.

Look at the left-most figure above (the unit circle). The triangle's hypotenuse has length 1, and so (conveniently!) the ratio of its adjacent to its hypotenuse is cos(θ), and the ratio of its opposite to the hypotenuse is sin(θ). Therefore, by placing triangles at the point (0,0) of the x/y plane, the functions sin(θ) and cos(θ) can be found by recording the values of x and y for every θ. Below, click play to see this process unfold. Angles are in radians (i.e., π/4, π/2,...).

Sin(θ)

Cos(θ)

Of course, computers and calculators don't actually draw circles to find sine and cosine. Instead, they use approximations like the Taylor series: \[\begin{aligned} \sin{\theta} = θ - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \frac{\theta^7}{7!} \cdots \\ \cos{\theta} = 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \frac{\theta^6}{6!} \cdots \end{aligned} \]

Using sine and cosine, it's possible to describe any (x,y) point as an alternative, (r,θ) point, where r is the length of a segment from (0,0) to the point and θ is the angle between that segment and the x-axis. This is called the polar coordinate system, and the conversion rule is (x,y) = (rcos(θ),rsin(θ )). Play with the figures below to see real-time conversion between Cartesian (i.e., x/y coordinates) and polar coordinates.

For more explanations, visit the Explained Visually project homepage.

Or subscribe to our mailing list.


comments powered by Disqus