Algebra 1
Unit 4 · Lesson 4.2

Function notation f(x), domain & range

A function is a pairing, as the last lesson showed, and a formula is one neat way to spell out that pairing. Now you need a compact way to write "the output of this rule at this input." That's what f(x) notation does, and once it's comfortable, it stops getting in the way. Every later unit writes lines and curves this way.

Start with something homier than symbols: a recipe. Suppose the recipe is triple it, then subtract one. Give the recipe a short name, f. Then "run the number 2 through recipe f" means triple the 2 to get 6, subtract 1, and land on 5. Written in the new notation, that whole sentence is f(2) = 5. The letter f names the recipe; the number tucked inside the parentheses is what you dropped into the bowl.

Here's the one thing to nail down right away, because the parentheses are doing something unusual. In f(2), the parentheses do not mean multiply. They mean feed this in. So f(2) is not f times 2. It's "the output of recipe f when you put in 2." Read it out loud as "f of 2," and that misreading mostly takes care of itself.

You can picture the same thing as a little machine with a readout. A number goes in the top, the rule runs inside, and the answer lights up on the display: drop in 2, and f(2) = 5 shows on the screen. That picture also gives you two words you'll need. Every input the machine is willing to accept is its domain. Every output that can ever light up on the display is its range.

A machine with an in-tray of allowed inputs and an out-tray of produced outputs.

Now to the symbols themselves. The habit that will save you again and again is to write the input inside parentheses when you substitute, like this: $$f(2) = 3(2) - 1 = 6 - 1 = 5$$ Notice it's written in full: 3(2) − 1, then 6 − 1, then 5, not jumped straight to the answer. Those parentheses look fussy on a friendly number like 2, but they're what keeps the sign honest the moment a negative shows up, and they let you feed in something bigger than a number.

You can drop a whole expression into the recipe: with the same f, f(a + 1) = 3(a + 1) − 1 = 3a + 3 − 1 = 3a + 2. Whatever sits in the parentheses goes everywhere x used to be.

For domain and range, stay concrete and you won't go wrong. When a function is given as a table or a list, the domain is simply the input column, and the range is the output column with any repeats listed once. When it's a line like f(x) = 3x − 1, any real number is a fair input and any real number can come back out, so the domain and the range are both all real numbers.

New words

  • 4.2.d1 Rule: a formula that gives a function's pairing, like f(x)=3x−1. A rule is one way to specify a function (the way that comes with a computation); a table or a pair-list is another. So "rule" here means the formula, not the definition of "function" from 4.1.
  • 4.2.d2 Function notation f(x): a name for a rule (f) together with what you fed it (x). Read "f of x." It is not "f times x."
  • 4.2.d3 Evaluate: substitute a value for the input and compute. f(2) means "run 2 through the rule f."
  • 4.2.d4 Independent / dependent variable: the input x is the independent variable (you pick it freely); the output f(x) is the dependent variable (its value depends on x). On a graph, the input goes on the horizontal axis and the output on the vertical.
  • 4.2.d5 Domain: the set of allowed inputs.
  • 4.2.d6 Range: the set of outputs you actually get.
  • 4.2.d7 Discrete domain: the inputs are separate values (a finite list, or counting numbers like 0,1,2,3,…). You plot them as separate dots and you list them in braces, e.g. \(\{1,2,3,4\}\). Don't connect the dots.
  • 4.2.d8 Continuous domain: the inputs are every real number across a range (no gaps). The graph is an unbroken line or curve, so you describe it in words (e.g. "all real numbers") rather than listing them.

Read these one line at a time, and ask why each line follows from the one before. The substitution-with-parentheses habit is the thing to watch for.

Worked example

4.2.w1 Example 1: f(x)=3x-1 at several inputs. $$f(2)=3(2)-1=6-1=5,\quad f(0)=3(0)-1=-1,\quad f(-2)=3(-2)-1=-6-1=-7.$$ Look at the parentheses around the −2. Writing 3(−2) keeps the sign attached, so it becomes −6 and the answer lands on −7. That's the payoff for the fussy parentheses on the easy cases.

4.2.w2 Example 2: "not multiplication." Suppose f(2) gets read as f·2, as if f were a number to multiply by. There is no number f here; f is just the name of the recipe, and f(2) means the recipe's output at 2. Run it properly: 3(2) − 1 = 5. Reading it aloud as "f of 2" is the quickest cure.

4.2.w3 Example 3: g(x)=x²+1. $$g(3)=3^2+1=9+1=10,\quad g(0)=0+1=1,\quad g(-2)=(-2)^2+1=4+1=5.$$ The one to slow down on is g(−2). The parentheses around −2 mean you square the whole input: (−2)² is (−2)(−2) = +4, not −4. So g(−2) comes out to 5.

4.2.w4 Example 4: evaluate at an expression. With f(x)=3x-1: $$f(2a)=3(2a)-1=6a-1.$$ Whatever sits in the parentheses goes everywhere x was. Here 2a takes x's place, so 3(2a) is 6a.

4.2.w5 Example 5: domain & range from a table. For

x 1 2 3 4
f(x) 5 5 7 9

the Domain is the input row, \(\{1,2,3,4\}\). The Range is the outputs with repeats listed once: \(\{5,7,9\}\). The output 5 happens at both x=1 and x=2, but you write it a single time, because the range is just the set of values that come out.

4.2.w6 Example 6: discrete vs. continuous domain (why braces for one, "all reals" for the other). This is the difference between Example 5's table and the line f(x)=3x−1.

  • A table or pair-list gives a discrete domain: a handful of separate inputs. You plot them as separate dots and list them in braces. Concrete case: tickets cost $12 each, so the cost of n tickets is t(n)=12n. You can buy 0, 1, 2, 3, … tickets but never 2.5, so the domain is the separate whole numbers {0,1,2,3,…}: separate dots, don't connect them.
  • A line like f(x)=3x−1 accepts every real number in between, with no gaps, so its domain is continuous: an unbroken line, described in words as "all real numbers." Concrete case: a candle's height after t hours, for any t from 0 to 5; time can be 2.5 hours or 2.501 hours, so the inputs fill the whole range and the graph is an unbroken curve.

So the form of the answer follows the domain: a discrete domain → list in braces {…}; a continuous domain → say "all real numbers" (or "all real numbers from 0 to 5"). The one-line check: can the input land between two of your values? If no (tickets), it's discrete dots; if yes (hours), it's a continuous line. (No interval notation yet. That's later; words are enough here.)

After all that, here's a clean one to get the rhythm back before the practice mixes things up. With f(x) = 3x − 1, find f(1): substitute to get 3(1) − 1 = 3 − 1 = 2. One input, one substitution, done. That's the move underneath every evaluation in this lesson.

With a few clean evaluations behind you, look at the trickiest spot. When a negative goes into a squared term, the parentheses are everything. Reading g(−2) without them invites −2², which a lot of people would compute as −4, squaring the 2 and leaving the minus outside. But the input is the whole −2, so it's (−2)², and a negative times a negative is positive: +4. If you write the parentheses every time you substitute, this slip mostly can't happen. Substitute, then compute, in that order.

Check yourself

  1. 4.2.c1 With h(x)=2x+1, find h(-3), and say each step out loud. (h(−3) = 2(−3) + 1 = −6 + 1 = −5. The parentheses keep the −3 intact, so 2(−3) is −6.)
  2. 4.2.c2 Someone reads f(5) as "f times 5." In one sentence, what's wrong? (f isn't a number, so nothing is being multiplied; f names the rule, and f(5) means the rule's output when you feed in 5.)
  3. 4.2.c3 Give the domain and range of \(\{(0,2),(1,2),(2,8)\}\), and explain why 2 is written once in the range. (Domain \(\{0,1,2\}\); range \(\{2,8\}\). The output 2 comes up at two inputs, but the range is a set of values, so each value is listed once.)

The problems below jump between evaluating and reading domain and range, which takes a little more effort than a single drill. Answers are at the end of the lesson. When one stalls you, the worked example it's built on is the place to look.

Practice

A. Evaluate f(x)=3x-1.

4.2.1 f(2)
Reveal answerHide to problem 1f(2)=5
4.2.2 f(0)
Reveal answerHide to problem 2f(0)=-1
4.2.3 f(-2)
Reveal answerHide to problem 3f(-2)=-7
4.2.4 f(5)
Reveal answerHide to problem 4f(5)=14
4.2.5 f(-1)
Reveal answerHide to problem 5f(-1)=-4

B. Evaluate g(x)=x²+1.

4.2.6 g(3)
Reveal answerHide to problem 6g(3)=10
4.2.7 g(0)
Reveal answerHide to problem 7g(0)=1
4.2.8 g(-2)
Reveal answerHide to problem 8g(-2)=5
4.2.9 g(1)
Reveal answerHide to problem 9g(1)=2

C. Evaluate (mixed rules).

4.2.10 q(x)=5-2x: find q(4)
Reveal answerHide to problem 10q(4)=5-8=-3
4.2.11 r(x)=x²-3: find r(-3)
Reveal answerHide to problem 11r(-3)=9-3=6
4.2.12 p(x)=4x+2: find p(-1)
Reveal answerHide to problem 12p(-1)=-4+2=-2

D. Domain & range (from the explicit data).

4.2.13 State domain and range of \(\{(1,3),(2,6),(3,9)\}\).
Reveal answerHide to problem 13Domain \(\{1,2,3\}\), Range \(\{3,6,9\}\).
4.2.14 State domain and range of \(\{(-2,4),(-1,1),(0,0),(1,1)\}\).
Reveal answerHide to problem 14Domain \(\{-2,-1,0,1\}\), Range \(\{0,1,4\}\) (output 1 listed once).
4.2.15 State the domain and range of the line f(x)=3x-1.
Reveal answerHide to problem 15Domain: all real numbers; Range: all real numbers.

E. Discrete or continuous domain? (say which, and why)

4.2.16 A pizza costs $8; p(n)=8n gives the cost of n whole pizzas.
Reveal answerHide to problem 16Discrete — you can only buy a whole number of pizzas (0,1,2,…), never 2.5, so the inputs are separate dots.
4.2.17 A car's distance d(t) after t hours, for any t from 0 to 4.
Reveal answerHide to problem 17Continuous — time can be any real number from 0 to 4 (2.5 hours is fine), so the inputs fill the range and the graph is an unbroken curve.
4.2.18 The line f(x)=3x-1.
Reveal answerHide to problem 18Continuous — a line accepts every real number with no gaps, so its domain is an unbroken line.