Functions explained, from rules to f(x)
A function is a rule that gives exactly one output for each input. If you put in the same input twice, you always get the same output back. Students meet functions formally in 8th grade in California and use them through Algebra I, Algebra II, and beyond, so a clear picture of inputs, outputs, and notation pays off for years.
What a function is, in plain words
Think of a function as a machine with one rule inside. You feed it an input, it does the same thing every time, and one output comes out.
A vending machine works like a function if pressing B4 always gives you the same snack. It would not be a function if B4 sometimes gave chips and sometimes gave pretzels.
The key word is one. Each input has exactly one output.
Two different inputs are allowed to share an output, though. In the rule "square the number," both 3 and −3 give 9, and that is still a function, because each input on its own leads to only one result.
In the California standards, 8th graders learn that a function is a rule assigning each input exactly one output, and they see that an equation like y = mx + b describes a linear function whose graph is a straight line. In Algebra I, students formalize this with domain, range, and function notation.
How to read f(x) notation
The notation f(x) is read "f of x." It does not mean f times x. The letter f is the name of the function, x is the input, and f(x) is the output. So f(4) means "the output when the input is 4." Naming functions lets you talk about several at once, such as f, g, and h, without mixing them up.
Writing f(x) = 3x − 5 is the same as writing y = 3x − 5, except the notation makes the input visible. When a problem asks for f(4), you replace every x with 4 and simplify.
Problem. Find and .
Replace every x with 4, and keep the parentheses so the multiplication is clear.
Multiply first, then subtract.
Now replace x with −2, again inside parentheses.
Three times negative two is negative six, and subtracting five more gives negative eleven.
Answer
How to tell whether something is a function
Functions show up as equations, tables, graphs, and descriptions in words. The test is the same in every form: does any input lead to two different outputs?
- Table: look down the input column. If the same input appears twice with different outputs, it is not a function. For f(x) = 3x − 5, the inputs 0, 1, 2, 3 give −5, −2, 1, 4, one output each.
- Ordered pairs: (1, 4), (2, 4), (3, 9) is a function, because no first number repeats. (1, 4), (1, 6) is not, because the input 1 has two outputs.
- Graph: use the vertical line test. If any vertical line crosses the graph more than once, some input has more than one output. A parabola that opens up passes. A circle fails.
- Words: height is a function of the student, because each student has one height. Student is not a function of height, because one height, such as 5 feet, can belong to many students.
Working backward: finding the input
Sometimes you know the output and need the input. That turns the function into an equation to solve. This is also a good place to see that a function can send two different inputs to the same output.
Problem. For which inputs is ?
Set the rule equal to the output you want.
Add 3 to both sides.
Divide both sides by 2.
Both 3 and −3 square to 9, so both inputs work.
Check each answer by putting it back into the rule.
Answer
Domain, range, and putting functions together
The domain is the set of inputs a function accepts, and the range is the set of outputs it actually produces. For g(x) = 2x² − 3, you can put in any real number, so the domain is all real numbers. Because x² is never negative, the smallest output is −3, so the range is every number greater than or equal to −3.
In later high school courses, often Algebra II, students also combine functions. Composition means using the output of one function as the input of another.
With f(x) = 3x − 5 and g(x) = 2x² − 3, f(g(2)) means find g(2) first, which is 5, then find f(5), which is 10. Order matters: g(f(2)) is g(1), which is −1.
Common mistakes with functions
- Reading f(x) as f times x, then trying to divide both sides by f.
- Thinking two inputs with the same output break the rule. They do not. Only one input with two outputs does.
- Dropping parentheses when substituting a negative number, so 3x with x = −2 becomes 3 − 2 instead of 3(−2).
- Mixing up domain and range. Domain is about inputs (x), range is about outputs (y or f(x)).
- Doing composition in the wrong order. In f(g(x)), the inside function g goes first.
Questions
What grade do students learn functions in California?
Functions are introduced as their own topic in 8th grade under the California Common Core State Standards for Mathematics, in the 8.F domain. They become a central idea in Algebra I and continue through Algebra II and later courses.
Is every equation a function?
No. The equation x² + y² = 25 describes a circle, and the input x = 3 gives two outputs, y = 4 and y = −4, so y is not a function of x there. Equations of the form y = (an expression in x) are functions.
What does f(x) mean?
It means the output of the function f when the input is x. It is read "f of x" and is not multiplication.
Can a function have the same output for different inputs?
Yes. f(x) = x² gives 4 for both 2 and −2, and it is still a function. What a function cannot do is give two different outputs for the same input.
What is the vertical line test?
It is a quick way to check a graph. If any vertical line crosses the graph more than once, then one input has two outputs, and the graph is not a function.