Follow Us on Twitter

What Is a Function? (Mathematics Lesson)

What Is a Function?

A function is a relation between an input and an output.

An Example of a Function

A function takes an input and adds 1 to it to produce an output.

Define the function as f(x) (read as "f of x"):

  • Let the input be denoted by the variable x.

  • The relation is the input plus one: x + 1.

  • The output is the result of adding one to the input.

By putting in different inputs (different values of x), the function gives different outputs.

Try putting x = 1 into the equation. Substitute a 1 every time you see an x in the function:

The function can take any number as an input, even symbols:

Input, x Relation, f(x) = x + 1 Output
2 f(2) = 2 + 1 3
3 f(3) = 3 + 1 4
5 f(5) = 5 + 1 6
a f(a) = a + 1 a + 1

Read more about how to evaluate functions

Vizualizing Functions

It is useful to visualize functions as machines, which takes in an input, x, and processes it into an output, f(x).

Take the function above, f(x) = x + 1, as an example:

By putting in different inputs (different values of x), the function gives different outputs.

Try putting x = 1 into the equation:

The output is 2.

Graphs of Functions

Functions can be plotted on graphs, with the input x on the x-axis and the output f(x) on the y-axis.

The plotted function relates each input, x, to an output, f(x).

More Examples of Functions

  • A function that doubles the input:

  • A function that squares the input:

  • A function that minuses the input:

  • A trigonometric function:

Aren't Functions Just Equations with a Different Name?

The functions looked at above look a lot like equations with two variables. Replace the f(x) with a y and you have linear or quadratic equations. Are they the same?


The important differences are that functions needn't relate just numbers, and most importantly, each input can relate to only one output.

The slider below gives some important distinctions of functions.
Interactive Test


So far, the inputs have been denoted by x and the function by f(x).

The inputs needn't be denoted by an x, and a function needn't be called f.

Suppose a function represents the height of a ball that has been dropped as time passes.

The input to this function would be the time after the ball has been dropped. It would make sense to denote it by t.

As the function represents height, it would be sensible to denote it by h. But remember, h is a function of t, so the function would be denoted by h(t).

The function would become:

Note that h(t) is the same function as f(x) - the letters have just changed.


Consider the function h(t) (above) relating the height of a dropped ball at different times.

To find the height after 2 second, substitute t = 2 into the function:

To find what time the ball is at a height of 4m, substitute h(t) = 4 into the function:

Solve for t.


If a function takes an input to an output, an inverse function goes the other way - it takes an output back to its input.

For a function f(x), its inverse is denoted f-1(x).

If we think of a function as a machine, the inverse function would be running the machine backwards - putting the output in and getting the input out.