Skip to content

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.

Problemf(x)=3x−5. Find f(4) and f(−2).

  1. f(4)=3(4)−5

    Replace every x with 4, and keep the parentheses so the multiplication is clear.

  2. f(4)=12−5=7

    Multiply first, then subtract.

  3. f(−2)=3(−2)−5

    Now replace x with −2, again inside parentheses.

  4. f(−2)=−6−5=−11

    Three times negative two is negative six, and subtracting five more gives negative eleven.

Answerf(4)=7,f(−2)=−11

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?

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.

Problemg(x)=2x2−3. For which inputs is g(x)=15?

  1. 2x2−3=15

    Set the rule equal to the output you want.

  2. 2x2=18

    Add 3 to both sides.

  3. x2=9

    Divide both sides by 2.

  4. x=3 or x=−3

    Both 3 and −3 square to 9, so both inputs work.

  5. g(3)=2(9)−3=15,g(−3)=2(9)−3=15

    Check each answer by putting it back into the rule.

Answerx=3 or x=−3

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

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.