A function is a core concept in math and computing. In math, a function usually takes a number as input and returns a number as output. However, this idea is extended later on in math to include more exotic math objects.

For example, a simple function that 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 symbolically represnted as . Shown below is a table of input and output of the function.

Input | Output |
---|---|

1 | 2 |

2 | 4 |

3 | 6 |

4 | 8 |

For each input, the output is calculated by substituting the input value for the variable in the definition of the function.

Functions are often visualized in the cartesian coordinate system by plotting their values in 2D space. This visualizes the output for a continuous range of values, rather than a handful of example values. Shown below is the graph of the example function.

Since the plot of the function is visualized in the cartesian plane, where every point can be written as a coordinate pair , functions are often written as a symbolic relationship between the two variable and . For example, our function is written as .

See the function reference for a list of math functions.