A function is a rule that assigns exactly one output to each allowed input. In the notation f(x), x is the input, while f names the function and f(x) means the output produced when that function receives x.
What a Function Means
A function describes a dependable relationship between inputs and outputs. You can think of it as a machine: put in an allowed value, apply the rule, and get one result. For example, if a function doubles its input, then input 3 produces output 6, and input 5 produces output 10. The rule can be written as f(x) = 2x.
The defining condition is that every input in the function’s domain has exactly one output. Different inputs are allowed to produce the same output, but a single input cannot be assigned two different outputs by the same function. This is what separates a function from a general relationship, which may connect an input to several possible values.
Functions are used to describe changing quantities, patterns, and processes. A function might calculate the area of a square from its side length, convert a temperature from Celsius to Fahrenheit, or represent the distance a moving object has travelled after a given time. In each case, the input determines one output according to a rule.
What x Means in f(x)
The letter x is usually a variable used for an input. It is a placeholder: the function rule can be applied to many permitted values of x. In f(x) = x + 4, the function adds 4 to its input. Thus f(2) = 6 and f(10) = 14.
The notation f(x) is read as f of x. It does not mean f multiplied by x. The parentheses show that x is being supplied as the function’s input. The function could instead be named g, h, or another symbol: g(x) and f(x) are not automatically the same function.
In a formula such as y = f(x), x is commonly called the independent variable and y the dependent variable. The output depends on the input. The letter x is conventional, not mandatory: a function of time might use t, and a function of temperature might use T. A function itself can technically be named with many symbols, but f is a common name and x is commonly its input.
Inputs, Outputs, Domain, and Range
The domain is the set of inputs for which the function is defined. The range is the set of outputs the function actually produces from those inputs. For instance, consider f(x) = x² with domain all real numbers. Its outputs are never negative, so its range is the set of real numbers greater than or equal to zero.
Some rules require restrictions on their inputs. For g(x) = 1/x, zero cannot be in the domain because division by zero is undefined. For h(x) = √x in the real number system, negative inputs are not allowed, so the domain is x ≥ 0. When a problem states a domain, use it even if the formula could be considered over a broader set in another context.
It is helpful to distinguish the range from the codomain. The codomain is the stated set in which outputs are expected to lie; the range is the set of outputs that actually occur. A function can have a codomain larger than its range. These terms matter especially when studying whether a function is onto, or when defining an inverse.
How to Evaluate a Function
To evaluate a function at a particular input, replace each occurrence of its variable with that input, then simplify using the usual order of operations. Keep the function name and the input separate: f(3) asks for the output at 3, whereas f(x) leaves the input unspecified.
- Start with the rule, such as f(x) = 3x² − 2.
- For f(2), substitute 2 for every x: 3(2)² − 2.
- Apply the exponent first, then multiply and subtract: 3 × 4 − 2 = 10.
Therefore, f(2) = 10. Parentheses are useful when substituting a negative number. If f(x) = x², then f(−3) = (−3)² = 9, not −9. Squaring applies to the entire input, including its negative sign.
A function can also take more than one input. For example, A(l, w) = lw gives the area of a rectangle from its length and width. With length 5 and width 3, A(5, 3) = 15. The same principle applies: provide the inputs in the stated order and use the rule to calculate the output.
Functions in Tables and Graphs
A function can be shown in several forms. A table lists inputs alongside their outputs; a formula gives an algebraic rule; a graph plots input-output pairs; and a verbal description explains the relationship in words. For f(x) = x + 1, a table might pair 0 with 1, 2 with 3, and 4 with 5. Each pair is a point on the graph, with the input on the horizontal axis and output on the vertical axis.
For a graph to represent a function of x, each allowed horizontal coordinate must correspond to just one vertical coordinate. The vertical line test expresses this visually: if any vertical line crosses the graph more than once, the graph does not describe y as a function of x. A circle, for example, fails this test because some x-values have two y-values. A semicircle may pass, depending on which half is included.
Tables and graphs can reveal patterns that are not obvious from a formula. A table may show that outputs increase by a constant amount, suggesting a linear rule. A graph can show where a function rises, falls, reaches a maximum, or crosses an axis. Still, a limited table only shows selected values; it does not necessarily establish what happens for every input unless the rule or context supplies that information.
Common Kinds of Functions
Functions are classified by the shapes of their rules and the patterns they describe. Familiar examples include:
- Linear: f(x) = 2x + 1. Its graph is a straight line, and equal increases in the input create equal changes in the output.
- Quadratic: f(x) = x². Its graph is a parabola, and its outputs can change at a nonconstant rate.
- Absolute value: f(x) = |x|. This gives the distance of a real number from zero, so f(−4) = f(4) = 4.
- Exponential: f(x) = 2ˣ. The input appears in the exponent, producing repeated multiplicative growth as the input increases by one.
- Constant: f(x) = 7. Every allowed input produces the same output.
These examples illustrate different behaviors, but the definition of a function is broader than any particular formula type. A function can be defined by a formula, a lookup table, a computer procedure, or a real-world rule, as long as each permitted input receives exactly one output.
Function Notation Versus an Equation
Function notation names a rule and makes its input-output relationship explicit. An equation states that two expressions are equal. For example, f(x) = x² defines a function, while x² = 9 is an equation to solve. The latter has two real solutions, x = −3 and x = 3; it is not itself a function assigning one value of x to each side of the equation.
There is an important nuance: an equation involving x and y may or may not define y as a function of x. The equation y = x² does, because each real x gives one y. The equation x = y² does not define a single real yx, since both positive and negative square roots work. One can restrict the domain or choose a branch to make a function, but the restriction must be stated.
Common Misunderstandings
- Thinking f(x) means f times x: The parentheses indicate an input, not multiplication. Multiplication would usually be written with a multiplication symbol or adjacent factors in a context where that meaning is clear.
- Assuming every input must have a different output: A function may send multiple inputs to the same output. For example, x² sends both 2 and −2 to 4.
- Assuming a formula automatically accepts every number: Denominators, square roots, logarithms, and stated context can restrict the domain.
- Confusing the variable with a fixed number: In f(x) = 2x, x can vary. Once an input is selected, such as x = 4, the output is fixed for that evaluation.
Another useful distinction is between a function’s rule and its graph. A graph is a visual representation of input-output pairs, not the function’s definition in every setting. Some functions are easiest to define using discrete values or a procedure, and not every function has a simple continuous curve.
Frequently Asked Questions
What does f(x) mean in math?
It means the output of the function named f when its input is x. For example, if f(x) = x + 3, then f(2) = 5.
Is x the function or the input?
In the common notation f(x), f names the function and x represents its input. The letter can change; t, n, or another symbol may be used instead.
Does f(x) mean f multiplied by x?
No. In function notation, the parentheses show that the function receives an input. The expression is read as f of x, not f times x.
How can I tell if a relation is a function?
Check whether every input has exactly one output. For a graph of y as a function of x, use the vertical line test: no vertical line should intersect the graph more than once.
Can two x-values have the same function value?
Yes. A function only requires one output for each input; different inputs may share an output. For instance, with f(x) = x², both f(3) and f(−3) equal 9.
Related
- Split in Oracle SQL: Turn Delimited Text Into Rows
- Python join() Explained: Syntax, Examples, and Tips
- Split Sheet Set: Meaning, Sizes, and How to Choose
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Conditional Formatting Based on a FormulaYes. In Excel for Microsoft 365 on Windows, select the cells to format, then choose Home > Conditional…
- Excel Rank Formula for Scores: How to Rank ResultsTo rank scores in Microsoft Excel for Microsoft 365, use =RANK.EQ(B2,$B$2:$B$6,0) when the score to rank is in…
- Excel Filter by Bold Text: Methods That Actually WorkExcel’s standard filter cannot directly identify or filter rows by bold text. To filter them, add a helper…
- VLOOKUP in Excel: Step-by-Step GuideTo use VLOOKUP in Excel, put the value you want to find in the first column of a…
- Excel Sequence Number Shortcut: Fast Ways to Fill a SeriesExcel has no single dedicated shortcut key that automatically numbers a sequence. In Microsoft 365 for Windows, enter…
- How to Find Unique Names in an Excel Column EasilyIn Microsoft 365, you can create a live list of distinct names with the UNIQUE function. With names…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.