\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)

Functions

What is a Function?

Have you ever noticed that some things always change in the same way? For example, if you know the number of bicycles, you can always find the number of wheels by multiplying by 2. In math, we have a special name for a rule that tells us how to get one number from another: a function.
You can imagine a function as a magic machine. You put a number in (the input), the machine uses its rule, and it gives you back a new number (the output). If you put in the same input, you will always get the same output.
Definition Function
A function is a rule that takes an input number and gives back exactly one output number. For each input, the function machine always gives the same output and follows the same rule every time.
Example
Let’s see how a function machine works.
  • The rule of the function is: \(\textcolor{olive}{\text{add 2}}\).
  • The input is: \(\textcolor{colordef}{3}\).
  • The output is: \(\textcolor{colordef}{3}\textcolor{olive}{+2} = \textcolor{colorprop}{5}\).

Table of Values

A function machine follows one rule, but we can give it many different inputs. To keep track of the output for each input, we can organize our results in a special chart called a table of values.
Definition Table of Values
A table of values is a table that organizes and displays several pairs of input and output values for one function.
Example
Let's make a table of values for the function with the rule “add 2” to the input.
If we use 2, 3, and 4 as inputs, we can write the outputs in a table:
Input 2 3 4
Output 4 5 6