←
Class 11 Mathematics
2. Relations and Functions · 2 / 14
⌕
Chapter 2 of 14

2. Relations and Functions

12 sections · 6,376 words

2. About this chapter

290 words · 1 min read

Big idea: A function makes one output choice for every allowed input.

This original learning chapter follows the supplied Class 11 topic sequence. Read the explanations, work through the examples, and cover the answers while attempting the checks. A graph supports the algebra; it does not replace a proof.

  • What an ordered pair and a Cartesian product are.
  • How a relation is a set of pairs, with domain, range and codomain.
  • How a function differs from a general relation, including one-to-one and onto.
  • How to find a real domain, including square roots and zero denominators.
  • How to read graphs, combine functions, compose them, and reverse a bijection.

  • Ordered pair: two entries in a fixed order.
  • Cartesian product: all ordered pairs from two sets.
  • Relation: a subset of a Cartesian product.
  • Function: a relation with exactly one output for each allowed input.
  • Domain / range / codomain: allowed inputs, actual outputs, stated output set.
  • Composition: apply the inner function first.
  • Inverse: the reverse map of a one-to-one onto function.
Why it matters: later calculus talks about f(x) as if the one-output rule were obvious. This chapter writes that rule down.

Read a section in order. Do not skip the figure. The arrows are the same idea as the pair list.

Cover each worked example and try the steps yourself. Then compare every arithmetic line.

The practice set uses new numbers. It is not a copy of the worked example.

Exercise sections mix the skills. Draw arrows before you write a formula.

Have a pencil ready. Domain questions need an inequality and a hole, written separately.

The summary at the end is a map, not a replacement for the worked examples.

2.1 Introduction

621 words · 3 min read

A charging log pairs a time with a battery percent. A timetable pairs a route with departure times.

Both pairings are relations. A relation is a set of ordered pairs.

A function is a stricter relation. Each allowed input gets exactly one output.

A function assigns one output to every allowed input. That single-choice rule is the whole chapter.

RelationFunction123abc123abc
How to read the figure: count arrows leaving each left disc. A relation may send one input to two outputs. A function sends each input to exactly one output. Shared outputs on the right are allowed.

Look at the left panel. Input 1 has two arrows. That pairing is a relation, not a function.

Look at the right panel. Each left disc has one arrow. Shared targets are fine. That pairing is a function.

A relation may send one input to several outputs. A function may send several inputs to one output.

The ban is only this: one input cannot own two different outputs.

You already used functions without the name. Area of a square uses side length. One side, one area.

A vending machine is a rough picture. One button should give one item. Two items from one button would be a relation, not a function.

The input set is the list of allowed buttons. The output set is the list of possible items.

If a button is on the panel but does nothing, the rule fails. Every allowed input must fire.

Later calculus needs a clean input-output rule. This chapter writes that rule in set language.

You will meet three pictures of the same idea: a pair list, an arrow diagram, and a graph of points.

Learn to move between those pictures. An exam may give any one of them.

Why it matters: domain, range and composition all sit on this one-output rule. Get the rule first.

Goal. Decide whether the pairing {(1, 4), (2, 4), (3, 8)} is a function on {1, 2, 3}.

Rule. Check that every input appears once as a first entry, with one second entry.

Substitution. Input 1 appears in (1, 4) only.

Input 2 appears in (2, 4) only.

Input 3 appears in (3, 8) only.

No input is missing. No input is repeated with a new output.

Two inputs share the output 4. That is allowed for a function.

Check. The three first entries are exactly {1, 2, 3}. Each occurs once.

Result: the pairing is a function. It is many-one, not one-to-one.

Count arrows leaving each input. Zero arrows or two arrows both break the function rule.
Do not reject a function just because two inputs share an output. Sharing outputs is allowed.

⚡ Quick Check Flashcards3 questions

Cover the answers. Try each question on paper first. If an answer differs, find the step that split.

Question 1
In one sentence, what extra demand does a function make?
Try answering before revealing!
Question 2
Is {(1, 2), (1, 5), (2, 5)} a function on {1, 2}?
Try answering before revealing!
Question 3
Can a function send 3 and 7 to the same output?
Try answering before revealing!

2.2 Cartesian Products of Sets

541 words · 2 min read

An ordered pair (a,b)(a,b) records a first entry and a second entry.

Two ordered pairs are equal only when both matching entries agree. Usually (a,b)≠(b,a)(a,b)\ne(b,a).

The Cartesian product A×BA\times B is the set of all pairs with first entry in A and second entry in B.

Think of a table. Rows come from A. Columns come from B. Each cell is one pair.

second set B →13246(1, 2)(1, 4)(1, 6)(3, 2)(3, 4)(3, 6)
How to read the figure: stay in a row to keep the first entry fixed. Walk across that row to change the second entry. Count the cells: two choices times three choices is six pairs.

Look at the top row. The first entry stays 1. The second entry walks through 2, 4, 6.

Look at the bottom row. The first entry stays 3. The same three second entries appear.

Count the cells: 2×3=62\times 3=6 pairs.

In symbols, A={1,3}A=\{1,3\} and B={2,4,6}B=\{2,4,6\}, so A×B={(1,2),(1,4),(1,6),(3,2),(3,4),(3,6)}A\times B=\{(1,2),(1,4),(1,6),(3,2),(3,4),(3,6)\}.

Reversing the sets reverses the roles. B×AB\times A has the same count 6, but the pairs differ.

Compare (1, 2) with (2, 1). Both counts match. The sets A×BA\times B and B×AB\times A are not equal.

If either factor is empty, no pair can be formed. The product is empty.

A product of three sets holds ordered triples (a,b,c)(a,b,c). One entry comes from each set.

Sets with 2, 3 and 4 members give 2×3×4=242\times 3\times 4=24 triples.

The coordinate plane is R×R\mathbb R\times\mathbb R. Each point is an ordered pair of reals.

A point (3, 5) is not the point (5, 3). The first number is the horizontal place. The second is the vertical place.

That is why the product of two number sets is a set of points, not a set of unordered couples.

A square grid A×AA\times A includes pairs such as (2, 2). A member may pair with itself.

Order inside a pair matters. Count is not equality for products.

Why it matters: every relation later is a subset of some Cartesian product. You cannot skip the product.

Goal. If (2x−1, y+3)=(7,8)(2x-1,\, y+3)=(7,8), find x and y.

Rule. Matching entries of equal ordered pairs are equal.

Substitution. First entries: 2x−1=72x-1=7.

Add 1: 2x−1+1=7+12x-1+1=7+1, so 2x=82x=8.

Divide by 2: x=4x=4.

Second entries: y+3=8y+3=8.

Subtract 3: y=5y=5.

Check. 2⋅4−1=72\cdot 4-1=7, which equals 7. And 5+3=85+3=8.

Result: x=4x=4 and y=5y=5.

Write the two entry-equations on separate lines. Do not mix first-entry algebra with second-entry algebra.
{red|Do not treat (a, b) as a set {a, b}.} Order is part of the object.

⚡ Quick Check Flashcards3 questions

Work these on paper with the answers hidden. Compare your steps with the printed working.

Question 1
List {p,q}×{0,1}\{p,q\}\times\{0,1\}.
Try answering before revealing!
Question 2
If A has 4 elements, find n(A×A)n(A\times A).
Try answering before revealing!
Question 3
Can two products have the same number of pairs without being equal?
Try answering before revealing!

Exercise 2.1 — Products

121 words · 1 min read
⚡ Quick Check Flashcards5 questions

Try each question before reading its solution. Give a reason as well as a final value.

Question 1
List {2,5}×{1,4}\{2,5\}\times\{1,4\}.
Try answering before revealing!
Question 2
If (3x+1, 2y−4)=(10,6)(3x+1,\, 2y-4)=(10,6), find x and y.
Try answering before revealing!
Question 3
If either set in a product is empty, what is the product?
Try answering before revealing!
Question 4
How many ordered triples come from sets of sizes 3, 1 and 5?
Try answering before revealing!
Question 5
Are A×BA\times B and B×AB\times A always equal?
Try answering before revealing!

2.3 Relations

698 words · 3 min read

A relation from A to B is any subset of A×BA\times B.

You pick some of the possible ordered pairs. You may pick none. You may pick all.

The domain is the set of first entries that actually appear.

The range is the set of second entries that actually appear.

The codomain is the stated set B of allowed outputs. It may be larger than the range.

Take A={1,2,3}A=\{1,2,3\} and B={2,3,4,5}B=\{2,3,4,5\} with the rule b=a+1b=a+1.

The relation is R={(1,2),(2,3),(3,4)}R=\{(1,2),(2,3),(3,4)\}.

AB12323455 is in the codomain, not in the range
How to read the figure: each arrow is one ordered pair. The left discs that fire an arrow form the domain. The right discs that receive an arrow form the range. Disc 5 sits in the codomain only.

Look at the three arrows. They are the three pairs (1, 2), (2, 3) and (3, 4).

Every left disc fires, so the domain is the whole of A.

The right disc 5 has no arrow. It sits in the codomain, not in the range.

The range is {2,3,4}\{2,3,4\}. The unused 5 does not leave the codomain.

Three plotted points of the relation b = a + 1: (1, 2), (2, 3) and (3, 4) on a Cartesian grid from 0 to 5.

Look at the three points. The first coordinate is the input. The second coordinate is the output.

To recover the domain from a graph, read the first coordinates. To recover the range, read the second.

A product with 6 pairs has 26=642^{6}=64 subsets. Each subset is a relation.

That count includes the empty relation and the full product.

The empty relation has no arrows. Its domain is empty and its range is empty. It is still a legal subset.

You may describe a relation by a rule, by a list, or by a picture. All three must name the same pairs.

If the rule produces a pair whose second entry is outside B, drop that pair. The codomain is a hard wall.

The codomain is part of the given data. You cannot always read it off the outputs.

Why it matters: later “onto” compares range with codomain. If you confuse them, onto becomes meaningless.

Goal. Find the domain and range of {(2, 5), (3, 5), (4, 7)}.

Rule. Domain is the set of first entries. Range is the set of second entries. Repeats are listed once.

Substitution. First entries: 2, 3, 4. All distinct, so the domain is {2, 3, 4}.

That is 3 members.

Second entries: 5, 5, 7. The repeated 5 is one member of the range.

The range is {5,7}\{5,7\}, which has 2 members.

Check. Each listed pair uses a domain member and a range member. Nothing else appears.

Result: domain {2, 3, 4}; range {5, 7}.

Write two columns labelled first and second. Cross out repeated numbers in each column.
Do not call the range the codomain. The codomain is declared. The range is observed.

⚡ Quick Check Flashcards3 questions

Try each question yourself before reading the answers. Show the rule and every arithmetic step.

Question 1
From A={1,2,3}A=\{1,2,3\} to B={1,2,3,4}B=\{1,2,3,4\}, list the pairs with b=2ab=2a.
Try answering before revealing!
Question 2
What are the domain and range of that relation?
Try answering before revealing!
Question 3
How many relations exist from a 2-element set to a 3-element set?
Try answering before revealing!

Exercise 2.2 — Relations

175 words · 1 min read
⚡ Quick Check Flashcards5 questions

Try each question before reading its solution. Give a reason as well as a final value.

Question 1
Find the domain and range of {(0, 2), (1, 2), (1, 5)}. Is it a function on {0, 1}?
Try answering before revealing!
Question 2
If A={a,b}A=\{a,b\} and B={1,2,3}B=\{1,2,3\}, how many relations from A to B exist?
Try answering before revealing!
Question 3
Is the empty set a relation from a nonempty A to B?
Try answering before revealing!
Question 4
The rule b=a−1b=a-1 from {2,3,4}\{2,3,4\} to {1,2,3,5}\{1,2,3,5\}: list the pairs.
Try answering before revealing!
Question 5
In an arrow diagram, how do you read the range?
Try answering before revealing!

2.4 Functions

1,062 words · 5 min read

A function f:A→Bf:A\to B assigns exactly one element of B to every element of A.

We write f(x)=yf(x)=y for that unique output. A is the domain. B is the codomain.

Every input in A must be used. None may be used twice with different outputs.

The range can be smaller than B. Unused codomain values do not break the definition.

one-to-one12abmany-one123abone-many (not a fn)12abonto123ab
How to read the figure: one-to-one means no two left discs share a right disc. Many-one means they may. One-many is not a function. Onto means every right disc is used.

Look at the top left panel. Distinct inputs go to distinct outputs. That function is one-to-one.

Look at the top right panel. Two inputs share an output. That function is many-one.

Look at the bottom left panel. One input has two arrows. That is not a function. It is a one-many relation.

Look at the bottom right panel. Every right disc is hit. That function is onto the stated codomain.

For f:{1,2,3}→{2,4,6,8}f:\{1,2,3\}\to\{2,4,6,8\} with f(x)=2xf(x)=2x, the pairs are \{(1,2),(2,4),(3,6)\}.

The range is {2, 4, 6}. The unused 8 means the map is not onto this codomain. It is still a function, and it is one-to-one.

The number of functions from a 3-set to a 2-set is 23=82^3=8. Each input independently chooses one of two outputs.

Of those, 6 are onto. The two missing maps are the two constant functions.

A constant function is still a function. Every input has one output. That output just happens to be the same value.

Onto depends on the declared codomain. Shrink the codomain to the range and the same pairing becomes onto.

That is why you must write f : A → B in full. Changing B can change onto without touching a single pair.

When no domain is stated, take the real numbers for which the formula makes sense.

A denominator must be nonzero. An even root needs a nonnegative radicand.

For f(x)=x+3/(x−2)f(x)=\sqrt{x+3}/(x-2) both tests apply.

-5-4-3-2-10123456domain: [−3, 2) ∪ (2, ∞)−3 in2 out
How to read the figure: the filled disc at −3 is included because the square root is zero there. The hollow disc at 2 is a hole because the denominator is zero. Everything to the right of −3 is allowed except that hole.

Look at the filled disc at −3. The radicand x + 3 is zero there, which is allowed.

Look at the hollow disc at 2. The denominator is zero there, which is forbidden.

Solve x+3≥0x+3\ge 0: add −3 to both sides, or subtract 3, to get x≥−3x\ge -3.

Check the boundary: (−3)+3=0(-3)+3=0, so the square root is 0, which is fine.

The extra cut is x≠2x\ne 2, because 2−2=02-2=0.

So the domain is [−3,2)∪(2,∞)[-3,2)\cup(2,\infty).

012345678range: [3, ∞)
How to read the figure: 3 is the lowest output, drawn as a filled disc. Every larger real number is reached, so the bar runs to the right with an arrow. Nothing below 3 appears.

Range needs a separate argument. For g(x)=(x−2)2+3g(x)=(x-2)^2+3 on all reals, a square is at least 0.

The square is 0 at x = 2, so the smallest output is 0+3=30+3=3.

Every number greater than 3 is reached by some real x. The range is [3, ∞).

To prove 10 is in the range, solve (x − 2)² + 3 = 10. Then (x − 2)² = 7, which has two real roots. Either root is a valid preimage.

To prove 2 is not in the range, note that (x − 2)² + 3 is at least 3. 2 sits below that floor.

Each input, one output. Domain is “where the formula works”. Range is “which outputs actually appear”.

Why it matters: later graphs, composition and inverses all fail if the domain is wrong.

Goal. Find the domain of f(x)=x+3/(x−2)f(x)=\sqrt{x+3}/(x-2).

Rule. Keep the inside of the square root at least 0, and keep the denominator nonzero.

Substitution. Need x+3≥0x+3\ge 0 and x−2≠0x-2\ne 0.

From x+3≥0x+3\ge 0 subtract 3: x≥−3x\ge -3.

From x−2≠0x-2\ne 0 add 2: x≠2x\ne 2.

2 is greater than −3, so 2 sits inside the half-line and must be cut out.

Sample a point on the bar: at x = 1, 1+3/(1−2)=−2\sqrt{1+3}/(1-2)=-2. Defined.

Sample past the hole: at x = 6, 6+3/(6−2)=0.75\sqrt{6+3}/(6-2)=0.75. Defined.

Check. At x = −3 the value is 0/(−5)=00/(-5)=0. At x = 2 the formula is undefined.

Result: domain [−3,2)∪(2,∞)[-3,2)\cup(2,\infty).

Goal. If f(x)=2x+1f(x)=2x+1, find f(3)f(3).

Rule. Replace every x by the given input, then simplify.

Substitution. f(3)=2⋅3+1f(3)=2\cdot 3+1.

2⋅3=62\cdot 3=6.

Then 6+1=76+1=7.

Check. The unique pair with first entry 3 is (3,7)(3,7).

Result: f(3)=7f(3)=7.

To show a value is in a range, name an allowed input that produces it. To exclude a value, argue that no allowed input works.
A hole in a graph is not “almost in the domain”. If the formula fails at a point, that point is out.

⚡ Quick Check Flashcards3 questions

Cover the answers. Try each question on paper first. If an answer differs, find the step that split.

Question 1
Find the domain of 1/(x2−4)1/(x^2-4).
Try answering before revealing!
Question 2
Is f(x)=x2f(x)=x^2 a function on the reals, even though f(−2)=f(2)f(-2)=f(2)?
Try answering before revealing!
Question 3
Find the domain of 2x−6\sqrt{2x-6}.
Try answering before revealing!

2.4.1 Some Functions and their Graphs

979 words · 4 min read

The graph of f is the set of points (x,f(x))(x,f(x)) in the plane.

The vertical line test checks the function rule on a picture.

A vertical line must meet the graph in at most one point. A horizontal line may meet it more often.

The circle x squared plus y squared equals 4, drawn as an upper semicircle y = square root of 4 minus x squared and a lower semicircle y = the negative square root, on axes from −2.5 to 2.5. A dashed vertical line at x = 0 meets the circle twice.

Look at the dashed line x = 0. It hits the circle at (0, 2) and (0, −2). Two outputs, so the circle is not a function of x.

The same circle can still be a relation. Function-hood is extra structure, not a property of every curve.

FunctionUsual real domainRange
f(x)=xf(x)=xR\mathbb RR\mathbb R
f(x)=cf(x)=cR\mathbb R{c}\{c\}
f(x)=x2f(x)=x^2R\mathbb R[0,∞)[0,\infty)
f(x)=x3f(x)=x^3R\mathbb RR\mathbb R
f(x)=1/xf(x)=1/xR∖{0}\mathbb R\setminus\{0\}R∖{0}\mathbb R\setminus\{0\}
f(x)=∣x∣f(x)=|x|R\mathbb R[0,∞)[0,\infty)
f(x)=⌊x⌋f(x)=\lfloor x\rfloorR\mathbb RZ\mathbb Z

How to read the table: the middle column is the largest real domain for the usual formula. The last column is the set of outputs on that domain.

Graphs of y = x squared and y = absolute value of x on the interval from −3 to 3. The parabola opens upwards from the origin. The absolute-value graph is a V with its vertex at the origin.

Look at the parabola. It never goes below 0. Different x can share a height, so it is many-one.

Look at the V. That is y = |x|. It also stays nonnegative, but the shape is two rays, not a smooth U.

The modulus ∣x∣|x| equals x when x≥0x\ge 0, and equals −x when x<0x<0.

Check: ∣−7∣=7|-7|=7, ∣0∣=0|0|=0, ∣4∣=4|4|=4.

The signum function is −1 for negative inputs, 0 at zero, and 1 for positive inputs.

The greatest integer (floor) ⌊x⌋\lfloor x\rfloor is the greatest integer that is still ≤x\le x.

xy[−1,0)[0,1)[1,2)[2,3)floor jumps at each integer
How to read the figure: on each half-open interval [n, n+1) the graph is the constant height n. The left end of a step belongs. The right end belongs to the next step.

Look at a step. The filled disc is the left end. The hollow disc is the right end, which belongs to the next step.

On [n,n+1)[n,n+1) the graph is the constant n. The range of floor on the reals is Z\mathbb Z.

For a negative input, rounding toward zero is not the floor. ⌊−1.2⌋=−2\lfloor -1.2\rfloor=-2, because −2 is the greatest integer that is still ≤−1.2\le -1.2.

Graph of y = 1/x on the intervals from −4 to −0.2 and from 0.2 to 4, showing two branches that never meet the y-axis.

Look at y = 1/x. There is a gap at x = 0. The domain is R∖{0}\mathbb R\setminus\{0\}. The two branches never meet.

A cube x3x^3 keeps sign: (−2)3=−8(-2)^3=-8 and 23=82^3=8. Its graph passes the vertical line test and is onto R\mathbb R.

The identity graph is the line y = x. The constant graph is a horizontal line. A horizontal line fails the horizontal test for one-to-one, but it still passes the vertical test.

One-to-one is a later extra. Function-hood is only the vertical rule.

A graph is a function of x only if no vertical line hits it twice.

Why it matters: the picture is a set of pairs. The vertical line test is the function rule drawn in the plane.

Goal. Evaluate ⌊3.9⌋+⌊−3.9⌋\lfloor 3.9\rfloor+\lfloor -3.9\rfloor.

Rule. Floor is the greatest integer that is not larger than the input.

Substitution. Integers next to 3.9 are 3 and 4. 4 is larger than 3.9, so floor of 3.9 is 3.

Integers next to −3.9 are −4 and −3. The number −3 is greater than −3.9, so it is not allowed.

The greatest allowed integer is −4. Floor of −3.9 is −4.

Add: 3+(−4)=−13+(-4)=-1.

Check. 3 ≤ 3.9 < 4 and −4 ≤ −3.9 < −3, which matches the step picture.

Result: ⌊3.9⌋+⌊−3.9⌋=−1\lfloor 3.9\rfloor+\lfloor -3.9\rfloor=-1.

For a negative non-integer, move left on the number line to the next integer, not toward zero.
Do not treat floor as “drop the decimal” for negative inputs. Dropping the decimal of −3.9 would give −3, which is too large.

⚡ Quick Check Flashcards3 questions

Work these on paper with the answers hidden. Compare your steps with the printed working.

Question 1
Evaluate ∣−7∣|-7|, sgn⁡(0)\operatorname{sgn}(0) and ⌊−2.6⌋\lfloor -2.6\rfloor.
Try answering before revealing!
Question 2
Why does x2+y2=4x^2+y^2=4 fail the vertical line test?
Try answering before revealing!
Question 3
State the range of f(x)=∣x∣f(x)=|x| on R\mathbb R.
Try answering before revealing!

2.4.2 Algebra of Real Functions

933 words · 4 min read

You can add, subtract, multiply and divide two real functions. You can also feed one function into another.

If f and g are real functions, (f+g)(x)=f(x)+g(x)(f+g)(x)=f(x)+g(x) and (f−g)(x)=f(x)−g(x)(f-g)(x)=f(x)-g(x).

Also (fg)(x)=f(x)g(x)(fg)(x)=f(x)g(x). A scalar multiple (cf)(x)=c⋅f(x)(cf)(x)=c\cdot f(x).

The domain of a sum, difference or product is the intersection of the two domains.

For f/gf/g, also exclude inputs where g(x)=0.

Let f(x)=x+2f(x)=x+2 and g(x)=x−3g(x)=x-3 on the reals.

Then (f+g)(x)=(x+2)+(x−3)=2x−1(f+g)(x)=(x+2)+(x-3)=2x-1.

And (fg)(x)=(x+2)(x−3)=x2−x−6(fg)(x)=(x+2)(x-3)=x^2-x-6.

The quotient is (x+2)/(x−3)(x+2)/(x-3) with x≠3x\ne 3.

At x = 5 the sum is (5+2)+(5−3)=9(5+2)+(5-3)=9.

At x = 4 the product is (4+2)(4−3)=6(4+2)(4-3)=6.

At x = 5 the quotient is (5+2)/(5−3)=3.5(5+2)/(5-3)=3.5.

-1012345domain of √x + 1/(x−1)
How to read the figure: square root needs x at least 0, so the bar starts at a filled 0. Division forbids x = 1, so a hole sits at 1. The two pieces are [0, 1) and (1, ∞).

Look at the number line for h(x)=x+1/(x−1)h(x)=\sqrt x+1/(x-1). Square root needs x≥0x\ge 0. Division forbids x = 1.

The filled disc at 0 is included. The hole at 1 is excluded. Domain [0, 1) ∪ (1, ∞).

The composition f∘gf\circ g means “g first, then f”. In symbols (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)).

xgg(x)ff(g(x))625Sample: g(x)=x−4, f(x)=2x+1, x=6
How to read the figure: the inner function g acts first. Its output becomes the input of f. Follow the sample row: 6 becomes 2, then 2 becomes 5.

Look at the two boxes. The input meets g first. The output of g is the input of f.

Look at the sample row. 6 becomes 2 under g. Then 2 becomes 5 under f.

With g(x)=x−4g(x)=x-4 and f(x)=2x+1f(x)=2x+1, expand: f(g(x))=2(x−4)+1=2x−8+1=2x−7f(g(x))=2(x-4)+1=2x-8+1=2x-7.

Check at 6: g(6)=6−4=2g(6)=6-4=2. Then f(2)=2⋅2+1=5f(2)=2\cdot 2+1=5.

The expanded formula: 2⋅6−7=52\cdot 6-7=5. Both routes agree.

The other order g∘fg\circ f is different: g(f(x))=(2x+1)−4=2x−3g(f(x))=(2x+1)-4=2x-3.

Inner function first. Do not swap f and g unless the question does.

The identity function on a set A sends each member to itself: I(x)=xI(x)=x.

A function has an inverse when it is one-to-one and onto the stated codomain.

Then you may reverse every arrow. The reverse is a function, and the two compositions are the identity.

finverse of f123231231123identity after both: 1→1, 2→2, 3→3Swap arrows only when f is one-to-one and onto.
How to read the figure: the inverse diagram is the same arrows with direction swapped. After both machines run, every input returns to itself. That pair of maps is the identity on {1, 2, 3}.

Look at the left map: 1 → 2 → 3 → 1. Every disc is used once. The map is one-to-one and onto.

Look at the right map: each arrow is reversed. 2 → 1, 3 → 2, 1 → 3.

After both maps, 1 returns to 1, 2 to 2, 3 to 3. That is the identity on {1, 2, 3}.

On the reals, f(x)=x+3f(x)=x+3 has inverse f−1(x)=x−3f^{-1}(x)=x-3, because adding 3 and subtracting 3 cancel.

Cancelling a factor does not restore an excluded input. (x2−4)/(x−2)(x^2-4)/(x-2) equals x + 2 only when x≠2x\ne 2.

At x = 2 the original fraction has a zero denominator. The simplified line is defined there. Those are two different functions.

When you compose, the output of the inner map must lie in the domain of the outer map. Otherwise the composite is undefined at that input.

The domain of f∘gf\circ g is the set of x in the domain of g for which g(x) sits in the domain of f.

Why it matters: composition is how later chain rules work. Inverse is how you undo a one-to-one rule.

Goal. For f(x)=2x+1f(x)=2x+1 and g(x)=x−4g(x)=x-4, find f(g(x))f(g(x)) and f(g(6))f(g(6)).

Rule. Replace x in f by the whole expression g(x)g(x). Then substitute the number.

Substitution. f(g(x))=2(x−4)+1f(g(x))=2(x-4)+1.

Expand: 2⋅x−2⋅4+1=2x−8+12\cdot x-2\cdot 4+1=2x-8+1.

2x−8+1=2x−72x-8+1=2x-7, so f(g(x))=2x−7f(g(x))=2x-7.

Now the number: g(6)=6−4=2g(6)=6-4=2.

f(2)=2⋅2+1=4+1=5f(2)=2\cdot 2+1=4+1=5.

Formula check: 2⋅6−7=12−7=52\cdot 6-7=12-7=5.

Check. Both routes give 55.

Result: f(g(x))=2x−7f(g(x))=2x-7 and f(g(6))=5f(g(6))=5.

Write a small table: x, g(x), f(g(x)). Fill it left to right. Then expand the letters.
Do not cancel a factor and then plug in the excluded root. The cancelled form has a larger domain.

⚡ Quick Check Flashcards3 questions

Try each question yourself before reading the answers. Show the rule and every arithmetic step.

Question 1
With f(x)=x+2f(x)=x+2 and g(x)=x−3g(x)=x-3, find (f−g)(5)(f-g)(5) and (fg)(4)(fg)(4).
Try answering before revealing!
Question 2
With the same f and g as the worked example, find g(f(3))g(f(3)).
Try answering before revealing!
Question 3
Find the domain of f+gf+g if f(x)=xf(x)=\sqrt x and g(x)=1/(x−1)g(x)=1/(x-1).
Try answering before revealing!

Exercise 2.3 — Functions and graphs

172 words · 1 min read
⚡ Quick Check Flashcards6 questions

Try each question before reading its solution. Give a reason as well as a final value.

Question 1
Is {(0, 1), (1, 1), (2, 1)} a function on {0, 1, 2}?
Try answering before revealing!
Question 2
Find the domain and range of x−4\sqrt{x-4}.
Try answering before revealing!
Question 3
Find ⌊1.7⌋+⌊−1.7⌋\lfloor 1.7\rfloor+\lfloor -1.7\rfloor.
Try answering before revealing!
Question 4
Let f(x)=x2f(x)=x^2 and g(x)=x+1g(x)=x+1. Write f/g and its domain.
Try answering before revealing!
Question 5
If f(x)=3x−1f(x)=3x-1 and g(x)=x+2g(x)=x+2, find f(g(x))f(g(x)).
Try answering before revealing!
Question 6
Can a function from a 3-element set onto a 4-element set exist?
Try answering before revealing!

Miscellaneous Exercise — Chapter 2

297 words · 1 min read
⚡ Quick Check Flashcards10 questions

Try each question before reading its solution. Give a reason as well as a final value.

Question 1
Find the range of h(x)=5−(x+1)2h(x)=5-(x+1)^2 on R\mathbb R.
Try answering before revealing!
Question 2
Find the domain of 9−x2\sqrt{9-x^2}.
Try answering before revealing!
Question 3
Can a function have a domain with three elements and a range with four elements?
Try answering before revealing!
Question 4
If A has three elements and B has two, how many functions A→BA\to B exist?
Try answering before revealing!
Question 5
How many of those functions are onto?
Try answering before revealing!
Question 6
List R={(x,y)∈{1,2,3}×{1,2,3,4}:y=2x}R=\{(x,y)\in\{1,2,3\}\times\{1,2,3,4\}:y=2x\}.
Try answering before revealing!
Question 7
For f(x)=x+3f(x)=x+3, write an inverse and check f−1(f(2))f^{-1}(f(2)).
Try answering before revealing!
Question 8
Find (f+g)(5)(f+g)(5) if f(x)=x+2f(x)=x+2 and g(x)=x−3g(x)=x-3.
Try answering before revealing!
Question 9
State the vertical line test in one sentence.
Try answering before revealing!
Question 10
Why is (x2−4)/(x−2)(x^2-4)/(x-2) not the same function as x+2x+2 on all reals?
Try answering before revealing!

Summary and Historical Note

487 words · 2 min read
  • A Cartesian product lists all ordered pairs from two sets. Order inside a pair matters.
  • A relation is any subset of a product. Domain uses first entries. Range uses second entries. Codomain is declared.
  • A function assigns exactly one output to every input in its domain.
  • One-to-one means distinct inputs have distinct outputs. Onto means the range equals the stated codomain.
  • Real formulas need domain tests: no zero denominator, and even roots need a nonnegative inside.
  • Graphs pass the vertical line test. Composition applies the inner function first. An inverse reverses a one-to-one onto map.
pairsrelationfunctioninversexyOne arrow leaves each allowed input.
How to read the figure: a Cartesian product lists every ordered pair. A relation picks some pairs. A function picks so that each input has one pair. An inverse exists only when that choice is one-to-one and onto.

Look at the four boxes. Pairs come first. A relation selects pairs. A function selects with the one-output rule. An inverse needs a bijection.

Look at the small map under the row. One arrow leaves the input. That picture is the definition.

The language of functions grew with the study of curves and change.

Leibniz used the word in the late seventeenth century for a quantity that depends on another.

Johann Bernoulli helped tie the word to an expression in a variable.

The modern school definition is broader. A function is a rule of assignment. It need not be one algebraic formula.

Dirichlet later stressed that the rule may be described in pieces, as long as each input still has one output.

You do not need that history to compute a domain. It explains why “formula” and “function” are not synonyms.

After this chapter you should list a product, read domain and range, test function-hood, and find a real domain.

You should also evaluate f(g(x)) by expansion and by substitution, and reverse a bijection.

A short checklist helps. First write the pair list or the formula. Then name domain, codomain and range as three possibly different sets.

Next count arrows leaving each input. Zero or two means “not a function”. One arrow each means “function”.

Then ask one-to-one and onto as extra questions. Do not mix them with the first test.

For a formula, solve the inequalities for roots and holes before you sketch. Mark included ends with filled discs.

For a composition, build a three-column table: x, inner value, outer value. Expand letters only after one number has been checked.

Why it matters: every later “let f be a real function” assumes this chapter’s tests.
When stuck, draw the arrow diagram. Count arrows leaving each input. Then write the pair list.
Never swap range and codomain, and never swap the order of a composition. Both mistakes change the object.
Up next
Continue to the next chapter