Functions and Function Notation
Quick Reference
| Field | Value |
|---|---|
| Textbook | OpenStax Precalculus 2e |
| Chapter | Ch 1: Functions |
| Section | 1.1 Functions and Function Notation |
| Subsection | 1.1 Functions and Function Notation |
| Pages | Page numbers pending faculty verification. |
| Course | MATH141 |
Try This First
π A short exploration before any formula (click to open)
A coffee shop charges a flat 2 dollars for a cup, plus 50 cents for each shot of espresso.
- Fill in the output for each input you choose:
| Shots of espresso (input) | Total cost in dollars (output) |
|---|---|
| 0 | ? |
| 1 | ? |
| 2 | ? |
| 3 | ? |
For any one number of shots, is there ever more than one possible total cost? Or does each input give back exactly one cost?
Now turn the table around. If a customer paid 3 dollars and 50 cents, how many shots did they order? Is that backward answer unique too?
Check your thinking
The costs are 2, 2.50, 3, and 3.50 dollars. Each shot count gives back exactly one total cost, so the rule βshots to costβ is a function. The backward direction (cost to shots) is also unique here, since no two shot counts share a price. That second property is special, and it has its own name later in this lesson: one-to-one.
A Function Is a Process
Think of a function as a process that takes an input and gives back exactly one output. The coffee rule above is a process: you hand it a number of shots, and it hands back one total cost. A vending machine works the same way. You press B4, and you get back one specific snack, every time, with no surprises.
The single most important word in the definition is exactly one. A function is not allowed to give back two different outputs for the same input. If you press B4 and sometimes get chips and sometimes get a candy bar, the machine is broken, and the rule is not a function.
A function does not have to be reversible, and the input and the output do not have to be numbers. The rule βeach student in a class maps to their birth monthβ is a function, because each student has exactly one birth month. The reverse rule βeach month maps to the students born in itβ is not a function, because one month can point back to several students.
Hold on to three connected ways of seeing the same function as you read on:
- A table lists inputs in one column and their single outputs in another.
- A graph plots each input on the horizontal axis against its output on the vertical axis.
- A rule such as $f(x) = 2 + 0.5x$ gives the output for any input by a formula.
The skill being built here is translating freely among these three. A test question may hand you any one of them and ask about another.
Prerequisite Hub
Builds on
| Skill | Why it matters here |
|---|---|
solving-equations-basic |
Evaluating $f(3)$ means substituting and simplifying; solving $f(x) = 7$ means undoing the rule. |
graphing-functions-basic |
Reading an output off a graph and running the vertical line test both rely on plotting points. |
Unlocks
| Skill | What it leads to |
|---|---|
m141-domain-and-range |
The set of allowed inputs and the set of resulting outputs. |
m141-rates-of-change |
How fast the output changes as the input changes. |
function-composition |
Feeding the output of one function into another. |
No cross-course prerequisites are required for this node.
The Official Definition
Function. A function is a relation in which each possible input value leads to exactly one output value.
Source: OpenStax Precalculus 2e, Section 1.1 Functions and Function Notation.
A relation is any pairing of inputs with outputs. The function condition is the extra requirement that no input is paired with two different outputs. An input may share its output with other inputs (two students can share a birth month), but a single input may never split into two outputs.
Function notation. The notation $y = f(x)$ defines a function named $f$. This is read as β$y$ is a function of $x$.β The letter $x$ represents the input value, or independent variable. The letter $y$, or $f(x)$, represents the output value, or dependent variable.
Source: OpenStax Precalculus 2e, Section 1.1 Functions and Function Notation.
Read $f(x)$ as β$f$ of $x$,β meaning the output that the process named $f$ produces from the input $x$. It does not mean $f$ times $x$. The name $f$ labels the whole rule, $x$ names the input slot, and $f(x)$ names the output that comes out.
One-to-one function. A one-to-one function is a function in which each output value corresponds to exactly one input value.
Source: OpenStax Precalculus 2e, Section 1.1 Functions and Function Notation.
A plain function forbids one input from giving two outputs. A one-to-one function adds a matching restriction in the other direction: no two inputs share an output. The birth-month rule is a function but is not one-to-one, because two students can land on the same month.
Two faces of the notation
| Symbol | Plain reading | Concrete example with $f(x) = 2 + 0.5x$ |
|---|---|---|
| $f$ | the name of the whole rule | the coffee pricing rule |
| $x$ | the input, or independent variable | the number of espresso shots |
| $f(x)$ or $y$ | the output, or dependent variable | the total cost in dollars |
| $f(3)$ | the output when the input is 3 | $2 + 0.5(3) = 3.50$ dollars |
Key Theorems
Vertical Line Test
A graph represents a function if and only if no vertical line intersects the graph more than once. If any vertical line intersects a graph more than once, the graph does not define a function.
Source: OpenStax Precalculus 2e, Section 1.1 Functions and Function Notation.
The reason traces straight back to the definition. A vertical line is the set of all points sharing one input value of $x$. If that line hits the graph twice, then one input $x$ has produced two outputs, which the definition forbids.
y
β β (two outputs share one input here)
β β±
β β±
β β <- a single vertical dashed line crosses twice
β β± β
β β± β
ββββββββββββββββ x
x = a
A graph that fails this test, like a full circle, pairs many inputs with two outputs and is therefore not a function.
Horizontal Line Test
If any horizontal line intersects the graph of a function more than once, then the graph does not represent a one-to-one function.
Source: OpenStax Precalculus 2e, Section 1.1 Functions and Function Notation.
A horizontal line is the set of all points sharing one output value of $y$. If that line meets the graph of a function twice, then two different inputs produced the same output, so the function is not one-to-one. The vertical test decides whether a graph is a function at all; the horizontal test decides whether a function is one-to-one.
| Test | Question it answers | Failure means |
|---|---|---|
| Vertical line test | Is this graph a function? | one input gives two outputs |
| Horizontal line test | Is this function one-to-one? | two inputs give one output |
Worked Examples
Example 1: Evaluating function notation
Let $f(x) = x^2 - 4x + 1$. Find $f(0)$, $f(3)$, and $f(-2)$.
Predict first. Before computing, notice that $f(0)$ just reads off the constant term, so a prediction of $1$ is reasonable. Predict whether $f(-2)$ will be larger than $f(3)$, since squaring a negative and subtracting a negative both push the output up.
Compute. Substitute each input into the rule.
$$f(0) = (0)^2 - 4(0) + 1 = 0 - 0 + 1 = 1$$
$$f(3) = (3)^2 - 4(3) + 1 = 9 - 12 + 1 = -2$$
$$f(-2) = (-2)^2 - 4(-2) + 1 = 4 + 8 + 1 = 13$$
Compare. The constant-term prediction held: $f(0) = 1$. And $f(-2) = 13$ is indeed larger than $f(3) = -2$, matching the prediction. Reading $f(-2)$ as β$f$ times $-2$β would have given $-2$ instead of $13$, so the notation really does mean βevaluate the rule at $-2$.β
Example 2: Solving for the input
Using the same $f(x) = x^2 - 4x + 1$, find every input $x$ for which $f(x) = 1$.
Predict first. One input is already known from Example 1: $f(0) = 1$. Predict whether there might be a second input that also gives $1$, since a squared rule often hits the same output twice.
Compute. Set the rule equal to the target output and solve.
$$x^2 - 4x + 1 = 1$$
$$x^2 - 4x = 0$$
$$x(x - 4) = 0$$
$$x = 0 \quad \text{or} \quad x = 4$$
Compare. There are two inputs, $x = 0$ and $x = 4$, both producing the output $1$. The prediction of a second input was correct. This also shows that $f$ is not one-to-one, since two inputs share one output. Notice the difference between the two examples: Example 1 fixed the input and found the output; Example 2 fixed the output and found the inputs.
Example 3: Reading a function from a table
A table records the price of a movie ticket by age group.
| Age group (input) | Ticket price in dollars (output) |
|---|---|
| Child | 8 |
| Adult | 14 |
| Senior | 9 |
Is price a function of age group? Is it one-to-one?
Predict first. Predict the answer by checking whether any single age group lists two prices, then whether any single price is shared by two age groups.
Reason. Each age group lists exactly one price, so price is a function of age group. No two age groups share a price (8, 14, and 9 are all different), so this function is also one-to-one. The horizontal line test idea applies in table form: a repeated output value would break one-to-one, and none repeats here.
Example 4: Applying the line tests to a graph
A graph plots the path $y^2 = x$, which is a sideways parabola opening to the right.
Reason. Choose the input $x = 4$. The points $(4, 2)$ and $(4, -2)$ both lie on the curve, because $2^2 = 4$ and $(-2)^2 = 4$. A single vertical line at $x = 4$ therefore crosses the curve twice. By the vertical line test, $y$ is not a function of $x$ on this graph. The one input $x = 4$ produced two outputs, $2$ and $-2$, which the definition of a function forbids.
Common Misconceptions
a function is an action you perform once, not a relationship between whole sets of inputs and outputs. Under the action view, a learner reads $f(x) = x^2 - 4x + 1$ only as a recipe for plugging in one number at a time, and stops there. The trouble appears in Example 2, where the question fixes the output and asks for the inputs. A learner stuck on the action view does not see that the same rule can be run backward, or that the whole collection of input-output pairs is the object of study. Seeing a function as a process linking entire sets, not a single calculation, is what makes the backward question and the line tests make sense.
$f(x)$ means $f$ multiplied by $x$. The parentheses in $f(x)$ mark an input slot, not a product. With $f(x) = x^2 - 4x + 1$, treating $f(-2)$ as a product gives the wrong answer of $-2$, while evaluating the rule gives $13$. Test the reading on a known case: $f(0)$ should give the constant term $1$, and it does, which the multiplication reading cannot explain. The same parentheses that look like multiplication are doing the opposite job: they name where the input goes.
the input and the output can be swapped freely. The statement $y = f(x)$ assigns fixed roles. The independent variable $x$ is the input you choose, and the dependent variable $y$ is the output that results. Swapping them changes the question entirely. In Example 1 the input was fixed and the output was found; in Example 2 the output was fixed and the inputs were found. Reading $f(3) = -2$ as β$3$ is the outputβ reverses the roles and leads to solving the wrong equation.
Practice Problems
Let $g(x) = 3x - 5$. Find $g(2)$ and $g(-1)$.
A relation pairs inputs with outputs as shown. Is the output a function of the input? Explain using the definition.
| Input | Output |
|---|---|
| 1 | 5 |
| 2 | 7 |
| 1 | 9 |
Let $h(x) = 2x^2 - 8$. Find every input $x$ for which $h(x) = 0$.
A graph is a full circle of radius $5$ centered at the origin, with equation $x^2 + y^2 = 25$. Two questions: does the vertical line test pass, and is the relation one-to-one?
A function $T$ maps each day of the year to the recorded high temperature at one weather station. Explain why $T$ is a function, then explain why $T$ is almost certainly not one-to-one. How would you convince a classmate?
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Connections
Looking back:
solving-equations-basicsupplies the algebra used to evaluate $f(3)$ and to solve $f(x) = c$.graphing-functions-basicsupplies the point-plotting behind both line tests.
Looking ahead:
m141-domain-and-rangestudies which inputs are allowed and which outputs result.m141-rates-of-changestudies how the output changes as the input changes.function-compositionfeeds the output of one function into the input of another.
Real-world connections:
- A pricing rule maps quantity purchased to total cost.
- A conversion rule maps a temperature in Celsius to its value in Fahrenheit.
- A timetable maps each scheduled time to the single event at that time.
Resources
| Resource | Link |
|---|---|
| OpenStax Precalculus 2e 1.1 Functions and Function Notation | https://openstax.org/books/precalculus-2e/pages/1-1-functions-and-function-notation |
| OpenStax Precalculus 2e Ch 1 Introduction to Functions | https://openstax.org/books/precalculus-2e/pages/1-introduction-to-functions |
| OpenStax Precalculus 2e Ch 1 Key Concepts | https://openstax.org/books/precalculus-2e/pages/1-key-concepts |
Textbook section: OpenStax Precalculus 2e, Ch 1: Functions, Section 1.1 Functions and Function Notation.
| Previous | Up | Next |
|---|---|---|
| Skills Index | Skills Index | Domain and Range |
Last updated: 2026-06-16