Function

Function notation annotated

A function is a core concept in math and computing. In math, a basic function usually takes a number as input and returns a number as output.

Basic Example

For example, a simple function which takes in a number as input and returns twice the number as output is shown below.

In plain language, this represents the function which has one input variable and returns the value expression . Shown below is a table of input and output of the function.

Input Output
1 2
2 4
3 6
4 8

Functions are often visualized in the cartesian coordinate system by plotting their values in 2D space. Shown below is the graph of the example function.

Plot of f(x) = 2x

The input of the function is denoted with the variable and the output of the function is denoted with the variable .

Points on the function, like the three labeled on the plot are written using the notation below.

See the function reference for a list of math functions.