Trigonometric Functions

The trigonometric functions are periodic wave functions that are used throughout math and physics. The functions can be grouped in three related groups: the main functions: sine, cosine, and tangent. The reciprocal functions: cosecant, secant and cotangent. And the arc functions: arc-sine, arc-cosine and arc-tangent.

Calculators often have the option to toggle between the radian and degree angle systems, but some programming languages and calculators only provide implementations of the functions using radians. This is because radians are the preferred unit for measuring angles in math[1] and by using radians the functions ineherit useful properties.

Circle Definition

The trigonometric functions are usually introduced using the geometry of the right-triangle as shown on this page. Later, the definitions are extended using the geometry of the circle as shown below. This website refers to these as the “circle definitions” of the trigonometric functions.

This figure illustrates the geometry used to define the circle definitions of the trigonometric functions.
Figure 1: Circle Functions

Each of the functions takes in a radian angle as input and returns a ratio as output. Geometrically, the defintions correspond to a circle with a radius and a point that forms the angle (theta). The functions can be visualized by the geometry of the unit circle. This can be seen by substituting into the circle definitions above.

Variables associated with the Unit Circle
Figure 2: Unit Circle Notation

Main Functions

The main functions are the most commonly used trigonometric functions.

Sine

Given an angle in radians, the sine function returns the sine of the angle. For example, given the angle of radians the sine function returns the value .

This example can be visualized by drawing a circle and point corresponding to the input angle. Since the function returns a ratio, the size of the circle doesn’t matter. This is shown below

Point at 1 over 12 tau radians

All possible output of the function can be visualized on the unit circle. Geometrically, given an angle as input the sine function returns the vertical component of the point corresponding to the angle on the unit circle. This is shown in the interactive below. Click and drag either blue control point.

Cosine

Given an angle in radians, the cosine function returns the cosine of the angle. For example, given the angle the cosine function returns the value .

This example can be visualized by drawing a circle and point corresponding to the input angle. The size of the circle doesn’t matter since the function returns a ratio. This circle is shown beow.

Point at 1 over 12 tau radians

All possible output of the function can be visualized on the unit circle. Geometrically, given an angle as input the cosine function returns the horizontal component of the point corresponding to the angle on the unit circle. This is shown in the interactive below. Click and drag either blue control point.

Tangent

Given an angle in radians, the tangent function returns the tangent of the angle. Geometrically, the output of the function can be visualized by the line drawn tangent to the point on the unit circle formed from the angle. Shown below is the plot of the tangent function.

Plot of the tangent function from 0 to τ (tau) radians.
Figure 3: Tangent Function

Below is an interactive which visualizes the output of the tangent function on the unit circle. Click and drag either blue control point.

Reciprocal Functions

The functions secant, cosecant, and cotangent are the reciprocal functions of cosine, sine, and tangent. Just like the main functions, these functions take in an angle on the circle as input and return a trigonometric ratio. Each function can be expressed as the reciprocal of its counter-part.

Note: Note, cosecant and secant are not as common as cotangent and are mostly included for historical reasons.

Cosecant

The cosecant function returns the reciprocal of the sine function. The function can also be written in terms of sine.

The plot below shows the output of the cosecant function in black and the sine function in green.

Plot of the cosecant function from 0 to τ (tau) radians.
Figure 4: Cosecant Function

Secant

The secant function returns the reciprocal of the cosine function. The function can also be written in terms of cosine.

The plot below shows the output of the secant function in black and the cosine function in green.

Plot of the secant function from 0 to τ (tau) radians.
Figure 5: Secant Function

Cotangent

The cotangent function returns the reciprocal of the tangent function. The function can also be written in terms of tangent.

The function is visualized in the plot below which draws the tangent function in green and cotangent in black.

Plot of the cotangent function from 0 to τ (tau) radians.
Figure 6: Cotangent Function

The output of cotangent can be visualized on the unit circle as the other line tangent to the point on the unit circle corresponding to the angle.

This figure illustrates the output of the two functions tangent and cotangent on the unit circle
Figure 7: Tangent and Cotangent

Arc Functions

The arc-functions are the inverse of cosine, sine, and tangent. Given the ratio of two sides of the right-triangle the functions return the corresponding angle. The prefix arc is used since the angle output is returned using radians, which corresponds to the arc-length of a circle’s circumference.

Note: For real number input, the arc functions will sometimes return a related angle rather than the true angle in the coordinate plane. There are two strategies for returning all angles. 1) use the ATAN2 function below which takes in two numbers as input or 2) extend the arc function definitions to use complex numbers.

ArcSine

The ArcSine function is the inverse of the sine function. Given a number value the ArcSine function returns the corresponding angle. The plot of the function is given below.

Plot of the ArcSine function.
Figure 8: ArcSine Function

Note, the function only returns angles within the first and fourth quadrant of the coordinate system. So the following expression is not true for all angles.

ArcCosine

The ArcCosine function is the inverse of the cosine function. Given a value the ArcCosine function returns the corresponding angle. The plot of the function is given below.

Plot of the ArcCosine function.
Figure 9: ArcCosine Function

Note, the function only returns angles within the first and second quadrant of the coordinate system. So the following expression is not true for all angles.

See the atan2 below for a function that returns angles in all quadrants.

ArcTangent

The ArcTangent function is the inverse of tangent. Given a value the ArcTangent function returns the corresponding angle. The plot of the function is given below.

Plot of the ArcTangent function.
Figure 10: ArcTangent Function

Note, the function only returns angles within the first and fourth quadrant of the coordinate system. So the following expression is not true for all angles.

However, the improved version shown below does.

ArcTangent 2

The Arc Tangent 2 function is the improved version of the Arc Functions and returns angles in all quadrants of the coordinate system. Given the coordinates of a point, the function returns the angle corresponding to the point.

The ATAN2 function returns the angle corresponding to the (x,y) point on the circle.
Figure 11: Arc Tangent Function 2
Note: Be careful when entering the arguments of the ATAN2 function in calculators and programming languages since their order is not consistent. Some list before and vice versa.

Links

References

  1. Radians Versus Degrees
    Wumbo (internal)