← MATH 141 MathScape 0 MATH141

Functions and Function Notation

13 min read

Jump to a section

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.

  1. Fill in the output for each input you choose:
Shots of espresso (input) Total cost in dollars (output)
0 ?
1 ?
2 ?
3 ?
  1. For any one number of shots, is there ever more than one possible total cost? Or does each input give back exactly one cost?

  2. 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:

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

Common misconception

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.

Common misconception

$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.

Common misconception

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

Level 1 Evaluate the notation

Let $g(x) = 3x - 5$. Find $g(2)$ and $g(-1)$.

Show Answer

$$g(2) = 3(2) - 5 = 6 - 5 = 1$$

$$g(-1) = 3(-1) - 5 = -3 - 5 = -8$$

So $g(2) = 1$ and $g(-1) = -8$.

Level 2 Function or not, from a table

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
Predict, then Show Answer

Predict: scan for any input that appears twice with different outputs.

Answer: the input $1$ appears twice, paired once with $5$ and once with $9$. One input leads to two different outputs, so the output is not a function of the input.

Level 3 Solve for the input

Let $h(x) = 2x^2 - 8$. Find every input $x$ for which $h(x) = 0$.

Predict, then Show Answer

Predict: a squared rule set to a value often has two inputs, one positive and one negative.

Compute:

$$2x^2 - 8 = 0$$

$$2x^2 = 8$$

$$x^2 = 4$$

$$x = 2 \quad \text{or} \quad x = -2$$

Compare: two inputs, $x = 2$ and $x = -2$, both give the output $0$. The prediction held, and this shows $h$ is not one-to-one.

Level 4 Apply the line tests

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?

Predict, then Show Answer

Predict: a circle stacks two points above many inputs, so expect the vertical test to fail.

Answer: at the input $x = 0$, the points $(0, 5)$ and $(0, -5)$ both lie on the circle. A vertical line at $x = 0$ crosses the graph twice, so the vertical line test fails, and $y$ is not a function of $x$. Because the relation is not even a function, the one-to-one question does not apply: the horizontal line test is only used on graphs that already pass the vertical line test.

Level 5 Reason about 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?

Thought Process

Check the function condition first: does each input (a day) give exactly one output (a high temperature)? Then check the one-to-one condition: can two different days share the same high temperature?

Show Answer

Why it is a function: each day has exactly one recorded high temperature at the station, so every input leads to exactly one output. That meets the definition of a function.

Why it is not one-to-one: across a full year, many days will share the same high temperature. For instance, two separate spring days could both record a high of $68$ degrees. Two different inputs then map to the same output, which is exactly what one-to-one forbids.

How to convince a classmate: point at the horizontal line test in graph form. Draw a rough temperature graph across the year and slide a horizontal line at $68$ degrees. It will cross the curve at more than one day, and each crossing is a different input with the same output. One horizontal line crossing twice is a complete proof that the function is not one-to-one.

Another way to see this: a year has many more days than there are distinct whole-degree temperatures in a typical climate, so by counting alone some temperature value must repeat across days.


Mastery Checklist

Novice (Level 1-2):

Competent (Level 3-4):

Proficient (Level 5):


Connections

Looking back:

Looking ahead:

Real-world connections:


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.



Last updated: 2026-06-16