1.02u - Functions, mappings, domain and range

1.02u - Functions, mappings, domain and range

Can you remove some permitted inputs without losing any possible outputs? Learn what makes a mapping a function, distinguish its domain from its range, and use formulas and graphs to track the effect of a restriction.

A function gives each input one output

Squaring sends −2-2 and 22 to the same answer, 44. If you stop allowing negative inputs, does that answer disappear? This question is easier once inputs and outputs have separate names.

You already know

Substituting into x2x^2 means squaring the whole input: (−3)2=9(-3)^2=9. A set lists each member once, even when several calculations give that member.

A mapping assigns outputs to inputs. A rule such as f:x↦x2\mathrm f:x\mapsto x^2 says “take an input and square it”. The image of an input is the output it produces: f(−3)=9\mathrm f(-3)=9.

Function, domain and range

A function maps each input in its domain to exactly one output. Its range is the set of all outputs actually attained. For example, f(x)=x2\mathrm f(x)=x^2, with domain {−1,0,1}\{-1,0,1\}, has range {0,1}\{0,1\}. Sending one input to both 22 and −2-2 is not a function of that input.

The rule and domain belong together. An excluded input is not a fault in a function; a permitted input with no output, or with two outputs, is. These definitions and function-notation conventions are not in the formula sheet: learn them.

Worked example 1: collecting the images

Question. f:x↦x2\mathrm f:x\mapsto x^2 has domain D={−2,−1,0,1,2}D=\{-2,-1,0,1,2\}. State the image of −2-2 and determine the range.

Plan. Evaluate every permitted input, then collect distinct output values.

x−2−1012f(x)41014\begin{array}{c|rrrrr} x&-2&-1&0&1&2\\\hline \mathrm f(x)&4&1&0&1&4 \end{array} f(−2)=4,R={0,1,4}list distinct images\mathrm f(-2)=4,\qquad R=\{0,1,4\}\quad\text{list distinct images}

Why this step? A range is a set of values, so repeated images are written only once.

Answer. The image is 44, and the range is {0,1,4}\{0,1,4\}.

Check. Every domain input has one image, although five inputs produce only three distinct outputs.

Change only the domain, keeping the squaring rule. This tests whether removing inputs must remove outputs.

Worked example 2: fewer inputs, the same range

Question. f:x↦x2\mathrm f:x\mapsto x^2 now has domain D={0,1,2}D=\{0,1,2\}. State the image of 22 and determine the range.

Plan. Use only the new permitted inputs and collect their images.

x012f(x)014\begin{array}{c|rrr} x&0&1&2\\\hline \mathrm f(x)&0&1&4 \end{array} f(2)=4,R={0,1,4}collect the outputs\mathrm f(2)=4,\qquad R=\{0,1,4\}\quad\text{collect the outputs}

Why this step? Removing −1-1 and −2-2 loses no output because 11 and 22 still produce their images.

Answer. The image is 44, and the range is still {0,1,4}\{0,1,4\}.

Check. Each value in the earlier range has a permitted input in the new domain.

There is a graph version of the unique-output condition. A vertical line through a permitted input must meet the graph exactly once. The relation y2=xy^2=x fails: at x=4x=4, it gives both y=2y=2 and y=−2y=-2. Choosing y=xy=\sqrt{x} selects just the non-negative output.

Key idea

A function needs one output per input, not one input per output. Several inputs may share an image.

Check the range without confusing it with the input set.

One-to-one and many-to-one mappings

Once a mapping is known to be a function, ask whether different inputs can give the same output.

One-to-one and many-to-one

A one-to-one function gives different outputs for different inputs. A many-to-one function has at least two distinct inputs with the same output. OCR also writes one-one and many-one. A one-many mapping gives one input several outputs, so it is not a function of that input.

For g(x)=2x+1\mathrm g(x)=2x+1, equality of images gives 2a+1=2b+12a+1=2b+1, hence a=ba=b. That proves one-to-one behaviour on R\mathbb R. On a graph, horizontal lines test one-to-one behaviour; vertical lines test whether it is a function at all. These criteria are not in the formula sheet: learn them.

Worked example 3: two inputs share an image

Question. Classify f(x)=(x−1)2\mathrm f(x)=(x-1)^2, with domain R\mathbb R, as one-to-one or many-to-one. Justify your answer.

Plan. Look for two inputs equally far from the square's centre, 11.

f(0)=(0−1)2=1input left of 1f(2)=(2−1)2=1input right of 1\begin{aligned} \mathrm f(0)&=(0-1)^2=1 &&\text{input left of }1\\ \mathrm f(2)&=(2-1)^2=1 &&\text{input right of }1 \end{aligned}

Why this step? One equal-image pair disproves one-to-one behaviour; checking many unrelated inputs is unnecessary.

Answer. The function is many-to-one, because distinct inputs 00 and 22 share the image 11.

Check. Each input still gives one value, so it remains a function.

Change only the domain to the right-hand branch. The formula remains identical.

Worked example 4: a branch becomes one-to-one

Question. Classify f(x)=(x−1)2\mathrm f(x)=(x-1)^2, with domain x≥1x\ge1, as one-to-one or many-to-one. Justify your answer.

Plan. Suppose two permitted inputs have equal images and use their non-negative distances from 11.

(a−1)2=(b−1)2assume equal imagesa−1=b−1a−1,b−1≥0a=badd 1\begin{aligned} (a-1)^2&=(b-1)^2 &&\text{assume equal images}\\ a-1&=b-1 &&a-1,b-1\ge0\\ a&=b &&\text{add }1 \end{aligned}

Why this step? Non-negative numbers with equal squares are equal. The restriction removes the negative-root alternative.

Answer. The restricted function is one-to-one.

Check. The former repeated-image pair is broken: 00 is no longer permitted. The branch is strictly increasing.

Restricting to x≤1x\le1 would also work, using the decreasing branch. A restriction that still contains 00 and 22 would not.

Watch out

Wrong: “Many-to-one means it is not a function.” Right: many-to-one is allowed; one-many is not. Count the outputs for each individual input first.

Use an equal-image pair and a branch argument for a shifted square.

Domains from denominators and roots

A formula can forbid inputs even before a question adds its own restrictions. Ask what would make the calculation undefined over the reals.

For h(x)=3/(x−2)\mathrm h(x)=3/(x-2), division by zero excludes x=2x=2, giving D=R∖{2}D=\mathbb R\setminus\{2\}. For an even root, its argument must be non-negative. These domain conditions are not in the formula sheet: learn them.

Real square-root conditions

u requires u≥0,1u requires u>0\sqrt{u}\text{ requires }u\ge0,\qquad \frac1{\sqrt{u}}\text{ requires }u>0

A real square root is non-negative, and a denominator cannot equal zero.

Not in the formula sheet: learn it.

A range needs two checks: no output outside it can occur, and every value inside it can occur. Solving for an input establishes the second claim.

Worked example 5: a root with its endpoint

Question. Determine the largest real domain and range of p(x)=x+1\mathrm p(x)=\sqrt{x+1}.

Plan. Restrict the root's argument, then identify and attain every non-negative output.

x+1≥0real root conditionx≥−1solve for the inputy≥0non-negative square rootx=y2−1input giving a chosen y≥0\begin{aligned} x+1&\ge0 &&\text{real root condition}\\ x&\ge-1 &&\text{solve for the input}\\ y&\ge0 &&\text{non-negative square root}\\ x&=y^2-1 &&\text{input giving a chosen }y\ge0 \end{aligned}

Why this step? Saying outputs are non-negative is only a bound; x=y2−1x=y^2-1 shows every non-negative output is achieved.

Answer. D=[−1,∞)D=[-1,\infty) and R=[0,∞)R=[0,\infty).

Check. The endpoint is attained: p(−1)=0\mathrm p(-1)=0; p(3)=2\mathrm p(3)=2.

Change only the position of the root, placing the same expression in a denominator. Equality at the boundary now fails.

Worked example 6: a root in the denominator

Question. Determine the largest real domain and range of q(x)=1/x+1\mathrm q(x)=1/\sqrt{x+1}.

Plan. Require a positive denominator, then solve for an input giving an arbitrary positive output.

x+1>0real, nonzero denominatorx>−1solve the restrictiony>0reciprocal of a positive rootx=1y2−1rearrange for any y>0\begin{aligned} x+1&>0 &&\text{real, nonzero denominator}\\ x&>-1 &&\text{solve the restriction}\\ y&>0 &&\text{reciprocal of a positive root}\\ x&=\frac1{y^2}-1 &&\text{rearrange for any }y>0 \end{aligned}

Why this step? Zero can be approached as xx grows, but a reciprocal of a finite positive number never equals zero.

Answer. D=(−1,∞)D=(-1,\infty) and R=(0,∞)R=(0,\infty).

Check. q(3)=1/2\mathrm q(3)=1/2. The proposed endpoint x=−1x=-1 would cause division by zero.

Set notation gives the same information: {x∈R:x>−1}\{x\in\mathbb R:x>-1\} is the domain, while {y∈R:y>0}\{y\in\mathbb R:y>0\} is the range. Square brackets include finite endpoints; round brackets exclude them. Infinity always has a round bracket because it is not a real endpoint.

Watch out

Wrong: use x≥−1x\ge-1 for 1/x+11/\sqrt{x+1}. Right: require x>−1x>-1. A real root is not enough when the root is also a denominator.

Keep the root in the numerator, but reverse its linear argument.

A restricted domain changes the range

To find a range on an interval, track all permitted inputs, including any turning point inside the interval. Endpoints alone can miss the smallest output.

The graph below keeps the same rule, y=(x−1)2y=(x-1)^2, but changes its input interval. Solid dots mean included endpoints.

The same squaring rule has two different restricted domains

The left interval crosses the minimum at x=1x=1. The right interval stays on the increasing branch. This is why their output intervals differ.

Worked example 7: an interval across the minimum

Question. Determine the range of f(x)=(x−1)2\mathrm f(x)=(x-1)^2 with domain [−1,3][-1,3].

Plan. Check the included turning point and both endpoints, then use continuity between them.

f(1)=0minimum inside the domainf(−1)=4left endpointf(3)=4right endpoint\begin{aligned} \mathrm f(1)&=0 &&\text{minimum inside the domain}\\ \mathrm f(-1)&=4 &&\text{left endpoint}\\ \mathrm f(3)&=4 &&\text{right endpoint} \end{aligned}

Why this step? Equal endpoint values do not mean a constant function; the intervening curve reaches lower outputs.

Answer. The range is [0,4][0,4]. The continuous curve attains every value between these included bounds.

Check. f(0)=1\mathrm f(0)=1, an output missed by looking only at the endpoints.

Change only the domain to [2,4][2,4]. The turning point is now excluded, so the branch increases throughout the interval.

Worked example 8: an interval on one branch

Question. Determine the range of f(x)=(x−1)2\mathrm f(x)=(x-1)^2 with domain [2,4][2,4].

Plan. Track the increasing non-negative quantity x−1x-1, then square its bounds.

2≤x≤4⟹1≤x−1≤3subtract 1⟹1≤(x−1)2≤9square non-negative values\begin{aligned} 2\le x\le4&\Longrightarrow1\le x-1\le3 &&\text{subtract }1\\ &\Longrightarrow1\le(x-1)^2\le9 &&\text{square non-negative values} \end{aligned}

Why this step? Squaring preserves order here because the entire distance interval is non-negative.

Answer. The range is [1,9][1,9].

Check. f(2)=1\mathrm f(2)=1 and f(4)=9\mathrm f(4)=9, and every intermediate output occurs once on this increasing branch.

On [2,4)[2,4), the range would be [1,9)[1,9), since only the input giving 99 has been removed. But brackets cannot simply be copied: x2x^2 on (−2,2](-2,2] still has range [0,4][0,4], because the permitted input 22 still gives 44. That is the surprising answer to the opening question: removing an input need not remove its image.

Watch out

Wrong: “An open endpoint always makes the range endpoint open.” Right: ask whether another permitted input attains that output.

Separate the maximum's source from the appearance of the domain brackets.

Quick Recap

  • A function assigns exactly one image to every domain input; its range contains all and only the outputs attained.
  • Many-to-one functions are allowed; one-many mappings fail the function definition.
  • Check denominator zeros and real-root conditions before writing a domain.
  • For a restricted range, check turning points and whether each boundary output is actually attained.

Yes: removing negative inputs from a squaring function can leave every output unchanged, because non-negative inputs still produce them.