Algebra 1

Functions, function notation, domain and range

A function is a rule that gives exactly one output for each input. In function notation, f(x)f(x) means the output of the function f when the input is x, so f(3)f(3) means "put 3 in for x." The domain is every input you are allowed to use, and the range is every output you can get. A graph is a function if no vertical line crosses it twice.

Updated

The key idea

Think of a function as a machine. You drop in an input, it follows its rule, and one output comes out. The name of the machine is f, and f(x)f(x) is read "f of x." It does not mean f times x.

f(x)=2x2−3⟹f(−2)=2(−2)2−3=5f(x) = 2x^2 - 3 \quad\Longrightarrow\quad f(-2) = 2(-2)^2 - 3 = 5
The words you need
WordMeaningExample for f(x)=xf(x) = \sqrt{x}
inputthe x value you put in9
outputthe value that comes out, f(x)f(x) or yf(9)=3f(9) = 3
domainall allowed inputsx≥0x \ge 0, because you cannot take the square root of a negative number
rangeall possible outputsy≥0y \ge 0, because a square root is never negative

In Algebra 1, two things shrink a domain: you cannot divide by zero, and you cannot take the square root of a negative number. If neither shows up, the domain is all real numbers. In a word problem, the situation can limit it too, like not having a negative number of tickets.

Worked examples

Example 1: evaluate a function

Problem If f(x)=x2−4x+1f(x) = x^2 - 4x + 1, find f(−3)f(-3).

  1. Replace every x with (−3)(-3), in parentheses. Then follow the order of operations.
    (−3)2−4(−3)+1=9+12+1=22(-3)^2 - 4(-3) + 1 = 9 + 12 + 1 = 22
  2. The parentheses matter: (−3)2=9(-3)^2 = 9, while −32-3^2 would mean −(32)=−9-(3^2) = -9.

Answer f(−3)=22f(-3) = 22

Example 2: find the input that gives an output

Problem If g(x)=3x−7g(x) = 3x - 7, for what value of x is g(x)=11g(x) = 11?

  1. This time the output is given. Set the rule equal to 11.
    3x−7=113x - 7 = 11
  2. Add 7.
    3x=183x = 18
  3. Divide by 3.
    x=6x = 6
  4. Check: g(6)=18−7=11g(6) = 18 - 7 = 11.

Answer x=6x = 6

Example 3: domain and range from an equation

Problem Find the domain and range of h(x)=x−5h(x) = \sqrt{x - 5}.

  1. The expression under the square root cannot be negative.
    x−5≥0x - 5 \ge 0
  2. Add 5. That is the domain.
    x≥5x \ge 5
  3. The smallest output is h(5)=0=0h(5) = \sqrt{0} = 0. As x grows, the square root grows without limit, and it is never negative. So the range is y≥0y \ge 0.

Answer Domain: x≥5x \ge 5. Range: y≥0y \ge 0.

Example 4 (test-hard): an expression as the input

Problem If f(x)=x2+2xf(x) = x^2 + 2x, find and simplify f(t−1)f(t - 1).

  1. Replace every x with (t−1)(t - 1), then expand and combine like terms.
    (t−1)2+2(t−1)=t2−2t+1+2t−2=t2−1(t - 1)^2 + 2(t - 1) = t^2 - 2t + 1 + 2t - 2 = t^2 - 1
  2. Check with a number. If t=3t = 3, then f(2)=4+4=8f(2) = 4 + 4 = 8, and 32−1=83^2 - 1 = 8. They agree.

Answer f(t−1)=t2−1f(t - 1) = t^2 - 1

Common mistakes

  • Reading f(x) as multiplication. f(3)f(3) is the output when the input is 3. It is not f⋅3f \cdot 3.
  • Leaving out parentheses for a negative input. f(−3)f(-3) for x2x^2 is (−3)2=9(-3)^2 = 9. Typing −32-3^2 into a calculator gives −9-9.
  • Mixing up f(3) and f(x) = 3. The first gives you the input and asks for the output. The second gives you the output and asks for the input.
  • Calling the x values the range. Domain is inputs (x). Range is outputs (y).
  • Thinking a repeated output breaks the rule. {(1,2),(2,2)}\{(1, 2), (2, 2)\} is a function. Only a repeated input with two different outputs, like (0,5)(0, 5) and (0,7)(0, 7), is not.

Quick methods

Practice

5 practice questions

  1. If f(x)=5−2xf(x) = 5 - 2x, what is f(−4)f(-4)?

    1. −3-3
    2. 1313
    3. −13-13
    4. 2222
    Show answer

    Answer: 1313

    f(−4)=5−2(−4)=5+8=13f(-4) = 5 - 2(-4) = 5 + 8 = 13. The answer −3-3 comes from using 4 instead of −4-4.

  2. Which set of ordered pairs is NOT a function?

    1. {(1,2),(2,2),(3,2)}\{(1, 2), (2, 2), (3, 2)\}
    2. {(0,5),(1,6),(0,7)}\{(0, 5), (1, 6), (0, 7)\}
    3. {(−1,1),(1,1),(2,4)}\{(-1, 1), (1, 1), (2, 4)\}
    4. {(4,0),(5,1),(6,2)}\{(4, 0), (5, 1), (6, 2)\}
    Show answer

    Answer: {(0,5),(1,6),(0,7)}\{(0, 5), (1, 6), (0, 7)\}

    The input 0 gives two different outputs, 5 and 7, so it breaks the one-output rule. The other sets repeat some outputs, which is allowed.

  3. What is the domain of g(x)=1x−3g(x) = \frac{1}{x - 3}?

    1. all real numbers
    2. all real numbers except 3
    3. all real numbers except −3-3
    4. x>3x > 3
    Show answer

    Answer: all real numbers except 3

    The denominator is 0 when x=3x = 3, and you cannot divide by zero. Every other number works, including numbers less than 3, so x>3x > 3 is too strict.

  4. If f(x)=x2−3xf(x) = x^2 - 3x, which value of x makes f(x)=10f(x) = 10?

    1. 22
    2. 55
    3. 1010
    4. 7070
    Show answer

    Answer: 55

    Test it: f(5)=25−15=10f(5) = 25 - 15 = 10. The trap answer 70 is f(10)f(10): it treats 10 as the input instead of the output. (The equation also has a second solution, x=−2x = -2, which is not listed.)

  5. What is the range of h(x)=x2+1h(x) = x^2 + 1?

    1. all real numbers
    2. y≥0y \ge 0
    3. y≥1y \ge 1
    4. y>1y > 1
    Show answer

    Answer: y≥1y \ge 1

    x2x^2 is never negative, so the smallest output is 0+1=10 + 1 = 1, reached at x=0x = 0. Every larger value is reached too. y>1y > 1 wrongly leaves out 1 itself.

Frequently asked questions

What does f(x) mean?

It means "the output of the function f when the input is x." The letter f names the function, and whatever is in the parentheses is the input. So f(4)f(4) is the output when you put in 4. It is a label, not multiplication.

How do I find the domain of a function?

Start with all real numbers, then remove anything that breaks a rule. Remove inputs that make a denominator zero. Keep only inputs that make the expression under a square root zero or positive. In a word problem, also remove values that make no sense, like negative times.

What is the difference between domain and range?

The domain is the set of inputs, the x values. The range is the set of outputs, the y values. A memory trick: d comes before r in the alphabet, just as x comes before y in the pair (x,y)(x, y).

How do I know if a graph is a function?

Use the vertical line test. If any vertical line touches the graph more than once, some input has two outputs, so it is not a function. If every vertical line touches it at most once, it is a function.

Try asking Ducky

  • “What does f(x) = 10 mean compared to f(10)?”
  • “Find the domain and range of the graph on my screen with me.”
  • “I put -3 into x squared and got -9. Why is that wrong?”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.