30% off your first 3 months

Get the deal

Functions and f(x) notation

A function is a rule that turns each input into exactly one output.

Guide 7 of 12
A function machine. The input 3 goes in on the left, the box holds the rule 2x plus 1, and the output 7 comes out on the right, circled.inputoutput
f(x) = 2x + 1. Put 3 in and 7 comes out: f(3) = 7.

Why it works. Exactly one output is what lets you trust the rule: put 3 in today or tomorrow and you always get 7. Two inputs may share an output, but one input can never have two.


Move it yourself

Pick an input: the rule gives exactly one output.

A function machine. The input 3 goes in on the left, the box holds the rule 2x plus 1, and the output 7 comes out on the right, circled.inputoutput

Your turn

If g(x)=5−2xg(x) = 5 - 2x, what is g(4)g(4)?

Or just show the answer

−3-3

g(4)=5−2(4)=5−8=−3g(4) = 5 - 2(4) = 5 - 8 = -3.


Watch out for

  • Mistake 1. Struck through: −2^2 = −4; written over it: (−2)^2 = 4.

    No brackets: −22=−4-2^2 = -4.

    Square the whole input: (−2)2=4(-2)^2 = 4.

  • Mistake 2. Struck through: f(x) = f × x; written over it: f(x): output at x.

    Reading f(x)f(x) as f times x.

    f(x)f(x) is the name of the output for the input x.

  • Mistake 3. Struck through: x^2: 4 twice? no; written over it: x^2: 4 twice is fine.

    Thinking a function can't repeat an output.

    x2x^2 gives 4 for both 2 and −2-2, and is still a function.


Stuck on your own homework?

Open DuckyHelper and say it out loud. It sees your screen, so it works through your own problem with you and draws it, like the board above.

“Is the table on my screen a function? Show me how to tell.”

Plus is $14 a month for your first 3 months. DuckyHelper is an app for Mac (Apple silicon, macOS 14 or later), Windows and Linux.


Read the whole guide as text

A function is a rule that turns each input into exactly one output. We write it as f(x)f(x), said “f of x”. For f(x)=2x+1f(x) = 2x + 1, the input 3 gives f(3)=7f(3) = 7. To find an output, replace every x in the rule with the input and work it out.

Worked example

For f(x)=x2−3xf(x) = x^2 - 3x, find f(−2)f(-2).

  1. Replace every x with −2-2, in brackets.
    f(−2)=(−2)2−3(−2)f(-2) = (-2)^2 - 3(-2)
  2. Square first, then multiply.
    f(−2)=4+6f(-2) = 4 + 6
  3. Add.
    f(−2)=10f(-2) = 10

Answer: f(−2)=10f(-2) = 10

Algebra 1: all 12 guides
Questions and jobs

Do anything

Ask it a question or hand it a job, in any app.

Doing jobs for you is in the Mac app. Asking works on Mac, Windows and Linux.