Mf3 - Functions, mappings, domain and range

Mf3 - Functions, mappings, domain and range

A function is a rule with a specified set of permitted inputs, and its range is exactly the set of outputs it reaches. Use mapping language, formula restrictions and graphs to decide what changes when the input set changes.

A function gives each input one output

Can you remove half the inputs of a function while keeping every possible output? Try the rule “square the input, then subtract the result from 33”: inputs −2-2 and 22 both produce −1-1. Removing one of them need not remove that output.

You already know

Substitute the complete input, including its sign: 3−(−2)2=−13-(-2)^2=-1. A set records distinct members; repeating a member does not enlarge the set.

The notation f:x↦3−x2\mathrm f:x\mapsto3-x^2 names the input-output assignment, or mapping. An input's image is the output it produces, such as f(2)=−1\mathrm f(2)=-1.

Function, domain and range

A function is a mapping from its domain to its range such that every domain input has a unique output. The domain contains the permitted inputs; the range contains all and only the values actually attained. For example, squaring on {−1,1}\{-1,1\} has range {1}\{1\}, not {0,1}\{0,1\}, even though the latter contains every output.

This last distinction matters: a set large enough to contain the outputs need not be the range. A formula also needs a domain; a smaller specified domain takes precedence over whatever inputs the algebra would otherwise allow. These definitions and notation are not in the formula sheet: learn them.

Worked example 1: finding the exact output set

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

Plan. Evaluate each permitted input, then remove repeated values from the output list.

x−2−1012f(x)−1232−1\begin{array}{c|rrrrr} x&-2&-1&0&1&2\\\hline \mathrm f(x)&-1&2&3&2&-1 \end{array} f(−2)=−1,R={−1,2,3}collect actual images\mathrm f(-2)=-1,\qquad R=\{-1,2,3\}\quad\text{collect actual images}

Why this step? The outputs are a finite set. Values between them are not attained unless a permitted input produces them.

Answer. The image is −1-1; the range is {−1,2,3}\{-1,2,3\}.

Check. In particular, 00 is not in this range, despite lying between its smallest and largest members.

Change only the domain to the non-negative members. Keep the rule fixed and see which images survive.

Worked example 2: retaining outputs after restriction

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

Plan. Re-evaluate the permitted inputs and compare the actual images.

x012f(x)32−1\begin{array}{c|rrr} x&0&1&2\\\hline \mathrm f(x)&3&2&-1 \end{array} f(2)=−1,R={−1,2,3}no other inputs are permitted\mathrm f(2)=-1,\qquad R=\{-1,2,3\}\quad\text{no other inputs are permitted}

Why this step? The removed negative inputs had images already supplied by the positive inputs.

Answer. The image is −1-1, and the range has not changed.

Check. Every earlier output still appears in the new table.

Unique output is the essential condition. The relation y2=xy^2=x, with x≥0x\ge0, permits both y=2y=2 and y=−2y=-2 at x=4x=4, so it is not a function from xx to yy. Choosing y=xy=\sqrt{x} selects one output. On a graph, every vertical line through a domain input must meet the graph exactly once.

Key idea

The range is the exact collection of images, rather than a convenient set that happens to contain them.

Keep that distinction when the domain has only a few members.

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

A function can share an output between inputs. A separate question is whether it ever does so on its stated domain.

One-to-one and many-to-one

A one-to-one function has different images for distinct inputs. A many-to-one function maps at least two distinct inputs to the same image. A one-to-many relation sends one input to more than one output and fails the function definition.

For g(x)=2x+1\mathrm g(x)=2x+1, the equation g(a)=g(b)\mathrm g(a)=\mathrm g(b) gives 2a+1=2b+12a+1=2b+1, hence a=ba=b. Thus g\mathrm g is one-to-one on R\mathbb R. A horizontal line meeting a function graph twice reveals many-to-one behaviour. This is a different test from the vertical-line test, and neither criterion is in the formula sheet.

Worked example 3: a many-to-one function

Question. Determine whether f(x)=x2\mathrm f(x)=x^2, with domain R\mathbb R, is one-to-one.

Plan. Find two distinct permitted inputs with equal squares.

f(−2)=(−2)2=4negative inputf(2)=22=4distinct positive input\begin{aligned} \mathrm f(-2)&=(-2)^2=4 &&\text{negative input}\\ \mathrm f(2)&=2^2=4 &&\text{distinct positive input} \end{aligned}

Why this step? One repeated image is sufficient to disprove the claim that every pair of distinct inputs has distinct images.

Answer. It is many-to-one, so it is not one-to-one on R\mathbb R.

Check. It is still a function: neither individual input has two outputs.

Change only the domain to [0,∞)[0,\infty). The negative member of every nonzero equal-square pair disappears.

Worked example 4: proving the restricted claim

Question. Determine whether f(x)=x2\mathrm f(x)=x^2, with domain [0,∞)[0,\infty), is one-to-one.

Plan. Use equality of images for arbitrary permitted inputs, rather than checking a few examples.

a2=b2suppose images are equala=btake non-negative roots\begin{aligned} a^2&=b^2 &&\text{suppose images are equal}\\ a&=b &&\text{take non-negative roots} \end{aligned}

Why this step? Both inputs are non-negative, so the square root of a2a^2 is aa, not an uncertain choice of sign.

Answer. It is one-to-one on [0,∞)[0,\infty).

Check. The graph is the increasing right branch. The decreasing branch on (−∞,0]( -\infty,0] would also be one-to-one.

Restricting a domain changes the function, even when the displayed rule stays the same. This is what will later make some inverse functions possible.

Watch out

Wrong: reject x2x^2 as a function because (−2)2=22(-2)^2=2^2. Right: this proves many-to-one behaviour on a domain containing both inputs; it does not give either input more than one output.

Move the vertex and justify which branch remains.

Domains from denominators and roots

The largest real domain includes every real input that makes the formula meaningful. A question may then impose a smaller domain, which you must keep.

Division by zero excludes x=2x=2 from 3/(x−2)3/(x-2). An even root has a different condition: the expression inside must be non-negative. Both tests can apply to the same formula.

Root and denominator restrictions

u is real if u≥0,1u is real and defined if u>0\sqrt{u}\text{ is real if }u\ge0,\qquad \frac1{\sqrt{u}}\text{ is real and defined if }u>0

The second restriction combines a real root with a nonzero denominator.

Not in the formula sheet: learn it.

A range is not just an upper or lower bound. Show that the proposed outputs can all be reached, as well as ruling out anything outside them.

Worked example 5: finding a root's domain and range

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

Plan. Impose the real-root condition and find an input for every non-negative output.

x−2≥0real square rootx≥2input conditiony≥0root is non-negativex=y2+2input producing any y≥0\begin{aligned} x-2&\ge0 &&\text{real square root}\\ x&\ge2 &&\text{input condition}\\ y&\ge0 &&\text{root is non-negative}\\ x&=y^2+2 &&\text{input producing any }y\ge0 \end{aligned}

Why this step? The final rearrangement proves no non-negative output is missing from the range.

Answer. D=[2,∞)D=[2,\infty), R=[0,∞)R=[0,\infty).

Check. p(2)=0\mathrm p(2)=0 and p(11)=3\mathrm p(11)=3.

Change only the root's position, putting it in a denominator. The boundary input and zero output are now excluded.

Worked example 6: a reciprocal root

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

Plan. Make the root positive and solve backwards from an arbitrary positive output.

x−2>0real, nonzero denominatorx>2input conditiony>0positive reciprocalx=2+1y2input for any y>0\begin{aligned} x-2&>0 &&\text{real, nonzero denominator}\\ x&>2 &&\text{input condition}\\ y&>0 &&\text{positive reciprocal}\\ x&=2+\frac1{y^2} &&\text{input for any }y>0 \end{aligned}

Why this step? Approaching zero is not the same as attaining it; no finite permitted input gives output zero.

Answer. D=(2,∞)D=(2,\infty), R=(0,∞)R=(0,\infty).

Check. q(11)=1/3\mathrm q(11)=1/3. Substitution of x=2x=2 would divide by zero.

You may instead write D={x∈R:x>2}D=\{x\in\mathbb R:x>2\} and R={y∈R:y>0}R=\{y\in\mathbb R:y>0\}. Round interval brackets exclude an endpoint and square brackets include it. An infinite endpoint always uses a round bracket, since infinity is not a real input or output.

Watch out

Wrong: R=[0,∞)R=[0,\infty) for 1/x−21/\sqrt{x-2}. Right: R=(0,∞)R=(0,\infty). Zero is a limiting value but is not an image.

A reversed linear expression changes the direction of the input inequality.

A restricted domain changes the range

An interval of inputs gives a continuous stretch of a polynomial graph. Find the extreme outputs on that stretch, rather than treating the two endpoint outputs as the entire range.

The same squaring rule has two different restricted domains

For (x−1)2(x-1)^2, the picture's left interval includes the minimum (1,0)(1,0). Its right interval, [2,4][2,4], lies on the increasing branch and gives range [1,9][1,9]. Included endpoints have solid dots.

Worked example 7: tracking an interior minimum

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

Plan. Check the vertex and both endpoints, then include every intermediate value reached by the curve.

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

Why this step? The endpoints happen to have the same image, but the curve dips below them between those inputs.

Answer. The range is [0,4][0,4].

Check. f(0)=1\mathrm f(0)=1 is an intermediate image. No square is negative, and ∣x−1∣≤2|x-1|\le2 throughout this domain.

Change only the inclusion of the right endpoint: use [−1,3)[-1,3). Before changing the range bracket, check whether its boundary output still has another source.

Worked example 8: an open input endpoint, a closed output endpoint

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

Plan. Retain the vertex and check whether output 44 is still attained.

f(1)=0minimum still attainedf(−1)=4left endpoint remains−2≤x−1<2⟹0≤(x−1)2≤4bounds on the square\begin{aligned} \mathrm f(1)&=0 &&\text{minimum still attained}\\ \mathrm f(-1)&=4 &&\text{left endpoint remains}\\ -2\le x-1<2&\Longrightarrow0\le(x-1)^2\le4 &&\text{bounds on the square} \end{aligned}

Why this step? Excluding x=3x=3 removes one way of making 44, but the included input −1-1 still makes it.

Answer. The range remains [0,4][0,4].

Check. The continuous interval from −1-1 to 11 alone already supplies every output from 44 down to 00.

By contrast, restricting the increasing branch to [2,4)[2,4) gives range [1,9)[1,9): its only input giving 99 is excluded. The opening puzzle has the same explanation on an infinite scale: x2x^2 on R\mathbb R and on [0,∞)[0,\infty) both have range [0,∞)[0,\infty), because every square has a non-negative input that makes it.

Watch out

Wrong: copy the domain's open and closed brackets onto the range. Right: determine which outputs are attained, including outputs made by another input.

Try an interval with a different vertex and one excluded endpoint.

Quick Recap

  • Every domain input must have exactly one image; the range contains every actual output and nothing extra.
  • One-to-one and many-to-one describe how different inputs share images.
  • Denominators and even roots impose real-domain restrictions.
  • Range boundaries depend on attained outputs, including turning points and repeated images.

Yes: removing inputs can leave the range unchanged when the remaining inputs still supply every image.