Function Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Function.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

A function is a rule that assigns to each input in the domain exactly one output in the codomain β€” every input maps to precisely one output, never two.

A machine: put something in, get exactly one thing out. Same input always gives same output.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: A function is a rule that pairs each allowed input with one and only one output.

Common stuck point: The procedure for function is the easy part; the trap is calling any equation in xx and yy a function. Asking "Does every allowed input give exactly one output, never two?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Does every allowed input give exactly one output, never two?

Worked Examples

Example 1

easy
Determine whether the relation {(1,3),(2,5),(3,7),(4,9)}\{(1, 3), (2, 5), (3, 7), (4, 9)\} is a function.

Answer

Yes,Β itΒ isΒ aΒ function.\text{Yes, it is a function.}

First step

1
A relation is a function if every input (first element) maps to exactly one output (second element).

Full solution

  1. 2
    List the inputs: 1,2,3,41, 2, 3, 4. Each input appears exactly once, so each has a unique output.
  2. 3
    Since no input is repeated with a different output, this relation is a function.
A function assigns exactly one output to each input. The vertical line test for graphs and the uniqueness of first elements in ordered pairs are equivalent ways to check this.

Example 2

medium
Does the equation x2+y2=25x^2 + y^2 = 25 define yy as a function of xx?

Example 3

medium
Given f(x)=2x2βˆ’3x+1f(x) = 2x^2 - 3x + 1, find f(4)f(4) and determine if g={(1,2),(3,4),(1,5)}g = \{(1,2), (3,4), (1,5)\} is a function.

Example 4

medium
Decide whether y2=xy^2 = x defines yy as a function of xx.

Example 5

medium
If f(x)=2x+3f(x) = 2x + 3 and f(a)=11f(a) = 11, find aa.

Example 6

hard
Given f(x)=x+1xβˆ’1f(x) = \dfrac{x + 1}{x - 1}, find f(f(2))f(f(2)).

Example 7

hard
A graph passes the vertical line test but two horizontal lines each cut it in 3 places. Is it a function? Is it one-to-one?

Example 8

hard
Let f(x)={x+1x<0x2xβ‰₯0f(x) = \begin{cases} x + 1 & x < 0 \\ x^2 & x \ge 0 \end{cases}. Find f(βˆ’3)+f(2)f(-3) + f(2).

Example 9

challenge
Find a function f:R→Rf: \mathbb{R} \to \mathbb{R} such that f(f(x))=xf(f(x)) = x for all xx, other than f(x)=xf(x) = x.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Is the relation {(2,4),(3,6),(2,8)}\{(2, 4), (3, 6), (2, 8)\} a function? Explain.

Example 2

hard
A graph passes through the points (1,2)(1, 2), (2,5)(2, 5), (3,5)(3, 5), and (1,7)(1, 7). Does this graph represent a function? Explain using the vertical line test.

Example 3

easy
Does the rule 'add 3 to the input' define a function?

Example 4

easy
Is the set {(1,2),(2,3),(3,4)}\{(1,2),(2,3),(3,4)\} a function?

Example 5

easy
Is the set {(1,2),(1,5),(3,4)}\{(1,2),(1,5),(3,4)\} a function?

Example 6

easy
If f(x)=2x+1f(x)=2x+1, find f(4)f(4).

Example 7

easy
If f(x)=x2f(x)=x^2, find f(βˆ’3)f(-3).

Example 8

easy
Can a function defined by a table assign output 77 to input 22 and also output 77 to input 55?

Example 9

easy
Does x2+y2=1x^2+y^2=1 define yy as a function of xx?

Example 10

easy
If f(x)=1xf(x)=\frac{1}{x}, what is f(0)f(0)?

Example 11

medium
A function ff satisfies f(x)=3xβˆ’2f(x)=3x-2. For which input is f(x)=10f(x)=10?

Example 12

medium
If f(x)=x2βˆ’xf(x)=x^2-x, compute f(3)βˆ’f(2)f(3)-f(2).

Example 13

medium
Given f(x)=2x+1f(x)=2x+1 and f(a)=f(3)f(a)=f(3), find aa.

Example 14

medium
A function is defined by f(x)={xxβ‰₯0βˆ’xx<0f(x)=\begin{cases} x & x\ge 0 \\ -x & x<0 \end{cases}. Find f(βˆ’5)f(-5).

Example 15

medium
If f(x+1)=2x+5f(x+1)=2x+5, find f(x)f(x).

Example 16

medium
Does the graph that passes through (2,1)(2,1) and (2,4)(2,4) represent a function?

Example 17

medium
If f(x)=x2f(x)=x^2 and g(x)=x2g(x)=x^2 but with domains xβ‰₯0x\ge 0 and all reals, are ff and gg the same function?

Example 18

medium
If f(x)=3xf(x)=3x and f(f(x))=18f(f(x))=18, find xx.

Example 19

challenge
A function satisfies f(x)+2f(1βˆ’x)=3xf(x)+2f(1-x)=3x for all xx. Find f(x)f(x).

Example 20

challenge
ff is defined on integers by f(1)=1f(1)=1 and f(n)=f(nβˆ’1)+nf(n)=f(n-1)+n. Find f(5)f(5).

Example 21

challenge
If f(x)=ax+bxf(x)=\frac{ax+b}{x} and f(1)=4f(1)=4, f(2)=3f(2)=3, find a+ba+b.

Example 22

medium
A function satisfies f(2x)=4x+1f(2x)=4x+1. Find f(x)f(x).

Example 23

easy
Is the set {(0,1),(1,2),(2,3),(3,4)}\{(0, 1), (1, 2), (2, 3), (3, 4)\} a function?

Example 24

easy
If f(x)=3xβˆ’5f(x) = 3x - 5, find f(0)f(0).

Example 25

easy
If g(x)=x2βˆ’1g(x) = x^2 - 1, find g(βˆ’2)g(-2).

Example 26

easy
Does {(1,5),(2,5),(3,5),(4,5)}\{(1, 5), (2, 5), (3, 5), (4, 5)\} define a function?

Example 27

medium
If f(x)=xβˆ’4f(x) = \sqrt{x - 4}, find f(13)f(13).

Example 28

medium
If f(x)=1xβˆ’2f(x) = \dfrac{1}{x - 2}, what value of xx is not in the domain?

Example 29

medium
For f(x)=x2f(x) = x^2, find f(x+1)βˆ’f(x)f(x+1) - f(x).

Example 30

medium
What is the domain of f(x)=9βˆ’x2f(x) = \sqrt{9 - x^2}?

Example 31

medium
For f(x)=∣x∣f(x) = |x|, find f(βˆ’7)+f(7)f(-7) + f(7).

Example 32

hard
State the domain of f(x)=x+2xβˆ’3f(x) = \dfrac{\sqrt{x+2}}{x - 3}.

Example 33

hard
If f(x)=ax+bf(x) = ax + b, f(1)=5f(1) = 5, and f(3)=11f(3) = 11, find aa and bb.

Example 34

hard
If f(x)=x2βˆ’4x+1f(x) = x^2 - 4x + 1, find f(x+2)f(x + 2), simplified.

Example 35

hard
Find the range of f(x)=x2+4f(x) = x^2 + 4 for x∈Rx \in \mathbb{R}.

Example 36

hard
For f(x)=x2f(x) = x^2, simplify f(x+h)βˆ’f(x)h\dfrac{f(x+h) - f(x)}{h} assuming hβ‰ 0h \ne 0.

Example 37

challenge
How many functions f:{1,2,3,4}β†’{1,2,3,4}f: \{1, 2, 3, 4\} \to \{1, 2, 3, 4\} are one-to-one?