←
Class 12 Mathematics
1. Relations and Functions · 1 / 13
⌕
Chapter 1 of 13

1. Relations and Functions

9 sections · 11,499 words

1.1 Chapter Opener: Big Idea, Prerequisite Check and Historical Roots

1,969 words · 9 min read

Chapter 1

Relations and Functions

Big idea: a relation says which things are connected. A function is a relation with a promise: each input has exactly one output. That promise lets you predict, compare, and sometimes undo.

Look at a school roll-number list. Each roll number points to exactly one student. No roll number points to two students, and no student has two roll numbers. That is the whole chapter in one picture: some connections are loose, and some keep a strict promise.

This chapter turns that picture into mathematics. First you will see what a connection means as a set of pairs. Then you will sort connections by three testable habits: reflexive, symmetric and transitive. The connections with all three habits are called equivalence relations, and they split a set into neat groups. Then you will meet functions, first as strict connections and then as formulas, and learn the two function habits one-one and onto. Finally you will chain functions and undo them.

  • 1.1 writes connections as pairs and counts them, then states the function promise.
  • 1.2 tests relations for the three habits and builds groups called equivalence classes.
  • 1.3 tests functions as one-one, onto or both, and counts the functions on small sets.
  • 1.4 chains two functions into one and finds the undo rule, called the inverse.
How to study this chapter. Read slowly and test each definition on a tiny set such as {1, 2, 3}. Draw dots for pairs and arrows for maps. Every worked example shows each step with its reason, and each section ends with checks whose answers explain the step you may have missed.

A school keeps a roll-number list. Roll number 1 belongs to one student, roll number 2 to another, and so on. Nobody shares a roll number, and nobody has two. A phone contact list works the same way: each saved name calls exactly one number. These everyday lists already contain the two ideas of this chapter.

A shop lists three phone models. Each model comes in some of three colours. If you write down "model 1 comes in colour 2", you have written one connection between two things. A list of such connections is called a relation. Relations are everywhere: a timetable links classes to rooms, a menu links dishes to prices, a map links towns to roads.

An ordered pair (a,b)(a, b) is two things written in a fixed order. The order matters: (1,2)(1, 2) is not the same pair as (2,1)(2, 1). Think of a cinema seat: row 1, seat 2 is a different seat from row 2, seat 1. If AA and BB are sets, the Cartesian product A×BA \times B is the set of all ordered pairs with the first item from AA and the second from BB.

Let A={1,2,3}A = \{1, 2, 3\} be the phone models and B={1,2,3}B = \{1, 2, 3\} the colours (1 = black, 2 = silver, 3 = blue). Then A×BA \times B has 3×3=93 \times 3 = 9 pairs. In general, if AA has mm items and BB has nn items, then A×BA \times B has m×nm \times n pairs. The small 2×22 \times 2 case has 44 pairs, which you can list by hand to check the rule.

ModelBlack (1)Silver (2)Blue (3)
Model 1YesYes—
Model 2—Yes—
Model 3YesYesYes

Read the table row by row. Model 1 has two marks, model 2 has one mark, and model 3 has three marks. Each mark is one connection. The table and the pair list below say exactly the same thing in two layouts.

A relation RR from AA to BB is any subset of A×BA \times B. Suppose the shop sells model 1 in black and silver, model 2 only in silver, and model 3 in all three colours. Then

R={(1,1),(1,2),(2,2),(3,1),(3,2),(3,3)}R = \{(1, 1), (1, 2), (2, 2), (3, 1), (3, 2), (3, 3)\}

We write (a,b)∈R(a, b) \in R, or a R ba \, R \, b, when the pair is in the relation. Because A×BA \times B has 9 pairs and each pair is either in RR or out of RR, there are 29=5122^{9} = 512 possible relations from AA to BB. Each of the 99 positions is a yes-or-no choice, so the count is 22 multiplied by itself 99 times.

The relation R as dots on the grid of A × B. Each dot is one pair in R.

Read the figure one dot at a time. Move along the horizontal axis to a model, then up to a colour. A dot means the shop sells that combination. Model 1 has two dots above it, so it comes in two colours. Model 2 has one dot. Dots never move: the picture is the relation.

Look at model 1 in the relation above. It has two colours, so if someone asks "what is the colour of model 1?" there is no single answer. A function removes this problem. It is a relation in which each input has exactly one output.

Now suppose each model has one default colour: model 1 is black, model 2 is silver, model 3 is black. This is F={(1,1),(2,2),(3,1)}F = \{(1, 1), (2, 2), (3, 1)\}. Every model appears exactly once as a first item, so FF is a function. We write F(1)=1F(1) = 1, F(2)=2F(2) = 2, F(3)=1F(3) = 1. Its range, the outputs that really happen, is {1,2}\{1, 2\}: colour 33 is allowed but never used.

2double, add 1f5each input gives one output
A function as a machine: one input value enters, exactly one output value leaves.

Read the diagram from left to right. The number 2 enters the box. Inside, the rule doubles it and adds 1. The number 5 leaves. Feed the same 2 again tomorrow and the same 5 comes out. That repeatability is the function promise.

In simple words: a relation can connect one input to many outputs. A function cannot. A function is like a vending machine: one button always gives one item.

Goal: decide whether two small lists are functions from {1,2,3}\{1, 2, 3\} to {1,2,3}\{1, 2, 3\}. Given: R={(1,1),(1,2),(2,2),(3,1),(3,2),(3,3)}R = \{(1, 1), (1, 2), (2, 2), (3, 1), (3, 2), (3, 3)\} and F={(1,1),(2,2),(3,1)}F = \{(1, 1), (2, 2), (3, 1)\}.

Step 1: count how often each input appears as a first item. In R, the input 1 appears twice, in (1, 1) and (1, 2). Step 2: apply the promise. Because 1 has two outputs, R breaks the promise, so R is not a function. Step 3: repeat for F. Each of 1, 2 and 3 appears exactly once, so F is a function. Conclusion: R is a relation only, while F is also a function. The computer check agrees: R fails the function test and F passes it.

Step 4, a sharper edge: the list {(1, p), (2, q)} on inputs {1, 2, 3} is not a function either, because input 3 never appears. A function needs every input to appear exactly once: no repeats and no gaps.

The function F as dots. Each input has exactly one dot above it: the function promise made visible.

Compare the two dot pictures. In the R picture, model 1 has two dots stacked above it. In the F picture, every input has exactly one dot. That single difference is the whole idea of a function.

Common mistake: calling any rule with an output a function. The rule "give a colour the model comes in" has two answers for model 1, so it is not a function. Always ask: does any input give two different outputs, or no output at all?

⚡ Quick Check Flashcards3 questions

Answer in one sentence each, then compare with the answers below.

Question 1
[Concept] List all 4 pairs of {1,2}×{p,q}\{1, 2\} \times \{p, q\}.
Try answering before revealing!
Question 2
[Board Standard] On inputs {1,2,3}\{1, 2, 3\} with outputs {p,q}\{p, q\}, is {(1,p),(2,q)}\{(1, p), (2, q)\} a function? Give the reason.
Try answering before revealing!
Question 3
[HOTS] For F={(1,1),(2,2),(3,1)}F = \{(1, 1), (2, 2), (3, 1)\}, what is the range? Which allowed colour is never used?
Try answering before revealing!

⚡ Quick Check Flashcards3 questions

Try these on paper. Each answer shows the step you may have missed.

Question 1
[Concept] On inputs {1,2}\{1, 2\} with outputs {p,q}\{p, q\}, is {(1,p),(2,p)}\{(1, p), (2, p)\} a function? If yes, list its range.
Try answering before revealing!
Question 2
[Board Standard] A contact list maps two names to numbers: {(A,7),(B,7)}\{(A, 7), (B, 7)\}. One number is shared. Is it still a function?
Try answering before revealing!
Question 3
[HOTS] How many pairs does {1,2,3,4}×{a,b}\{1, 2, 3, 4\} \times \{a, b\} have? Write the count as a product first.
Try answering before revealing!

In this chapter you will learn:

  • the main types of relations: reflexive, symmetric, transitive, and the very useful equivalence relation;
  • the main types of functions: one-one, onto, and bijective;
  • composition: doing one function after another;
  • inverse functions: when a function can be undone, and how to find the undo rule.

The idea of a function grew slowly over about three hundred years. Each step made it wider than the one before. What you use today as one short definition took many generations to sharpen.

  • 1637: René Descartes used the word "function" for powers of a variable, such as x2x^2 and x3x^3, while studying curves like the parabola and the hyperbola.
  • 1667: James Gregory described a function as a quantity obtained from other quantities by algebraic steps, or by "any other operation".
  • 1673 and 1714: Gottfried Wilhelm Leibniz (1646–1716) first used the word for quantities that change from point to point along a curve, such as a slope. Later he used it for any quantity that depends on a variable, and he was the first to say "function of xx".
  • 1718: Johann Bernoulli (1667–1748) wrote ϕx\phi x for a function of xx.
  • 1734: Leonhard Euler (1707–1783) made letters such as ff, FF, ϕ\phi and ψ\psi the normal way to name functions. The form f(x)f(x) that you use today comes from this period.
  • 1837: Peter Gustav Lejeune Dirichlet (1805–1859) gave a very wide definition: a function is any rule that gives one yy for each xx. No formula is needed.
  • Later: after Georg Cantor (1845–1918) built set theory, a function could be defined as a set of ordered pairs with the "one output for each input" property.

Look back at Section 1.1. The definition in this chapter, a function as a special set of ordered pairs, is the last step of this long story. Dirichlet freed the function from formulas, and Cantor gave it a home in sets. Your dot pictures of Section 1.1 are that final idea drawn on paper.

1.2 Types of Relations and Equivalence Classes

1,687 words · 8 min read

From now on we study relations inside one set: a relation RR in a set XX is a subset of X×XX \times X. This is how we compare things of the same kind: numbers with numbers, lines with lines, words with words.

Think of a height chart for one class. "Is the same height as" compares student with student. "Is taller than" does the same. Both live inside one set, and both can be tested pair by pair. That test is this whole section.

  • [Board Standard] The empty relation has no pairs: R=∅R = \varnothing. Nothing is related to anything.
  • [HOTS] The universal relation has all pairs: R=X×XR = X \times X. Everything is related to everything.

  • [Concept] Reflexive: every item is related to itself. (a,a)∈R(a, a) \in R for every a∈Xa \in X.
  • [Board Standard] Symmetric: if aa is related to bb, then bb is related to aa. (a,b)∈R(a, b) \in R implies (b,a)∈R(b, a) \in R.
  • [HOTS] Transitive: if aa is related to bb and bb is related to cc, then aa is related to cc. (a,b)∈R(a, b) \in R and (b,c)∈R(b, c) \in R imply (a,c)∈R(a, c) \in R.

Think of "is the same height as". Everyone is the same height as themselves (reflexive). If A is the same height as B, then B is the same height as A (symmetric). If A matches B and B matches C, then A matches C (transitive). Compare "is taller than": it is transitive, but it is not reflexive and not symmetric.

A slow way to remember the three: reflexive looks in the mirror (each item with itself), symmetric looks both ways (every arrow has a return arrow), and transitive builds bridges (two short steps give one long step). Test them in that order and write the witness each time.

A relation that is reflexive, symmetric and transitive is called an equivalence relation. It says "these two items are the same in the way we care about". Same height, same colour, same remainder after dividing by 3: all of these are equivalence relations. An equivalence relation sorts a set into non-overlapping groups.

Take X={1,2,3,4,5,6}X = \{1, 2, 3, 4, 5, 6\} and test ten relations. The answers below were computed pair by pair.

RelationRule for a R ba \, R \, bReflexiveSymmetricTransitive
The empty relationno pair at allNoYesYes
The universal relationevery pairYesYesYes
Equala=ba = bYesYesYes
Less thana<ba < bNoNoYes
Less than or equala≤ba \le bYesNoYes
Dividesaa divides bbYesNoYes
Differ by exactly 1∣a−b∣=1|a - b| = 1NoYesNo
Differ by at most 1∣a−b∣≤1|a - b| \le 1YesYesNo
Add up to 7a+b=7a + b = 7NoYesNo
Same paritya−ba - b is evenYesYesYes

Read the table one row at a time. The "Equal" row says Yes three times: it is an equivalence relation. The "Less than" row says No, No, Yes: only transitivity holds. The "Same parity" row says Yes three times as well, so it is also an equivalence relation. Each Yes or No was found by testing every pair, not by guessing.

A surprise: the empty relation is symmetric and transitive. The rules say "if (a,b)(a, b) is in RR, then ...". With no pairs, the "if" never happens, so the rule can never be broken. But it is not reflexive, because (a,a)(a, a) is missing for every aa.

  • [Board Standard] To prove a property for a rule on all numbers, take general items (aa, bb, cc) and use the algebra of the rule.
  • [HOTS] To disprove a property, one counterexample is enough. Find one pair (or two linked pairs) where the rule fails.

Goal: test R={(1,1),(2,2),(1,2),(2,1)}R = \{(1, 1), (2, 2), (1, 2), (2, 1)\} on X={1,2,3}X = \{1, 2, 3\} for the three properties.

Step 1, reflexive: every item needs its own pair. The pairs (1, 1) and (2, 2) are present, but (3, 3) is missing. So R is not reflexive, with witness (3, 3). Step 2, symmetric: each pair needs its return. The pairs (1, 2) and (2, 1) return to each other, and the diagonal pairs return to themselves. So R is symmetric. Step 3, transitive: check every chain. The chain (1, 2) and (2, 1) needs (1, 1), which is present. The chain (2, 1) and (1, 2) needs (2, 2), which is present. All other chains stay on the diagonal. So R is transitive. Conclusion: not reflexive, but symmetric and transitive.

PropertyVerdictWitness
ReflexiveNo(3,3)(3, 3) is missing
SymmetricYesevery pair has its return
TransitiveYeseach chain lands on a present pair
The worked-example relation as dots. The empty diagonal spot at (3, 3) is exactly why reflexivity fails.

Read the figure against the table. The two off-diagonal dots come in a mirrored pair, so symmetry holds. The diagonal has dots at (1, 1) and (2, 2) but a gap at (3, 3), so reflexivity fails at exactly one witness. One gap is enough to fail.

Let RR be the relation on the set Z\mathbb{Z} of integers given by a R ba \, R \, b when a−ba - b is a multiple of 44. Show that RR is an equivalence relation.

  • [Concept] Reflexive: a−a=0=4×0a - a = 0 = 4 \times 0, which is a multiple of 44. So a R aa \, R \, a.
  • [Board Standard] Symmetric: suppose a−b=4ka - b = 4k for some integer kk. Then b−a=4(−k)b - a = 4(-k), which is also a multiple of 44. So b R ab \, R \, a.
  • [HOTS] Transitive: suppose a−b=4ka - b = 4k and b−c=4mb - c = 4m. Adding, a−c=4(k+m)a - c = 4(k + m), a multiple of 44. So a R ca \, R \, c.

All three hold, so RR is an equivalence relation. As a check, the computer tested every pair of the integers from −8-8 to 88 and agreed: reflexive Yes, symmetric Yes, transitive Yes. (The proof above covers all integers. The test covers this sample.)

On X={−3,−2,−1,0,1,2,3}X = \{-3, -2, -1, 0, 1, 2, 3\} let a R ba \, R \, b when a×b≥0a \times b \ge 0 (the product is zero or positive). It is reflexive, because a×a≥0a \times a \ge 0. It is symmetric, because a×b=b×aa \times b = b \times a. But it is not transitive: (−1,0)∈R(-1, 0) \in R because (−1)(0)=0≥0(-1)(0) = 0 \ge 0, and (0,1)∈R(0, 1) \in R because 0≥00 \ge 0. Yet (−1,1)∉R(-1, 1) \notin R, because (−1)(1)=−1<0(-1)(1) = -1 < 0. The number 00 links numbers that should not be linked.

Slow down on this counterexample. The two short steps both pass through 0, and 0 passes the test with everything. But the long step from -1 to 1 avoids 0 and fails. Transitivity demands that every two-step path has its shortcut, with no exceptions.

An equivalence relation sorts a set into groups. The equivalence class of aa, written [a][a], is the set of all items related to aa. Take X={1,2,3,4,5,6,7,8,9}X = \{1, 2, 3, 4, 5, 6, 7, 8, 9\} and let a R ba \, R \, b when a−ba - b is a multiple of 33 (same remainder when divided by 33). The classes are

  • [Concept] [1]={1,4,7}[1] = \{1, 4, 7\}
  • [Board Standard] [2]={2,5,8}[2] = \{2, 5, 8\}
  • [HOTS] [3]={3,6,9}[3] = \{3, 6, 9\}

Every item is in exactly one class, and different classes never overlap. We say the classes partition the set. This is why equivalence relations matter: they turn "same in some way" into clean groups. Days of the week work like this: every day number has a remainder when divided by 7, and the same remainder means the same weekday.

In simple words: an equivalence relation puts items into boxes, and two items are related exactly when they are in the same box.
Common mistake: checking only one property. "Reflexive and symmetric" is not enough for an equivalence relation. Transitivity is the one students forget, and it is the one that most often fails.

⚡ Quick Check Flashcards4 questions

Decide which of the three properties each relation has, and name one witness for each No.

Question 1
[Concept] On {1,2,3,4}\{1, 2, 3, 4\}: R={(1,1),(2,2),(3,3),(4,4),(1,2)}R = \{(1, 1), (2, 2), (3, 3), (4, 4), (1, 2)\}.
Try answering before revealing!
Question 2
[Board Standard] On {1,2,3}\{1, 2, 3\}: R={(1,2),(2,1),(1,1)}R = \{(1, 2), (2, 1), (1, 1)\}.
Try answering before revealing!
Question 3
[Board Standard] On {1,2,3,4}\{1, 2, 3, 4\}: a R ba \, R \, b when a+b=5a + b = 5.
Try answering before revealing!
Question 4
[HOTS] On {1,2,3,4}\{1, 2, 3, 4\}: a R ba \, R \, b when a≤ba \le b.
Try answering before revealing!

⚡ Quick Check Flashcards3 questions

Work these with the three-step habit: mirror first, then both-ways, then bridges.

Question 1
[Concept] On {1,2,3}\{1, 2, 3\}, test R={(1,1),(2,2),(3,3)}R = \{(1, 1), (2, 2), (3, 3)\} (equality). Is it an equivalence relation?
Try answering before revealing!
Question 2
[Board Standard] On {1,2,3}\{1, 2, 3\}, test R={(1,2),(2,1)}R = \{(1, 2), (2, 1)\}. Which properties hold?
Try answering before revealing!
Question 3
[HOTS] Give one pair that stops "is taller than" from being reflexive, and one pair that stops it from being symmetric.
Try answering before revealing!

1.3 Exercise 1.1: Relations and Equivalence

880 words · 4 min read

⚡ Quick Check Flashcards14 questions
Question 1
[Concept] On {1,2,3}\{1, 2, 3\}, let R={(1,1),(2,2),(3,3),(1,2),(2,1)}R = \{(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)\}. Which of the three properties does RR have? Is it an equivalence relation?
Try answering before revealing!
Question 2
[Concept] On X={1,2,3,4,5,6}X = \{1, 2, 3, 4, 5, 6\}, let a R ba \, R \, b when a×b<10a \times b < 10. Test the three properties.
Try answering before revealing!
Question 3
[Concept] On X={1,2,…,8}X = \{1, 2, \dots, 8\}, let a R ba \, R \, b when aa divides bb. Test the three properties.
Try answering before revealing!
Question 4
[Concept] On the integers from −6-6 to 66, let a R ba \, R \, b when a−ba - b is a multiple of 55. Show that it is an equivalence relation and list the equivalence classes. What is the class of 00?
Try answering before revealing!
Question 5
[Board Standard] How many relations on a set of 33 items are (a) reflexive, (b) symmetric, (c) equivalence relations?
Try answering before revealing!
Question 6
[Board Standard] On the set of all straight lines in a plane, let "ll is perpendicular to mm" be the relation. Which properties does it have?
Try answering before revealing!
Question 7
[Board Standard] On the words {cat,dog,tree,bird,sun,moon}\{\text{cat}, \text{dog}, \text{tree}, \text{bird}, \text{sun}, \text{moon}\}, let two words be related when they have the same number of letters. Show it is an equivalence relation and find the classes.
Try answering before revealing!
Question 8
[Board Standard] On {−2,−1,0,1,2}\{-2, -1, 0, 1, 2\}, let a R ba \, R \, b when a2=b2a^2 = b^2. Is RR an equivalence relation? Find its classes.
Try answering before revealing!
Question 9
[Board Standard] On the real numbers, let a R ba \, R \, b when a−ba - b is an integer. Show that RR is an equivalence relation. Which of 0.250.25, 1.251.25, 3.253.25, 0.50.5, 2.52.5 are in the same class?
Try answering before revealing!
Question 10
[Board Standard] How many equivalence relations on {1,2,3}\{1, 2, 3\} contain the pair (1,2)(1, 2)?
Try answering before revealing!
Question 11
[HOTS] On {1,2,3,4}\{1, 2, 3, 4\}, let a R ba \, R \, b when a−ba - b is even. Show it is an equivalence relation and list the classes.
Try answering before revealing!
Question 12
[HOTS] On {1,2,3}\{1, 2, 3\}, let R={(1,1),(2,2),(3,3),(1,3)}R = \{(1, 1), (2, 2), (3, 3), (1, 3)\}. Test the three properties with witnesses.
Try answering before revealing!
Question 13
[HOTS] A set has 22 items. How many of its relations are reflexive? How many are symmetric?
Try answering before revealing!
Question 14
[HOTS] On {1,2,…,8}\{1, 2, \dots, 8\}, let a R ba \, R \, b when a−ba - b is a multiple of 44. List the equivalence classes and their sizes.
Try answering before revealing!

1.4 Types of Functions: Injective, Surjective and Bijective Maps

1,899 words · 9 min read

A ticket machine sells seats for one show. You press seat number 12 and the machine prints exactly one ticket. It never prints two tickets for one press, and it never eats your press without printing. That strict behaviour is a function. A display board that lists every film showing in hall 2, by contrast, may list three films: one input with three outputs is a relation, not a function.

A function ff from a set XX to a set YY is written f:X→Yf : X \to Y. The set XX is the domain (the allowed inputs). The set YY is the codomain (where outputs are allowed to live). The range is the set of outputs that actually happen, and it can be smaller than the codomain.

Example: let f:R→Rf : \mathbb{R} \to \mathbb{R} be f(x)=x2f(x) = x^2. The domain and codomain are both R\mathbb{R}. But no square is negative, so the range is only [0,∞)[0, \infty). The codomain is the waiting room; the range is who actually shows up.

3times 2, add 3g9one input, one output
The times-2-then-add-3 machine: input 3 gives output 9, and the same input always gives the same output.

Read the diagram as a promise. The 3 goes in, the rule works, and 9 comes out. Put 3 in again and 9 comes out again. If a machine sometimes gave 9 and sometimes 10 for the same 3, it would break the promise and stop being a function.

Two questions decide what kind of function we have. Both are about the outputs:

  • [Board Standard] One-one (injective): do different inputs always give different outputs? Nothing is shared.
  • [HOTS] Onto (surjective): is every item of the codomain actually used as an output? Nothing is left out.

In symbols, ff is one-one when f(a)=f(b)f(a) = f(b) forces a=ba = b. And ff is onto when for every yy in the codomain there is some xx in the domain with f(x)=yf(x) = y. A function that is both is called bijective: a perfect pairing of the domain with the codomain.

Let the domain be {1,2,3}\{1, 2, 3\} and the codomain {a,b,c}\{a, b, c\}.

FunctionPairsOne-one?Onto?
f1f_1{(1,a),(2,b),(3,c)}\{(1, \text{a}), (2, \text{b}), (3, \text{c})\}YesYes
f2f_2{(1,a),(2,a),(3,b)}\{(1, \text{a}), (2, \text{a}), (3, \text{b})\}NoNo

f1f_1 pairs everything perfectly, so it is bijective. In f2f_2, the inputs 11 and 22 both go to aa (not one-one), and cc is never used (not onto). Read the table as a pairing game: f1f_1 uses every letter exactly once, while f2f_2 reuses aa and wastes cc.

  • [Concept] One-one: assume f(a)=f(b)f(a) = f(b) and show that a=ba = b. To show it is not one-one, find two different inputs with the same output.
  • [Board Standard] Onto: take any yy in the codomain and try to solve f(x)=yf(x) = y for xx. If you always find an xx in the domain, the function is onto. To show it is not onto, find one yy that no input can reach.
  • [HOTS] Graph test: draw horizontal lines. If some horizontal line meets the graph twice, the function is not one-one. If some horizontal line in the codomain meets the graph never, it is not onto.

Show that f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=3x+2f(x) = 3x + 2 is bijective.

One-one. Suppose f(a)=f(b)f(a) = f(b). Then 3a+2=3b+23a + 2 = 3b + 2, so 3a=3b3a = 3b, so a=ba = b.

Onto. Take any real yy. Solving 3x+2=y3x + 2 = y gives x=y−23x = \frac{y - 2}{3}, which is a real number. And f ⁣(y−23)=yf\!\left(\frac{y-2}{3}\right) = y. So every yy is reached.

The line y = 3x + 2 meets every horizontal line exactly once: one input per output, so it is bijective.

Read the figure with the horizontal-line test. The dashed line y=5y = 5 meets the graph exactly once, at (1,5)(1, 5). Every other horizontal line behaves the same way: exactly one meeting point. One meeting point per line is the picture of bijective.

Is f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2 one-one? Is it onto?

Not one-one: f(−2)=4f(-2) = 4 and f(2)=4f(2) = 4. Two different inputs share one output. Not onto: every square is 00 or more, so no input gives −1-1. The graph shows both problems at once.

The line y = 4 meets the parabola twice, so f is not one-one. No line below the x-axis meets it at all, so f is not onto the real numbers.

Read this figure against the previous one. Here the dashed line meets the curve twice, so one-one fails. Below the horizontal axis there are no meeting points at all, so onto fails too. Two failures, one picture.

Fixing it. Whether a function is one-one or onto depends on its domain and codomain, so we can repair it. Let g:[0,∞)→[0,∞)g : [0, \infty) \to [0, \infty), g(x)=x2g(x) = x^2. Now each output y≥0y \ge 0 comes from exactly one input, x=yx = \sqrt{y}. So gg is bijective.

Common mistake: saying "x2x^2 is not onto" without naming the codomain. It is onto [0,∞)[0, \infty) and it is not onto R\mathbb{R}. Always check the codomain that was given.

The function f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x3f(x) = x^3 is bijective. It rises all the way along the real line, so no output repeats (one-one). And every real yy has a real cube root, so every yy is reached (onto). The computer confirms the steady rise on [−5,5][-5, 5] and the exact undo pairing with the cube-root rule.

Show that f:R−{3}→R−{2}f : \mathbb{R} - \{3\} \to \mathbb{R} - \{2\}, f(x)=2x+1x−3f(x) = \frac{2x + 1}{x - 3} is bijective.

One-one. Suppose f(a)=f(b)f(a) = f(b). Then 2a+1a−3=2b+1b−3\frac{2a + 1}{a - 3} = \frac{2b + 1}{b - 3}. Cross-multiply: (2a+1)(b−3)=(2b+1)(a−3)(2a + 1)(b - 3) = (2b + 1)(a - 3). Expand both sides: 2ab−6a+b−3=2ab−6b+a−32ab - 6a + b - 3 = 2ab - 6b + a - 3. Cancel 2ab2ab and −3-3: −6a+b=−6b+a-6a + b = -6b + a, so 7b=7a7b = 7a, so a=ba = b.

Onto. Let y≠2y \ne 2. Solve y=2x+1x−3y = \frac{2x + 1}{x - 3}: y(x−3)=2x+1y(x - 3) = 2x + 1, so x(y−2)=3y+1x(y - 2) = 3y + 1, so x=3y+1y−2x = \frac{3y + 1}{y - 2}. This is defined because y≠2y \ne 2. And it is never 33 (if it were, 3y+1=3y−63y + 1 = 3y - 6, which is impossible). So every y≠2y \ne 2 is reached. At x=0x = 0 the value is −0.3333-0.3333, and at x=5x = 5 it is 5.55.5: two anchor points the graph must pass through.

The two branches of f(x) = (2x + 1) / (x − 3). The dashed lines x = 3 and y = 2 are never reached: they are the missing input and the missing output.

Read the figure for what is missing, not only for what is drawn. The vertical dashed line is the forbidden input 3: no point of the graph touches it. The horizontal dashed line is the unreachable output 2: no point reaches it. Remove exactly those two lines from both axes and every remaining output is reached exactly once.

Let the domain have mm items and the codomain nn items. Each input can go to any of nn outputs, so there are nmn^m functions in all. For one-one functions, the first input has nn choices, the next has n−1n - 1 (it cannot repeat), and so on: n(n−1)(n−2)⋯(n−m+1)n(n - 1)(n - 2) \cdots (n - m + 1) functions. The table was found by listing every function by computer.

Domain size mmCodomain size nnAll functionsOne-oneOntoBijective
223399660000
33332727666666
335512512560600000
4422161600141400
4433818100363600
55332432430015015000
  • [Concept] If m>nm > n there is no one-one function: too many inputs for too few outputs (the "pigeonhole idea").
  • [Board Standard] If m<nm < n there is no onto function: too few inputs to reach every output.
  • [HOTS] A bijection needs m=nm = n. When m=nm = n, the number of bijections is n!n! (the table shows 3!=63! = 6).

Read one row as a story. From 33 items to 55 items there are 125125 functions, but only 6060 are one-one and none are onto: five outputs cannot be covered by three inputs. From 44 items to 22 items, 1414 of the 1616 functions are onto. The computer listed all of them.

⚡ Quick Check Flashcards4 questions

Domain {1,2,3,4}\{1, 2, 3, 4\}. For each map, say if it is one-one, onto, both or neither.

Question 1
[Concept] 1→p,  2→q,  3→r,  4→s1 \to p, \; 2 \to q, \; 3 \to r, \; 4 \to s, codomain {p,q,r,s}\{p, q, r, s\}.
Try answering before revealing!
Question 2
[Board Standard] 1→p,  2→q,  3→r,  4→r1 \to p, \; 2 \to q, \; 3 \to r, \; 4 \to r, codomain {p,q,r}\{p, q, r\}.
Try answering before revealing!
Question 3
[Board Standard] 1→p,  2→q,  3→r,  4→s1 \to p, \; 2 \to q, \; 3 \to r, \; 4 \to s, codomain {p,q,r,s,t}\{p, q, r, s, t\}.
Try answering before revealing!
Question 4
[HOTS] Every input goes to pp, codomain {p,q,r}\{p, q, r\}.
Try answering before revealing!

⚡ Quick Check Flashcards4 questions

Use the two-question habit on each map: shared outputs first, then unused outputs.

Question 1
[Concept] Show that g:R→Rg : \mathbb{R} \to \mathbb{R}, g(x)=2x+3g(x) = 2x + 3 is bijective. Which input gives the output 1111?
Try answering before revealing!
Question 2
[Board Standard] On inputs {1,2}\{1, 2\} with codomain {a,b}\{a, b\}, classify 1→a,  2→a1 \to a, \; 2 \to a.
Try answering before revealing!
Question 3
[Board Standard] Is h:R→Rh : \mathbb{R} \to \mathbb{R}, h(x)=x2+3h(x) = x^2 + 3 one-one? Is it onto?
Try answering before revealing!
Question 4
[HOTS] How many one-one maps go from 44 items to 66 items? Explain the first two choices.
Try answering before revealing!

1.5 Exercise 1.2: Function Properties and Mappings

769 words · 3 min read

⚡ Quick Check Flashcards14 questions
Question 1
[Concept] Domain {1,2,3}\{1, 2, 3\}, codomain {x,y,z}\{x, y, z\}: 1→y,  2→z,  3→x1 \to y, \; 2 \to z, \; 3 \to x. Is it one-one? Onto? And the map from {1,2,3,4}\{1, 2, 3, 4\} to {x,y}\{x, y\} with 1→x,  2→y,  3→x,  4→y1 \to x, \; 2 \to y, \; 3 \to x, \; 4 \to y?
Try answering before revealing!
Question 2
[Concept] Show that f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=5x−7f(x) = 5x - 7 is bijective. Which input gives the output 1818?
Try answering before revealing!
Question 3
[Concept] Show that f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=∣x∣f(x) = |x| is neither one-one nor onto.
Try answering before revealing!
Question 4
[Concept] Is f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2+1f(x) = x^2 + 1 one-one? Onto? Change the domain and codomain to make it bijective.
Try answering before revealing!
Question 5
[Board Standard] Show that f:R−{−2}→R−{1}f : \mathbb{R} - \{-2\} \to \mathbb{R} - \{1\}, f(x)=xx+2f(x) = \frac{x}{x + 2} is bijective.
Try answering before revealing!
Question 6
[Board Standard] Domain with 44 items, codomain with 33 items. How many functions are there? Then find: one-one functions from 33 items to 55 items; onto functions from 44 items to 22 items; bijections from 44 items to 44 items.
Try answering before revealing!
Question 7
[Board Standard] Is f:Z→Zf : \mathbb{Z} \to \mathbb{Z}, f(x)=2xf(x) = 2x one-one? Onto?
Try answering before revealing!
Question 8
[Board Standard] Is f:N→Nf : \mathbb{N} \to \mathbb{N}, f(n)=n+1f(n) = n + 1 one-one? Onto? (Here N={1,2,3,… }\mathbb{N} = \{1, 2, 3, \dots\}.)
Try answering before revealing!
Question 9
[Board Standard] A thermometer converts Celsius to Fahrenheit with F=1.8C+32F = 1.8C + 32. Show that this is a bijection from R\mathbb{R} to R\mathbb{R}. What is FF for C=37C = 37? What is CC for F=50F = 50?
Try answering before revealing!
Question 10
[Board Standard] Give an example of (a) a one-one function from {1,2,3}\{1, 2, 3\} to {1,2,3,4}\{1, 2, 3, 4\} that is not onto, and (b) an onto function from {1,2,3,4}\{1, 2, 3, 4\} to {1,2,3}\{1, 2, 3\} that is not one-one.
Try answering before revealing!
Question 11
[HOTS] Show that g:R→Rg : \mathbb{R} \to \mathbb{R}, g(x)=2x−5g(x) = 2x - 5 is bijective. Which input gives the output 99?
Try answering before revealing!
Question 12
[HOTS] On inputs {1,2,3}\{1, 2, 3\} with codomain {a,b,c}\{a, b, c\}, classify 1→a,  2→a,  3→b1 \to a, \; 2 \to a, \; 3 \to b.
Try answering before revealing!
Question 13
[HOTS] How many one-one maps go from 44 items to 66 items? How many onto maps go from 33 items to 22 items?
Try answering before revealing!
Question 14
[HOTS] Is h:R→Rh : \mathbb{R} \to \mathbb{R}, h(x)=x2+2h(x) = x^2 + 2 one-one? Onto? Name the two inputs that share the output 1111.
Try answering before revealing!

1.6 Composition of Functions and Invertible Functions

1,897 words · 9 min read

A food stall works in two steps. First the cook adds 1 spoon of sugar to each cup. Then the helper doubles the whole cup into a large glass. The customer tastes the combined result, not the middle step. Two small rules made one bigger rule. That is composition.

Imagine a two-step machine. The first machine ff takes a number and doubles it, then adds 11. The second machine gg squares whatever it receives. If you put a number through both machines in order, you have built a new function. This is called the composition of ff and gg.

The composition, written g∘fg \circ f (read "gg after ff") means: apply ff first, then gg. In symbols, (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)).

3f: double, add 17 outg: square49 out49first f, then g
Composition as two machines in a row: 3 becomes 7 in f, then 49 in g. The combined machine sends 3 straight to 49.

Read the diagram in three hops. The 3 enters the first box and 7 comes out. The 7 enters the second box and 49 comes out. Cover the middle with your finger and the whole picture is one machine sending 3 to 49. That covered machine is g after f.

With f(x)=2x+1f(x) = 2x + 1 and g(x)=x2g(x) = x^2: (g∘f)(x)=(2x+1)2(g \circ f)(x) = (2x + 1)^2. At x=3x = 3, the first machine gives 77 and the second gives 4949. In the other order, (f∘g)(x)=2x2+1(f \circ g)(x) = 2x^2 + 1, and at x=3x = 3 it gives 1919.

Order matters. g∘fg \circ f and f∘gf \circ g are usually different functions: here 4949 and 1919. The function written closest to xx is applied first.

For g∘fg \circ f to make sense, every output of ff must be an allowed input of gg. In other words, the range of ff must fit inside the domain of gg.

Two rules and their combination. The steep curve is g after f: it applies f first, then squares the result.

Read the plot at one vertical slice, x = 3. The straight line is at height 7: that is f(3). The lower parabola is at 9: that is g(3). The steep curve is at 49: it took the 7 and squared it. Following the slice upward shows the order: f first, then g.

Goal: combine f(x)=x+1f(x) = x + 1 and g(x)=2xg(x) = 2x, then evaluate both orders at x=3x = 3.

Step 1: (g∘f)(x)=g(f(x))=2(x+1)=2x+2(g \circ f)(x) = g(f(x)) = 2(x + 1) = 2x + 2. At x=3x = 3 this is 88. Step 2: (f∘g)(x)=f(g(x))=2x+1(f \circ g)(x) = f(g(x)) = 2x + 1. At x=3x = 3 this is 77. Conclusion: even these tiny rules give different answers in different orders, 88 against 77. The computer checked both formulas at four sample points.

Let f:{1,2,3}→{a,b,c}f : \{1, 2, 3\} \to \{a, b, c\} be f={(1,b),(2,a),(3,c)}f = \{(1, \text{b}), (2, \text{a}), (3, \text{c})\}, and g:{a,b,c}→{10,20}g : \{a, b, c\} \to \{10, 20\} be g={(a,10),(b,20),(c,10)}g = \{(\text{a}, 10), (\text{b}, 20), (\text{c}, 10)\}. Follow each input through both steps:

xxf(x)f(x)g(f(x))g(f(x))
11b\text{b}2020
22a\text{a}1010
33c\text{c}1010

So g∘f={(1,20),(2,10),(3,10)}g \circ f = \{(1, 20), (2, 10), (3, 10)\}. Notice that gg is not one-one (both aa and cc go to 1010), and neither is g∘fg \circ f. Read the table down each column: the middle column is the stopover, and the last column forgets it.

  • [Concept] Composition of one-one functions is one-one. If g(f(a))=g(f(b))g(f(a)) = g(f(b)), then gg being one-one gives f(a)=f(b)f(a) = f(b), and then ff being one-one gives a=ba = b.
  • [Board Standard] Composition of onto functions is onto. Take any target zz. Because gg is onto, some yy has g(y)=zg(y) = z. Because ff is onto, some xx has f(x)=yf(x) = y. Then g(f(x))=zg(f(x)) = z.
  • [HOTS] So the composition of two bijections is a bijection. This was checked on the pair of functions f={(1,b),(2,a),(3,c)}f = \{(1, b), (2, a), (3, c)\} and g={(a,10),(b,20),(c,30)}g = \{(a, 10), (b, 20), (c, 30)\}, giving g∘f={(1,20),(2,10),(3,30)}g \circ f = \{(1, 20), (2, 10), (3, 30)\}.

Composition also has a tidy property: it is associative. (h∘g)∘f=h∘(g∘f)(h \circ g) \circ f = h \circ (g \circ f). With f(x)=x+1f(x) = x + 1, g(x)=2xg(x) = 2x, h(x)=x2h(x) = x^2, both ways give (2(x+1))2(2(x + 1))^2, which equals 6464 at x=3x = 3. So we can write h∘g∘fh \circ g \circ f with no brackets.

Some functions can be undone. If ff turns 33 into 77 by "double and add 11", the undo machine turns 77 back into 33 by "subtract 11 and halve". We say gg is the inverse of ff when doing one and then the other gets you back where you started, in both orders:

  • [Board Standard] g(f(x))=xg(f(x)) = x for every xx in the domain of ff (do ff, then undo it);
  • [HOTS] f(g(y))=yf(g(y)) = y for every yy in the domain of gg (undo, then do ff).

We write the inverse as f−1f^{-1}. A function that has an inverse is called invertible.

Which functions can be undone? Exactly the bijective ones. If two inputs share an output (not one-one), the undo machine would not know which input to return. If some output has no input (not onto), the undo machine would have nothing to do for it. A bijection pairs everything perfectly, so reversing the pairs gives a function.

  1. [Concept] Check that the function is a bijection between the given domain and codomain.
  2. [Board Standard] Write y=f(x)y = f(x).
  3. [Board Standard] Solve this equation for xx, so that xx is written using yy.
  4. [HOTS] Rename: the result is f−1(y)f^{-1}(y). You may then call the variable xx again.
  5. [HOTS] State the domain and range of f−1f^{-1}. They are the range and domain of ff, swapped.

Find the inverse of f(x)=4x−7f(x) = 4x - 7 on R\mathbb{R}. Write y=4x−7y = 4x - 7. Then 4x=y+74x = y + 7, so x=y+74x = \frac{y + 7}{4}. Hence f−1(y)=y+74f^{-1}(y) = \frac{y + 7}{4}. As a check, f(4)=9f(4) = 9 and f−1(9)=4f^{-1}(9) = 4: the undo returns the starting input.

For f={(1,b),(2,a),(3,c)}f = \{(1, \text{b}), (2, \text{a}), (3, \text{c})\}, swapping each pair gives f−1={(a,2),(b,1),(c,3)}f^{-1} = \{(\text{a}, 2), (\text{b}, 1), (\text{c}, 3)\}. Reversing arrows is all there is when the function is given as pairs.

In Example 4 of Section 1.3, solving y=2x+1x−3y = \frac{2x + 1}{x - 3} gave x=3y+1y−2x = \frac{3y + 1}{y - 2}. So the inverse of f:R−{3}→R−{2}f : \mathbb{R} - \{3\} \to \mathbb{R} - \{2\} is f−1:R−{2}→R−{3}f^{-1} : \mathbb{R} - \{2\} \to \mathbb{R} - \{3\}, f−1(y)=3y+1y−2f^{-1}(y) = \frac{3y + 1}{y - 2}. Notice how the missing input 33 and the missing output 22 trade places.

The function f:[0,∞)→[2,∞)f : [0, \infty) \to [2, \infty), f(x)=x2+2f(x) = x^2 + 2 is a bijection. Solving y=x2+2y = x^2 + 2 with x≥0x \ge 0 gives x=y−2x = \sqrt{y - 2}. So f−1(y)=y−2f^{-1}(y) = \sqrt{y - 2}. For instance f(3)=11f(3) = 11 and f−1(11)=3f^{-1}(11) = 3.

The graph of an inverse is the mirror image of the original in the line y = x. The point (3, 11) on f becomes (11, 3) on its inverse.

Read the mirror. Pick (3, 11) on the rising curve. Flip it across the dashed diagonal and you land on (11, 3) on the other curve. Swapping coordinates is the same as swapping each pair in a pair list. The diagonal is the mirror, not part of either graph.

To undo "put on socks, then put on shoes" you must take off the shoes first, then the socks. In symbols, if ff and gg are invertible,

(g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}

Check with f(x)=2x+1f(x) = 2x + 1 and g(x)=3x−5g(x) = 3x - 5. Then (g∘f)(x)=3(2x+1)−5=6x−2(g \circ f)(x) = 3(2x + 1) - 5 = 6x - 2, whose inverse is x+26\frac{x + 2}{6}. On the other side, f−1(x)=x−12f^{-1}(x) = \frac{x - 1}{2} and g−1(x)=x+53g^{-1}(x) = \frac{x + 5}{3}, so f−1(g−1(x))=x+53−12=x+26f^{-1}(g^{-1}(x)) = \frac{\frac{x + 5}{3} - 1}{2} = \frac{x + 2}{6}. They agree. In the wrong order, g−1(f−1(x))=x+96g^{-1}(f^{-1}(x)) = \frac{x + 9}{6}, which is different.

Common mistake: reading f−1f^{-1} as 1f\frac{1}{f}. For f(x)=2xf(x) = 2x, the inverse is f−1(x)=x2f^{-1}(x) = \frac{x}{2}, but 1f(x)=12x\frac{1}{f(x)} = \frac{1}{2x}. At x=4x = 4 these are 22 and 18\frac{1}{8}. The small −1-1 means "undo", not "reciprocal".

⚡ Quick Check Flashcards4 questions
Question 1
[Concept] Let f(x)=3x+1f(x) = 3x + 1 and g(x)=x2g(x) = x^2. Find (g∘f)(2)(g \circ f)(2) and (f∘g)(2)(f \circ g)(2).
Try answering before revealing!
Question 2
[Board Standard] Find the inverse of f(x)=x−45f(x) = \frac{x - 4}{5}.
Try answering before revealing!
Question 3
[Board Standard] Is f={(1,q),(2,q),(3,r)}f = \{(1, \text{q}), (2, \text{q}), (3, \text{r})\}, from {1,2,3}\{1, 2, 3\} to {p,q,r}\{p, q, r\}, invertible?
Try answering before revealing!
Question 4
[HOTS] Find the inverse of f(x)=x3+1f(x) = x^3 + 1 on R\mathbb{R}.
Try answering before revealing!

⚡ Quick Check Flashcards4 questions

Work from the inside out: inner rule first, then the outer rule.

Question 1
[Concept] Let f(x)=x+1f(x) = x + 1 and g(x)=2xg(x) = 2x. Write (g∘f)(x)(g \circ f)(x) and (f∘g)(x)(f \circ g)(x), and evaluate both at x=3x = 3.
Try answering before revealing!
Question 2
[Board Standard] Find the inverse of h(x)=3x−5h(x) = 3x - 5 on R\mathbb{R}. Check it with h(6)h(6) and h−1(13)h^{-1}(13).
Try answering before revealing!
Question 3
[Board Standard] Is s:R→Rs : \mathbb{R} \to \mathbb{R}, s(x)=x2s(x) = x^2, invertible? Give two inputs that prove your answer.
Try answering before revealing!
Question 4
[HOTS] If ff and gg are bijections, why must g∘fg \circ f be a bijection? Answer in two sentences.
Try answering before revealing!

1.7 Miscellaneous Worked Examples

1,017 words · 5 min read

The five examples below mix every idea of the chapter: one equivalence relation, one counting argument, one harder bijection, one self-inverse function, and one counting puzzle. Read each with the same habit: goal first, then the given facts, then one justified step at a time.

Goal: show that "equal fractions" is an equivalence relation on pairs. Given: the ordered pairs (a,b)(a, b) with a,b∈{1,2,3,4}a, b \in \{1, 2, 3, 4\}. Say (a,b)∼(c,d)(a, b) \sim (c, d) when a×d=b×ca \times d = b \times c. Show that this is an equivalence relation and describe the classes.

Step 1, reflexive: ab=baa b = b a. Step 2, symmetric: if ad=bca d = b c then cb=dac b = d a. Step 3, transitive: if ad=bca d = b c and cf=dec f = d e, multiply the first by ff and the second by bb and compare: adf=bcf=bdea d f = b c f = b d e, and cancelling dd gives af=bea f = b e. The computer also checked all 256256 pairs of pairs.

The rule says "ab\frac{a}{b} and cd\frac{c}{d} are equal fractions". The 1616 pairs fall into 11 classes, one for each different fraction. The class of (1,2)(1, 2) is {(1,2),(2,4)}\{(1, 2), (2, 4)\}, because 12=24\frac{1}{2} = \frac{2}{4}. The class of (1,1)(1, 1) has 4 pairs: 11=22=33=44\frac{1}{1} = \frac{2}{2} = \frac{3}{3} = \frac{4}{4}. So a fraction is an equivalence class of pairs.

Goal: count the onto maps. Given: domain {1,2,3,4}\{1, 2, 3, 4\}, codomain {a,b,c}\{a, b, c\}. How many onto functions are there?

Step 1: start with all functions: 34=813^4 = 81. Step 2: remove those that miss at least one output. There are 33 ways to miss one chosen output, each leaving 24=162^4 = 16 functions, so subtract 3×16=483 \times 16 = 48. Step 3: functions that miss two outputs (everything goes to one item) were subtracted twice. There are 33 of them, so add back 33. Total: 81−48+3=3681 - 48 + 3 = 36. Listing every function by computer also gives 36.

Goal: squeeze the whole real line into a short interval without losing the pairing. Given: f:R→(−1,1)f : \mathbb{R} \to (-1, 1), f(x)=x1+x2f(x) = \frac{x}{\sqrt{1 + x^2}}. Show it is a bijection and find its inverse.

Step 1, inside the interval: since ∣x∣<1+x2|x| < \sqrt{1 + x^2}, we have ∣f(x)∣<1|f(x)| < 1.

Step 2, one-one: if f(a)=f(b)f(a) = f(b), then aa and bb have the same sign (or both are 00). Squaring both sides, a2(1+b2)=b2(1+a2)a^2 (1 + b^2) = b^2 (1 + a^2), so a2=b2a^2 = b^2. With the same sign, a=ba = b.

Step 3, onto and inverse: for y∈(−1,1)y \in (-1, 1), put x=y1−y2x = \frac{y}{\sqrt{1 - y^2}}. Then 1+x2=11−y21 + x^2 = \frac{1}{1 - y^2}, so 1+x2=11−y2\sqrt{1 + x^2} = \frac{1}{\sqrt{1 - y^2}} and f(x)=yf(x) = y. This formula is also the inverse: f−1(y)=y1−y2f^{-1}(y) = \frac{y}{\sqrt{1 - y^2}}. The computer checked the steady rise and the undo pairing on samples.

Goal: show the undo of ff is ff itself. Given: f(x)=x+1x−1f(x) = \frac{x + 1}{x - 1} for x≠1x \ne 1. Show that f∘ff \circ f is the identity, so f−1=ff^{-1} = f.

Step 1: f(f(x))=x+1x−1+1x+1x−1−1=2xx−12x−1=xf(f(x)) = \dfrac{\frac{x + 1}{x - 1} + 1}{\frac{x + 1}{x - 1} - 1} = \dfrac{\frac{2x}{x - 1}}{\frac{2}{x - 1}} = x. Step 2: test numbers. For example f(2)=3f(2) = 3 and f(3)=2f(3) = 2: the function swaps 22 and 33. Conclusion: applying ff twice returns the start, so ff undoes itself.

Goal: count relations with three demands at once. Given: relations on {1,2,3}\{1, 2, 3\} containing (1,2)(1, 2) and (2,1)(2, 1), reflexive and symmetric, but not transitive. How many?

Step 1: reflexive and symmetric relations containing (1,2)(1, 2) and (2,1)(2, 1) have the three pairs (a,a)(a, a) and the pair (1,2),(2,1)(1,2),(2,1). Step 2: the only free choices are the pair {1,3}\{1, 3\} (both (1,3)(1,3) and (3,1)(3,1), or neither) and the pair {2,3}\{2, 3\}. That is 2×2=42 \times 2 = 4 relations. Step 3: two of them are equivalence relations: add neither of the links, or add both. If we add exactly one link (say 1↔31 \leftrightarrow 3 but not 2↔32 \leftrightarrow 3), transitivity breaks: (2,1)(2, 1) and (1,3)(1, 3) are there but (2,3)(2, 3) is missing. So the answer is 2.

Goal: see an inverse pair as mirror images. Given: f(x)=2xf(x) = 2x and g(x)=x2g(x) = \frac{x}{2} on R\mathbb{R}. Step 1: g(f(x))=2x2=xg(f(x)) = \frac{2x}{2} = x and f(g(x))=2⋅x2=xf(g(x)) = 2\cdot\frac{x}{2} = x, so g=f−1g = f^{-1}. Step 2: test numbers: f(6)=12f(6) = 12 and g(12)=6g(12) = 6. Conclusion: doubling is bijective, and halving undoes it.

Doubling and halving are mirror images in the line y = x. The point (6, 12) on f becomes (12, 6) on its inverse.

Read the mirror exactly as in Section 1.4. The steep line doubles every input; the shallow line halves every input. The dashed diagonal swaps the coordinates: follow any point across it to find its partner on the other line.

⚡ Quick Check Flashcards3 questions

Three short items that reuse the worked methods on new numbers.

Question 1
[Concept] Let f(x)=x+3f(x) = x + 3 and g(x)=2xg(x) = 2x. Find (g∘f)(2)(g \circ f)(2) and (f∘g)(2)(f \circ g)(2).
Try answering before revealing!
Question 2
[Board Standard] Find the inverse of h(x)=5x+2h(x) = 5x + 2 on R\mathbb{R}, and compute h(4)h(4).
Try answering before revealing!
Question 3
[HOTS] The pair list f={(1,b),(2,a)}f = \{(1, b), (2, a)\} maps {1,2}\{1, 2\} to {a,b}\{a, b\}. Is ff invertible? If yes, give f−1f^{-1}.
Try answering before revealing!

1.8 Miscellaneous Exercise and Board Assessment

1,061 words · 5 min read

⚡ Quick Check Flashcards18 questions
Question 1
[Concept] Show that f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x3+5f(x) = x^3 + 5 is a bijection and find f−1f^{-1}.
Try answering before revealing!
Question 2
[Concept] On the nine ordered pairs (a,b)(a, b) with a,b∈{1,2,3}a, b \in \{1, 2, 3\}, let (a,b)∼(c,d)(a, b) \sim (c, d) when a+d=b+ca + d = b + c. Show that ∼\sim is an equivalence relation. How many classes are there, and what is the class of (1,2)(1, 2)?
Try answering before revealing!
Question 3
[Concept] Let f(x)=2x+1f(x) = 2x + 1 and g(x)=x2−3g(x) = x^2 - 3. Find g∘fg \circ f and f∘gf \circ g and evaluate both at x=2x = 2.
Try answering before revealing!
Question 4
[Concept] How many functions from {1,2,3}\{1, 2, 3\} to itself are neither one-one nor onto?
Try answering before revealing!
Question 5
[Concept] Show that f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=∣x∣+xf(x) = |x| + x is neither one-one nor onto.
Try answering before revealing!
Question 6
[Concept] On {0,1,2,…,12}\{0, 1, 2, \dots, 12\}, let a R ba \, R \, b when a−ba - b is a multiple of 33 or a multiple of 44. Is RR an equivalence relation?
Try answering before revealing!
Question 7
[Board Standard] Show that f:R−{1}→R−{3}f : \mathbb{R} - \{1\} \to \mathbb{R} - \{3\}, f(x)=3x+2x−1f(x) = \frac{3x + 2}{x - 1} is a bijection and find its inverse.
Try answering before revealing!
Question 8
[Board Standard] The function c(K)=K−273.15c(K) = K - 273.15 converts a temperature from kelvin to Celsius, and f(C)=1.8C+32f(C) = 1.8C + 32 converts Celsius to Fahrenheit. Find the composite that converts kelvin to Fahrenheit, its inverse, and the Fahrenheit value of 300300 K.
Try answering before revealing!
Question 9
[Board Standard] On {−2,−1,0,1,2}\{-2, -1, 0, 1, 2\}, let a R ba \, R \, b when a−ba - b is even. Show it is an equivalence relation and list the two classes.
Try answering before revealing!
Question 10
[Board Standard] On {1,2,3}\{1, 2, 3\}, let a R ba \, R \, b when a<ba < b. Test the three properties and give a witness for each failure.
Try answering before revealing!
Question 11
[Board Standard] On inputs {1,2}\{1, 2\} with codomain {a,b,c}\{a, b, c\}, classify 1→b,  2→c1 \to b, \; 2 \to c.
Try answering before revealing!
Question 12
[Board Standard] How many bijections map a 55-item set to itself? What does that number count?
Try answering before revealing!
Question 13
[Board Standard] Let f(x)=x+3f(x) = x + 3 and g(x)=2xg(x) = 2x. Find g∘fg \circ f and f∘gf \circ g and evaluate both at x=4x = 4.
Try answering before revealing!
Question 14
[HOTS] Show that h:R→Rh : \mathbb{R} \to \mathbb{R}, h(x)=3x−5h(x) = 3x - 5 is bijective, find its inverse, and check it with h(6)h(6).
Try answering before revealing!
Question 15
[HOTS] On {0,1,…,8}\{0, 1, \dots, 8\}, let a R ba \, R \, b when a−ba - b is a multiple of 33. How many classes are there, and how large is each?
Try answering before revealing!
Question 16
[HOTS] Let s(x)=5−xs(x) = 5 - x on R\mathbb{R}. Show that s∘ss \circ s is the identity, so s−1=ss^{-1} = s. Which two numbers does ss swap?
Try answering before revealing!
Question 17
[HOTS] Show that k:R→Rk : \mathbb{R} \to \mathbb{R}, k(x)=x3−2k(x) = x^3 - 2 is bijective and find its inverse.
Try answering before revealing!
Question 18
[HOTS] Let f:{1,2}→{a,b}f : \{1, 2\} \to \{a, b\} be f={(1,b),(2,a)}f = \{(1, b), (2, a)\} and g:{a,b}→{10,20}g : \{a, b\} \to \{10, 20\} be g={(a,10),(b,20)}g = \{(a, 10), (b, 20)\}. Find g∘fg \circ f and say if it is bijective.
Try answering before revealing!

1.9 Chapter Summary and Relations Formula Sheet

320 words · 1 min read

This chapter built one idea in four layers. A relation lists connections. Three tests sort those connections. A function keeps a strict promise. Chaining and undoing complete the toolkit. Read the layer below that still feels shaky, then redo its worked example without looking.

  • Relation: a subset of A×BA \times B. A relation in a set XX is a subset of X×XX \times X.
  • Empty relation: no pairs. Universal relation: all pairs.
  • Reflexive: (a,a)∈R(a, a) \in R for every aa. Symmetric: (a,b)∈R(a, b) \in R implies (b,a)∈R(b, a) \in R. Transitive: (a,b)(a, b) and (b,c)(b, c) in RR imply (a,c)∈R(a, c) \in R.
  • Equivalence relation: reflexive, symmetric and transitive. It splits the set into equivalence classes that do not overlap.
  • Function f:X→Yf : X \to Y: every input has exactly one output. Domain = inputs, codomain = allowed outputs, range = outputs that really happen.
  • One-one: f(a)=f(b)f(a) = f(b) implies a=ba = b. Onto: every item of the codomain is an output. Bijective: both.
  • Counting from an mm-set to an nn-set: nmn^m functions; n(n−1)⋯(n−m+1)n(n - 1) \cdots (n - m + 1) one-one; bijections only if m=nm = n, and then there are n!n!.
  • Composition: (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)). Apply ff first. It is associative but usually not commutative. Composition of one-one (onto) functions is one-one (onto).
  • Invertible: ff has an inverse exactly when it is a bijection. Then f−1(f(x))=xf^{-1}(f(x)) = x and f(f−1(y))=yf(f^{-1}(y)) = y. The graph of f−1f^{-1} is the mirror image of the graph of ff in the line y=xy = x.
  • Inverse of a composition: (g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}. Undo in the reverse order.

One input, one output; test the three habits; check both function questions; inner rule first; undo reverses the order.

Study checklist: can you test a new relation for all three properties with witnesses? Can you prove a straight line bijective? Can you compose two formulas and find an inverse by solving? If yes to all three, the chapter is yours.
Up next
Continue to the next chapter