\( \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}\).