Function Notation

What Does f(x) Mean?

When we write f(x)=x2+3xf(x) = x^2 + 3x, we’re defining a rule:

  • ff is the name of the function
  • xx is the input (a placeholder)
  • x2+3xx^2 + 3x is what we do to the input

Important: f(x)f(x) is not multiplication. It means “the output of ff when the input is xx.”


Evaluating Functions

To evaluate a function, replace every xx with the input value.

Example: For f(x)=x2+3xf(x) = x^2 + 3x, find f(2)f(2)

f(2)=(2)2+3(2)=4+6=10\begin{aligned} f(2) &= (2)^2 + 3(2) \\ &= 4 + 6 \\ &= 10 \end{aligned}

Example: Find f(1)f(-1)

f(1)=(1)2+3(1)=13=2\begin{aligned} f(-1) &= (-1)^2 + 3(-1) \\ &= 1 - 3 \\ &= -2 \end{aligned}

Plugging in Variables

You can plug in variables, not just numbers.

Example: Find f(a)f(a)

f(a)=(a)2+3(a)=a2+3a\begin{aligned} f(a) &= (a)^2 + 3(a) \\ &= a^2 + 3a \end{aligned}

Plugging in Expressions

This is where it gets powerful. You can plug in entire expressions.

Example: Find f(x+1)f(x + 1)

Replace every xx with (x+1)(x + 1):

f(x+1)=(x+1)2+3(x+1)=x2+2x+1+3x+3=x2+5x+4\begin{aligned} f(x + 1) &= (x + 1)^2 + 3(x + 1) \\ &= x^2 + 2x + 1 + 3x + 3 \\ &= x^2 + 5x + 4 \end{aligned}

Example: Find f(2x)f(2x)

f(2x)=(2x)2+3(2x)=4x2+6x\begin{aligned} f(2x) &= (2x)^2 + 3(2x) \\ &= 4x^2 + 6x \end{aligned}

Different Names

Functions can have any name, and inputs can be any variable:

  • g(x),h(x)g(x), h(x) — different function names
  • f(t)f(t) — using tt (often for time)
  • A(r)A(r) — area as a function of radius

The letters are just labels.


Operations on Functions

You can combine functions with arithmetic:

(f+g)(x)=f(x)+g(x)(fg)(x)=f(x)g(x)(fg)(x)=f(x)g(x)(fg)(x)=f(x)g(x)\begin{aligned} (f + g)(x) &= f(x) + g(x) \\ (f - g)(x) &= f(x) - g(x) \\ (f \cdot g)(x) &= f(x) \cdot g(x) \\ \left(\frac{f}{g}\right)(x) &= \frac{f(x)}{g(x)} \end{aligned}

Example: If f(x)=x2f(x) = x^2 and g(x)=x+1g(x) = x + 1

(f+g)(3)=f(3)+g(3)=9+4=13\begin{aligned} (f + g)(3) &= f(3) + g(3) \\ &= 9 + 4 \\ &= 13 \end{aligned}