Function as Mapping Examples: 47 Problems with Answers

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

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

Concept Recap

Viewing a function as a mapping means thinking of it as an explicit association from each element of the domain to exactly one element of the codomain.

Like a dictionary: every word maps to a definition. Every input maps to an 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 assigns each allowed input exactly one output.

Common stuck point: The procedure for function as mapping is the easy part; the trap is rejecting a function because two inputs share an output. Asking "Does any input point to two different outputs?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Does any input point to two different outputs?

Worked Examples

Example 1

easy
Let f:{1,2,3}→{a,b,c} be defined by f(1)=a, f(2)=a, f(3)=c. Determine whether f is a valid function, and find its range.

Answer

Valid function; range ={a,c}

First step

1
A function requires every element of the domain to map to exactly one element of the codomain. Check: f(1)=a, f(2)=a, f(3)=c — each domain element has exactly one image. ✓ Valid function.

Full solution

  1. 2
    The range is the set of actual output values: {a,c} (note b is in the codomain but not in the range).
  2. 3
    Observe this is many-to-one: both 1 and 2 map to a.
A function maps each domain element to exactly one codomain element, but multiple domain elements may share an output (many-to-one). The range (image) is only the outputs actually achieved, which may be a proper subset of the codomain.

Example 2

medium
Explain why the relation R={(1,2),(1,3),(2,5)} is NOT a function from {1,2} to {2,3,5}.

Example 3

medium
Let f:{1,2,3,4}→{a,b,c} with f(1)=a, f(2)=b, f(3)=a, f(4)=c. Find the range and decide if f is one-to-one.

Example 4

medium
Given f:Z→Z with f(n)=2n+1, find f−1({5}) (the pre-image of 5).

Example 5

hard
Define f:R→R, f(x)=x3. Determine whether f is one-to-one and whether it is onto.

Practice Problems

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

Example 1

easy
Which of the following sets of ordered pairs defines a function from {1,2,3} to R? (A) {(1,5),(2,5),(3,5)} (B) {(1,2),(2,3)} (C) {(1,0),(2,1),(3,2),(1,4)}

Example 2

medium
Let f:R→R, f(x)=x2. Find f−1({4}) (the pre-image of 4) and explain why f does not have an inverse function on all of R.

Example 3

easy
A mapping sends 1→a, 2→b, 3→c. Is it a function?

Example 4

easy
A mapping sends 1→a, 2→a, 3→b. Is it a function?

Example 5

easy
A mapping sends 1→a and 1→b (with a≠b). Is it a function?

Example 6

easy
Use the vertical line test: a graph hit twice by some vertical line. Function?

Example 7

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

Example 8

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

Example 9

easy
In the dictionary mapping word→definition, what plays the role of input?

Example 10

easy
Can a function map two different inputs to the same output?

Example 11

medium
A mapping from {1,2,3} assigns 1→5, 2→5, 3→5. Is it a function? What is special about it?

Example 12

medium
Domain {a,b}, codomain {1,2}. How many distinct functions exist?

Example 13

medium
Is the relation 'is a parent of' from people to people a function?

Example 14

medium
Does f(x)=x2 as a mapping from reals to reals send any input to two outputs?

Example 15

medium
Is the circle x2+y2=25 a function of x? Use the mapping idea.

Example 16

medium
A vending machine maps each button to one snack, but two buttons give chips. Function?

Example 17

medium
A mapping diagram has an input arrow from 4 with no arrow leaving it. Is it a function on its stated domain?

Example 18

medium
Restricting f(x)=x2 to x≥0 makes it one-to-one. What does that mean for the mapping?

Example 19

medium
A mapping diagram shows 1→a, 2→b, and a second arrow 2→c. Is it a function?

Example 20

challenge
Domain {a,b,c}, codomain {1,2}. How many functions are there, and how many are one-to-one?

Example 21

challenge
A mapping is given by f(n)= remainder of n divided by 3, on inputs {0,1,2,3,4,5}. Is it a function? Is it one-to-one?

Example 22

challenge
Explain via mapping why f(x)=±x is NOT a function but f(x)=x is.

Example 23

easy
Is the set of pairs {(5,8),(6,8),(7,8)} a function?

Example 24

easy
Is {(2,3),(2,5),(4,6)} a function?

Example 25

easy
Is {(1,1),(2,4),(3,9),(4,16)} a function?

Example 26

easy
A mapping diagram sends a→1, b→2, c→3, d→2. Is it a function?

Example 27

easy
Does a horizontal line graph represent a function?

Example 28

easy
Does a vertical line graph represent a function?

Example 29

medium
Domain {1,2,3}, codomain {a,b,c}. How many one-to-one functions are there?

Example 30

medium
Domain {1,2,3}, codomain {a,b,c,d}. How many total functions are there?

Example 31

medium
Each person maps to their birth year. Is this a function from people to years?

Example 32

medium
Each year maps to people born in it. Is this a function from years to people?

Example 33

medium
A mapping f:{1,2,3,4,5}→{0,1} sends n to n mod 2. List the pre-image of 1.

Example 34

medium
True or false: the graph of x=y2 represents y as a function of x.

Example 35

medium
A function f:A→B has ∣A∣=5 and ∣B∣=7. Can f be one-to-one? Can it be onto?

Example 36

hard
Domain {1,2,3,4}, codomain {a,b}. How many functions are onto?

Example 37

hard
Let f:R→R with f(x)=∣x∣. Is f one-to-one? Onto?

Example 38

hard
A mapping f:{1,2,3,4}→{1,2,3,4} has f(1)=2,f(2)=3,f(3)=4,f(4)=1. Is f a bijection?

Example 39

hard
Find the number of one-to-one functions from a 4-element set to a 6-element set.

Example 40

hard
A function f:Z→Z is defined by f(n)= the remainder when n is divided by 4. Find the pre-image of 1 restricted to {1,2,…,12}.

Example 41

challenge
Domain {1,2,3}, codomain {a,b,c}. How many functions are onto?

Example 42

challenge
Prove or refute: if f:A→B is a bijection, then the inverse mapping f−1:B→A is also a function.

Background Knowledge

These ideas may be useful before you work through the harder examples.

function definition