# Definition of a function

A function is an expression of the form $$$ \Tred{f}(\Tblue{x}) = 2\Tblue{x}+5.$$$ It relates an **input** $$\Tblue{x}$$ to an **ouput** $$f(x)$$. The output is sometimes written as $$y$$. The function is $$\Tred{f}$$.

The value of the function $$\Tred{f}(\Tblue{x}) = 2\Tblue{x}+5$$ for the input $$\Tgreen{4}$$ is $$$ \Tred{f}(\Tgreen{4}) = 2\times \Tgreen{4} + 5 = 13.$$$

The input can be any number. It is represented by a letter, called the variable. The letter is generally $$\Tblue{x}$$, but it can be anything.

The functions $$\Tred{f}(\Tblue{t}) = \Tblue{t}^2$$ and $$\Tred{g}(\Tblue{x}) = \Tblue{x}^2$$ are the same, because the letters for the variable and for the function don't matter.

The function $$\Tred{f}(\Tblue{x}) = 2 \Tblue{x} -3$$ can be represented by a **table** for several inputs.

$$$x$$$ | $$$-2$$$ | $$$-1$$$ | $$$0$$$ | $$$1$$$ | $$$2$$$ | $$$3$$$ | $$$4$$$ |
---|---|---|---|---|---|---|---|

$$$f(x)$$$ | $$$-7$$$ | $$$-5$$$ | $$$-3$$$ | $$$-1$$$ | $$$1$$$ | $$$3$$$ | $$$5$$$ |