Read this as a study guide instead

Function notation

f(x) as a rule and a mapping: inputs, outputs, domain and range.

The rule inside f
f2x + 137f(3) = 2(3) + 1 = 7

The same ideas, as prose

These are the exact fragments the model serves — also available as an ordered study guide.

A rule you can call by name

A rule that turns one number into another is not new — you already build one every time you write an expression like 2x + 1 and plug in a value for x. Function notation is what happens when that rule earns a name. Instead of re-writing the recipe every time you use it, you call it: once a rule is named f, writing f(x) says "run the rule named f on whatever x happens to be," without spelling the recipe out again.

The payoff is compactness with precision. f(3) means something exact — take the number 3, run it through the rule named f, and report whatever comes out — and that meaning holds whether the rule is written right next to it or defined somewhere else entirely. A function is, at its core, two things bolted together: a rule for turning inputs into outputs, and a guarantee about how that rule is allowed to behave, which together are called a mapping.

The next few pages take each half of that in turn: how to read f(x) itself, what the mapping guarantee actually requires, how to run the rule at a specific value, and what a rule is and is not allowed to accept as input.

Anatomy of f(x)

three parts, one line f (x) = 2x + 1 the function's name the input variable the rule: produces the output f(3) means: substitute 3 for x, then run the rule
The notation f(x) = 2x + 1 labeled part by part: f is the function's name, (x) holds the input variable, and 2x + 1 is the rule that produces the output.

f(x) = 2x + 1 packs three separate ideas into one line, and reading it correctly means pulling them apart. f is the function's name — like a name tag pinned on a process, so it can be pointed to and called by that name instead of described all over again — a short label chosen so the rule can be referred to without restating it every time. The parenthesized x is the input variable, a placeholder for whatever number gets fed in, not a value by itself. Everything after the equals sign, 2x + 1, is the rule itself: the actual arithmetic that turns whatever x is into an output.

The name and the input are independent choices. Euler introduced the f(x) form in 1734, and picking f first, with g and h following for a second or third rule, has stuck as the default convention ever since, but nothing about the notation requires that particular letter; a rule named area or cost reads exactly the same way once you know the pattern. What does matter is keeping the name and the input glued together: f(x) names one specific value produced by f, while f alone names the rule in general, before any input has been supplied.

This is also why f(x) is not a variable being multiplied by anything. The parentheses are not multiplication; they are a request. Reading f(x) as "f times x" is the single most common early mistake with this notation, and it fades quickly once the parentheses are read as "apply this rule to," never "multiply by."

One input, exactly one output

every input sends exactly one arrow out domain (inputs) range (outputs) -2 2 3 4 9 -2 and 2 both point to 4 - two inputs sharing an output is legal no input ever points to more than one output
A mapping diagram showing each input, -2, 2, and 3, sending exactly one arrow to an output value, 4 or 9; two different inputs are allowed to point to the same output, but no input ever points to two outputs.

Underneath the notation, a function is a mapping: a rule that pairs every legal input with exactly one output. like a machine that always turns a given input into the exact same output, every single time it runs — feed it the same input twice and it returns the same output twice, feed it two different inputs and it may return the same output for both, but it can never return two different outputs for the same input. That last requirement is not a style preference; it is the entire definition. A rule that sometimes gives one answer and sometimes another for the identical input is not a function, whatever else it might be.

Nothing in the definition requires the mapping to work the other way around. f(x) = x^2 sends both 3 and -3 to 9, and that is entirely legal — two different inputs are allowed to land on the same output. What is not legal is the reverse: one input producing two competing outputs. The set of inputs a function is willing to accept is its domain; the set of outputs it actually produces is its range, and both get a closer look shortly.

This one-output-per-input rule is what makes function notation trustworthy in the first place. Once f is known to be a function, f(5) is not "probably around this much" — it is one specific number, guaranteed, and every later step in a longer calculation can lean on that guarantee without re-checking it.

Plugging in a number

Evaluating a function at a value means substitution: replace every occurrence of the input variable in the rule with the number you were given, then simplify. For f(x) = 2x + 1, evaluating f(3) means replacing every x with 3, giving 2(3) + 1, which simplifies to 7. The result, f(3) = 7, is read "f of three equals seven," and it states a fact about the function f rather than an equation left to be solved.

The substitution has to be total and literal: every x in the rule gets replaced, not just the first one, and the arithmetic that follows is ordinary order-of-operations work on the numbers that result. A rule like f(x) = x^2 - 3x + 4 evaluated at f(2) becomes (2)^2 - 3(2) + 4, which works out to 4 - 6 + 4, or 2. Function notation does not change how the arithmetic behaves; it only changes what gets substituted and where.

The input does not have to be a bare number, either. f(a + 1) substitutes the entire expression a + 1 everywhere x appears, and the result is itself an expression rather than a single number until a is pinned down. That flexibility costs nothing extra — the rule for substitution is identical whether the input is a number or an expression standing in for one.

What's allowed in, what comes out

f(x) = 1/x - one excluded point on each line domain: every real number except 0 -3 -2 -1 0 1 2 3 range: every real number except 0 -3 -1 0 1 3 1/x is never 0 for any real x, so 0 is missing from the range too
Two number lines for f(x) = 1 over x: the domain line excludes 0 with an open circle, and the range line excludes 0 too, since the rule can never actually output 0.

A function's domain is the complete set of inputs its rule is willing to accept; its range is the complete set of outputs those inputs actually produce. For a rule like f(x) = x + 5 with no restrictions built in, the domain is every real number, since there is no x that breaks the arithmetic, and the range is every real number too, because adding 5 can land on any value at all. Most rules are not that permissive.

A rule can exclude inputs on its own, without anyone declaring a restriction separately. f(x) = 1/x is undefined at x = 0, because division by zero has no real-number result, so 0 is simply not in the domain while every other real number is fine. f(x) = sqrt(x) runs into the same kind of problem for negative inputs, since the square root of a negative number is not a real number, so its domain is limited to x greater than or equal to 0. Both exclusions come straight out of ordinary arithmetic, not from an extra rule bolted on top.

Range takes more care to pin down, because it depends on what the rule actually outputs across its whole domain rather than what looks plausible from the input side. f(x) = x^2 has a domain of every real number, but because squaring a real number never produces a negative result, its range is limited to 0 and the positive numbers, even though nothing about the domain was restricted at all. Reading domain and range correctly means checking what the rule does, not guessing from the shape of the input.

Not every rule is a function

one crossing: passes two crossings: fails one x, one y one x, two y values
A vertical line crosses a bowl-shaped curve once, so it passes the vertical line test and is a function; the same line crosses a circle twice, so the circle fails and is not a function.

Not every relationship between two quantities qualifies as a function, and the difference matters because function notation, f(x), only makes sense for relationships that do qualify. A relation is any pairing of inputs and outputs at all; a function is a relation with the added guarantee that every input pairs with exactly one output. The circle x^2 + y^2 = 1 is a perfectly good relation — for a given x there can be two values of y — but it fails the function requirement, so it cannot be written as f(x) without picking apart which half of the circle is meant.

On a graph, this shows up as the vertical line test: draw a vertical line anywhere across the graph, and if it ever crosses the curve more than once, the graph is not a function. Two crossing points on the same vertical line share the same x-value but sit at two different y-values, which is exactly the one-input-two-outputs situation the function definition forbids. A graph that every vertical line meets at most once passes the test, and can honestly be labeled f(x) for some rule f.

The test is a shortcut, not a separate rule of its own — it is the domain-and-mapping definition applied visually, since a vertical line at a given x shows every y-value paired with that one input. Once a relation passes it, function notation is guaranteed to behave the way a function always does: one input, one output, no exceptions.

Where f(x) shows up next

Function notation is the language the rest of algebra is written in. A straight line, a curve that grows by repeated multiplication, a rule defined piece by piece for different ranges of input — every one of those is a function first, described with the same f(x) machinery this page covers, before anything specific to lines or curves or pieces gets added on top.

The habit behind it, naming a rule and calling it by that name instead of re-deriving it every time, is also the pattern behind larger systems built the same way. A pipeline of steps that turns one request into one response is behaving like a function: one input, one guaranteed output, even when the "rule" running underneath is a chain of software instead of arithmetic. A system reading a sensor and deciding what a motor should do next is doing the same thing on a physical machine — take a current input, apply a fixed rule, produce exactly one output to act on.

None of that requires understanding those systems yet. What it requires is trusting the guarantee this page has been building toward: once something is a function, feeding it the same input always gets you the same answer, and that guarantee is worth having a name for.