In mathematics, a function is a special relationship between a set of inputs and a set of outputs. It's like a machine: you put something in, the machine follows a specific rule, and it gives you a single, predictable thing out.
The most important part of the definition of a function is this:
For each input, there is exactly one output.
Think of a vending machine. If you press the button for 'soda' (the input), you expect to get a soda (the output). You wouldn't be happy if you sometimes got soda, sometimes got chips, and sometimes got nothing! That would not be a functioning machine.
We often use a special notation for functions. Instead of writing `y = 2x + 1`, we can write:
f(x) = 2x + 1
This is read as 'f of x equals 2x plus 1'.
This notation is useful because it's a shorthand way to ask 'what is the output when the input is a certain number?'
A simple way to tell if a graph represents a function is to use the vertical line test.
A circle, for example, is not a function because a vertical line can cross it in two places. A straight line or a parabola, however, are functions.
Does the following set of ordered pairs represent a function? {(1, 2), (2, 4), (3, 6), (1, 5)} Explain why or why not.
If `g(x) = 3x - 7`, what is the value of `g(5)`?
A scientist graphs her experimental data. The independent variable is time, and the dependent variable is temperature. On which axis should she plot time?