Functions and Function Notation

Learning goals

  • Decide whether a relation gives exactly one output for each allowed input
  • Evaluate and interpret functions described by words, tables, graphs, and formulas
  • Select the correct branch when evaluating a piecewise function
  • Calculate average rates of change and explain their signs and units
  • Distinguish an interval's average rate from what happens inside that interval

What makes a relationship a function?

Suppose one taxi charges 44 dollars plus 22 dollars per kilometer, with no other charges. For a trip of 33 kilometers, the fare is 4+2(3)=104+2(3)=10 dollars. That distance cannot give a second fare under the same rule.

A function assigns exactly one output to each allowed input. The domain is the set of allowed inputs; the range is the set of outputs actually produced. For the taxi model, the input is a nonnegative distance and the output is its fare. A relation is a collection of input-output pairings; some relations satisfy the function requirement and some do not.

If a record instead pairs distance 33 with both 1010 dollars and 1313 dollars, fare is not a function of distance alone in that record. There may be a missing detail, such as the company. A disagreement with the function requirement does not make the observations impossible; it tells us the chosen input is insufficient.

Different inputs may share an output. The left diagram below still defines a function because each input has one outgoing arrow. The right one fails because input 11 has two different outputs.

Follow the arrows from each inputThe left mapping assigns inputs 1, 2, and 3 to outputs 5, 5, and 8. The right mapping assigns input 1 to outputs 5 and 8, and input 2 to output 5.One output per inputTwo outputs for input 1InputOutputInputOutput123581258
Repeated outputs are allowed; two different outputs for one input are not.

Check your understanding

Which collection, read with the first coordinate as input, defines a function?

Answer choices

One relationship, several representations

Function notation names a function and the input being used. Write the taxi rule as

C(d)=4+2d.C(d)=4+2d.

Read C(d)C(d) as “C of d”: the fare when the distance is dd. It does not mean CC multiplied by dd. Here dd is the independent quantity, the input selected for the model. The fare C(d)C(d) is the dependent quantity, whose value the rule determines. This language describes the model’s roles, not a claim that one quantity always causes another in the real world.

The words, formula, table, and graph below describe the same pricing rule. The table records a few values; the formula also determines values between them.

Distance dd (kilometers)Fare C(d)C(d) (dollars)
0044
1166
2288
441212
The same fare rule in a graphA taxi fare graph shows C equals 4 plus 2d for distances from 0 through 4 kilometers. Points are marked at (0,4), (1,6), (2,8), and (4,12). The distance axis is in kilometers and the fare axis in dollars.1234524681012140d (km)C (dollars)
The marked points match the table. The drawn segment shows the rule from zero through four kilometers; the model also applies to longer trips.

On the graph, input 22 lies on the horizontal axis. Move vertically to the graph, then horizontally to the fare axis to read output 88. The point (2,8)(2,8) says C(2)=8C(2)=8.

A formula justifies the segment between the table entries here. A few table entries alone do not establish what happens between them. If the table is all you know, use only the information it gives.

Worked example 1 An output question and an input question

Problem. A taxi uses C(d)=4+2dC(d)=4+2d dollars for a trip of dd kilometers, where d≥0d\ge0.

Part A: Find C(6)C(6).

Part B: Find the distance of a trip whose fare is 2222 dollars.

Part C: Explain the difference between the two questions.

Solution. Part A: To find C(6)C(6), the input is already known. Substitute 66 for dd:

C(6)=4+2(6)=16.C(6)=4+2(6)=16.

The fare for six kilometers is 1616 dollars.

Part B: For the second question, the output is known and the input is unknown. Solve

4+2d=22.4+2d=22.

Subtract 44, then divide by 22:

2d=18,d=9.2d=18,\qquad d=9.

The trip is nine kilometers, an allowed input.

Part C: Evaluating C(6)C(6) and solving C(d)=22C(d)=22 run through the relationship in different directions.

The same substitution works when the input is an expression. For f(x)=x2+4f(x)=x^2+4, input a+1a+1 gives f(a+1)=(a+1)2+4f(a+1)=(a+1)^2+4. Replace the entire input; adding 11 to f(a)f(a) would change the output instead.

Check your understanding

A table lists f(−2)=7f(-2)=7, f(1)=5f(1)=5, and f(4)=7f(4)=7. What can you conclude from these entries?

Answer choices

Reading a graph as a function

A graph uses horizontal position for the input and vertical position for the output. In the next relation, input 33 reaches heights 11 and 55. That one conflict is enough to show the relation is not a function of xx.

A single input can reveal a conflictThe relation consists of points (1,2), (3,1), and (3,5). A dashed vertical line through input 3 crosses two of the points.123451234560xy
A single input can reveal a conflict

This gives the vertical-line test: a graph represents yy as a function of xx exactly when every vertical line meets it at most once. A vertical line keeps the input fixed, so two intersection points would assign two outputs to one input. A line that misses the graph simply passes through an input outside the domain.

A horizontal graph passes this test. Many inputs can have the same output, and a vertical line still meets that graph only once. A vertical graph fails because one input has many outputs.

Choosing a piecewise rule

A single function can use different formulas for different inputs. The condition beside a formula tells you when to use it.

Consider the piecewise function

p(x)={x+3,x<2,2x+3,x≥2.p(x)=\begin{cases} x+3,&x<2,\\ 2x+3,&x\ge2. \end{cases}

For input 11, use the first branch because 1<21<2, giving p(1)=4p(1)=4. For input 33, use the second branch because 3≥23\ge2, giving p(3)=9p(3)=9. Choose the branch using the input, before calculating its output.

Worked example 2 Include the boundary exactly once

Problem. The function pp is defined by

p(x)={x+3,x<2,2x+3,x≥2.p(x)=\begin{cases} x+3,&x<2,\\ 2x+3,&x\ge2. \end{cases}

Case A: Find p(−4)p(-4).

Case B: Find p(2)p(2).

Case C: Find every input for which p(x)=7p(x)=7.

Solution. Case A: Since −4<2-4<2, use x+3x+3:

p(−4)=−4+3=−1.p(-4)=-4+3=-1.

Case B: Since 2≥22\ge2, use 2x+32x+3:

p(2)=2(2)+3=7.p(2)=2(2)+3=7.

Use the condition that includes the inputThe window shows inputs from negative 2 through 4 and outputs from 0 through 10. The branch y=x+3 for x less than 2 has an open point at (2,5). The branch y=2x+3 for x at least 2 has a filled point at (2,7) and reaches the top of the window at (3.5,10). Both branches continue beyond the window.-2-112342468100xyp(2)=7
The open point at (2,5) is excluded; the filled point at (2,7) gives p(2)=7. Both branches continue beyond the plotted window.

Case C: In the first branch, x+3=7x+3=7 gives x=4x=4. But 4<24<2 is false, so this candidate is not valid for that branch.

In the second branch, 2x+3=72x+3=7 gives x=2x=2. This satisfies x≥2x\ge2, so the only input is 22.

For every declared input, a piecewise rule must assign one output. A gap between the conditions leaves an input undefined. Overlapping conditions that give different outputs create a conflict. We usually write disjoint conditions, as above, to make the choice clear.

Check your understanding

A function uses q(x)=9−xq(x)=9-x for x<4x<4 and q(x)=2xq(x)=2x for x≥4x\ge4. What is q(4)q(4)?

Answer choices

Measuring change over an interval

Function values answer “how much?” A rate compares the change in output with the change in input.

For the taxi, the fare rises from 88 to 1212 dollars as distance rises from 22 to 44 kilometers. The change is 44 dollars over 22 kilometers, or 22 dollars per kilometer. Subtract before dividing; the ratio 12/412/4 includes the booking fee and answers a different question.

The average rate of change from input aa to a different input bb is

f(b)−f(a)b−a.\frac{f(b)-f(a)}{b-a}.

The numerator is output change and the denominator is input change. Use the same order in both. Its units are output units per input unit. On a graph, this ratio is the slope of the secant line, the straight line through the two endpoint points. It summarizes the change between those endpoints, even if the graph between them is curved.

Worked example 3 Read the rate and its units

Problem. A marked point has height h(t)=t2+1h(t)=t^2+1 centimeters at time tt seconds, for 0≤t≤40\le t\le4.

Part A: Find its average rate of height change from one second to four seconds.

Part B: Interpret the result.

Part C: Find the rate from one second to two seconds and compare the two rates.

Solution. Part A: First calculate the endpoint heights:

h(1)=2,h(4)=17.h(1)=2,\qquad h(4)=17.

The height increases by 1515 centimeters over 33 seconds:

17−24−1=5.\frac{17-2}{4-1}=5.

The average rate is 55 centimeters per second.

Part B: This is the rate a constant increase would need to produce the same total height change over those three seconds.

Part C: For the shorter interval, h(2)=5h(2)=5, so

5−22−1=3.\frac{5-2}{2-1}=3.

That average rate is 33 centimeters per second. The two rates differ, so the height is not changing at a constant rate throughout the full interval.

An average rate compares two endpointsThe graph of h(t)=t squared plus 1 is shown for times from 0 through 4 seconds. A dashed secant joins (1,2) to (4,17). A horizontal guide spans 3 seconds and a vertical guide spans 15 centimeters.123454812160t (s)h (cm)3 s15 cm
An average rate compares two endpoints

When the later output is lower, the rate is negative. A container whose water volume drops from 3030 to 1818 liters between minutes 22 and 66 has average rate (18−30)/(6−2)=−3(18-30)/(6-2)=-3 liters per minute. The sign describes a net decrease; it is not a negative amount of water.

Check your understanding

A measured quantity falls from 4646 grams at t=3t=3 minutes to 2626 grams at t=8t=8 minutes. What is its average rate of change?

Answer choices

What an average does not tell you

Two endpoints can match even when the function changes in between.

Worked example 4 Zero net change does not mean no change

Problem. A function rr has values r(0)=6r(0)=6, r(2)=10r(2)=10, and r(5)=6r(5)=6.

Part A: Find the average rate from input 00 to input 55.

Part B: Decide whether these data show a constant function on that interval.

Solution. Part A: The beginning and ending outputs are equal:

r(5)−r(0)5−0=6−65=0.\frac{r(5)-r(0)}{5-0}=\frac{6-6}{5}=0.

The average rate is zero.

Part B: The middle value is 1010, which differs from 66, so the function is not constant. The overall average describes the net change, not every change inside the interval.

Likewise, a table can show equal average rates on several intervals without establishing a constant rate between all its entries. A stated linear rule justifies that stronger conclusion; a finite list of measurements does not by itself.

Check your understanding

A function has f(1)=9f(1)=9 and f(7)=9f(7)=9. Which statement must be true?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

The familiar parentheses in f(x)f(x) were once a new idea. In work dated 1734, the Swiss mathematician Leonhard Euler used a letter with a parenthesized argument to denote an unspecified function. His paper appeared in print in 1740. The notation let him refer to a relationship without first spelling out a particular formula for it.

The form was not inevitable. Leibniz had used a mark above the inputs, and Euler later tried placing a colon between a function’s letter and its inputs. The familiar parentheses endured, while the modern language of a mapping between sets developed much later. A notation could remain useful even as mathematicians changed what they allowed it to describe.

Sources: MacTutor’s history of function symbols and a discussion of Euler’s original notation.

Your progress

See all your progress →