A function $f:A\to B$ is one-one if different inputs always give different outputs, and onto if every element of $B$ is an output. Functions that are both โ bijections โ pair the two sets off perfectly.
When a board allots roll numbers for an examination, two things must never happen: two candidates must never get the same roll number, and โ if the board wants a tidy list โ no roll number should be left unused. The first requirement says โdifferent inputs give different outputsโ; the second says โevery possible output is actually usedโ. These are the two properties of functions we study in this section: one-one and onto.
They matter far beyond roll numbers. A code that turns messages into numbers must be one-one, or two messages would be confused. A schedule that assigns every task to a worker must be onto the set of workers if nobody is to sit idle. And only a function that is both one-one and onto can be run backwards โ which is exactly what you will need next chapter, when sine, cosine and tangent are โinvertedโ.
Functions: a Quick Recap
From Class 11 Mathematics, ยง2.3 Functions and Their Graphs: a function $f:A\to B$ is a relation from $A$ to $B$ in which every element $x$ of the domain $A$ has exactly one image $f(x)$ in the codomain $B$. The range of $f$ is the set of images actually reached, $f(A)=\{f(x):x\in A\}\subseteq B$. In an arrow diagram, exactly one arrow leaves each element of $A$; elements of $B$ may receive many arrows, one arrow or none.
Those last words โ โmany, one or noneโ โ are what this section is about.
One-one, Onto and Bijective Functions
๐ Definition 1.6 โ One-one (injective) function
A function $f:A\to B$ is one-one (or injective) if different elements of $A$ have different images:
$$f(x_1)=f(x_2)\ \Longrightarrow\ x_1=x_2\qquad\text{for all }x_1,x_2\in A.$$
Equivalently, $x_1\ne x_2\Rightarrow f(x_1)\ne f(x_2)$. A function that is not one-one is called many-one.
๐ Definition 1.7 โ Onto (surjective) function
A function $f:A\to B$ is onto (or surjective) if every element of $B$ is the image of at least one element of $A$: for every $y\in B$ there is some $x\in A$ with $f(x)=y$. Equivalently, the range of $f$ equals the codomain: $f(A)=B$.
๐ Definition 1.8 โ Bijective function
A function $f:A\to B$ is bijective (a bijection, or a one-one correspondence) if it is both one-one and onto. In an arrow diagram, every element of $B$ receives exactly one arrow.
one-oneeach element of $B$ receives at most one arrow
ontoeach element of $B$ receives at least one arrow
bijectiveeach element of $B$ receives exactly one arrow
โ๏ธ Example 1 โ Arrow diagrams
Classify each function as one-one, onto, both or neither.
(a) $f_1:\{1,2,3\}\to\{p,q,r\}$, $f_1=\{(1,p),(2,q),(3,r)\}$ (b) $f_2:\{1,2,3\}\to\{p,q,r\}$, $f_2=\{(1,p),(2,p),(3,q)\}$
(c) $f_3:\{1,2,3\}\to\{p,q,r,s\}$, $f_3=\{(1,q),(2,s),(3,p)\}$ (d) $f_4:\{1,2,3,4\}\to\{p,q\}$, $f_4=\{(1,p),(2,q),(3,p),(4,q)\}$
๐ก Show solutionโถ
(a) $p,q,r$ each receive exactly one arrow: one-one and onto โ bijective.
(b) $f_2(1)=f_2(2)=p$ with $1\ne2$: not one-one. $r$ receives no arrow: not onto. Neither.
(c) The images $q,s,p$ are all different: one-one. $r$ receives no arrow: not onto. One-one, not onto.
(d) $f_4(1)=f_4(3)$: not one-one. Both $p$ and $q$ are hit: onto. Onto, not one-one.
Interactive 1 โ Mapping Visualiser: Arrows, Collisions and Gaps
Choose the sizes of $A$ and $B$. Click an element of $A$ to move its arrow to the next element of $B$. A red element of $B$ receives two or more arrows (a collision โ not one-one); a dashed element receives none (a gap โ not onto). Play draws random functions $A\to B$ and keeps a tally: try $n(A)\gt n(B)$ and watch the one-one count stay at zero.
one-one?โ
onto?โ
random functions drawn0
one-one / onto / bijective0 / 0 / 0
Proving and Disproving for Functions on โ, โค and โ
For infinite sets we cannot draw every arrow, so we argue with algebra.
๐งญ Problem-solving strategy โ one-one and onto proofs
To prove one-one: start from $f(x_1)=f(x_2)$ with $x_1,x_2$ in the domain, and deduce $x_1=x_2$.
To disprove one-one: give two different elements of the domain with the same image, e.g. $f(-1)=f(1)$.
To prove onto: take an arbitrary $y$ in the codomain, solve $f(x)=y$ for $x$, and check that this $x$ lies in the domain. Then verify $f(x)=y$.
To disprove onto: give one element of the codomain that is never an image, and say why.
โ๏ธ Example 2 โ A linear function on โ
Show that $f:\mathbb R\to\mathbb R$, $f(x)=3-4x$, is bijective.
๐ก Show solutionโถ
One-one Suppose $f(x_1)=f(x_2)$. Then $3-4x_1=3-4x_2$, so $-4x_1=-4x_2$ and $x_1=x_2$.
Onto Let $y\in\mathbb R$. Solve $3-4x=y$: $x=\dfrac{3-y}{4}$, which is a real number, so it lies in the domain. Check: $f\!\left(\dfrac{3-y}{4}\right)=3-(3-y)=y$. โ
Answer $f$ is one-one and onto, hence bijective. (Any $f(x)=ax+b$ with $a\ne0$ on $\mathbb R\to\mathbb R$ works the same way.)
โ๏ธ Example 3 โ The domain changes the answer
(a) Show that $f:\mathbb N\to\mathbb N$, $f(n)=2n+1$, is one-one but not onto. (b) Show that $g:\mathbb Z\to\mathbb Z$, $g(n)=n^2$, is neither one-one nor onto.
๐ก Show solutionโถ
(a) one-one $2n_1+1=2n_2+1\Rightarrow n_1=n_2$.
(a) not onto Every image $2n+1$ is odd and at least $3$. So $2\in\mathbb N$ (or $1$) is never an image: $2n+1=2$ gives $n=\tfrac12\notin\mathbb N$.
(b) $g(-1)=g(1)=1$ with $-1\ne1$: not one-one. $g(n)\ge0$ for every $n$, so $-1\in\mathbb Z$ is not an image: not onto.
โ๏ธ Example 4 โ A rational function
Let $A=\mathbb R-\{3\}$ and $B=\mathbb R-\{2\}$. Show that $f:A\to B$, $f(x)=\dfrac{2x+1}{x-3}$, is bijective.
๐ก Show solutionโถ
Well defined If $f(x)=2$ then $2x+1=2x-6$, i.e. $1=-6$, impossible. So every image really lies in $B$.
One-one Suppose $\dfrac{2x_1+1}{x_1-3}=\dfrac{2x_2+1}{x_2-3}$. Cross-multiplying, $(2x_1+1)(x_2-3)=(2x_2+1)(x_1-3)$, i.e. $2x_1x_2-6x_1+x_2-3=2x_1x_2-6x_2+x_1-3$. Cancelling gives $-7x_1=-7x_2$, so $x_1=x_2$.
Onto Let $y\in B$ (so $y\ne2$). Solve $y=\dfrac{2x+1}{x-3}$: $yx-3y=2x+1$, so $x(y-2)=3y+1$ and $x=\dfrac{3y+1}{y-2}$, defined because $y\ne2$. Is $x\ne3$? If $\dfrac{3y+1}{y-2}=3$ then $3y+1=3y-6$, impossible. So $x\in A$ and $f(x)=y$.
Check $y=5$: $x=\tfrac{16}{3}$ and $f\!\left(\tfrac{16}{3}\right)=\dfrac{35/3}{7/3}=5$. โ Hence $f$ is bijective.
โ๏ธ Example 5 โ A function built from |x|
Show that $f:\mathbb R\to\mathbb R$, $f(x)=x|x|$, is bijective.
๐ก Show solutionโถ
Formula $f(x)=x^2$ for $x\ge0$ and $f(x)=-x^2$ for $x\lt0$. So $f(x)$ has the same sign as $x$, and $|f(x)|=x^2$.
One-one Suppose $f(x_1)=f(x_2)$. Equal values have the same sign, so $x_1,x_2$ have the same sign (or are both $0$). Also $x_1^2=|f(x_1)|=|f(x_2)|=x_2^2$, so $|x_1|=|x_2|$. Same sign and same size give $x_1=x_2$.
Onto Let $y\in\mathbb R$. If $y\ge0$ take $x=\sqrt y$: $f(x)=\sqrt y\cdot\sqrt y=y$. If $y\lt0$ take $x=-\sqrt{-y}$: $f(x)=-\sqrt{-y}\cdot\sqrt{-y}=-(-y)=y$.
Answer Bijective. Compare $x^2$, which is neither: multiplying by $|x|$ instead of $x$ keeps the sign of $x$.
โ ๏ธ Common mistakes when studying alone
1. The codomain is part of the function. The rule $x\mapsto x^2$ is onto as a function $\mathbb R\to[0,\infty)$ but not as a function $\mathbb R\to\mathbb R$. Always read the codomain before deciding โontoโ.
2. Solving is not enough โ check the domain. For $f:\mathbb Z\to\mathbb Z$, $f(x)=2x+1$, solving $2x+1=y$ gives $x=\tfrac{y-1}{2}$; for $y=4$ this is $1.5\notin\mathbb Z$. So $f$ is not onto, even though the algebra โworkedโ.
3. Squaring both sides loses information. From $x_1^2=x_2^2$ you may only conclude $x_1=\pm x_2$. On $\mathbb N$ or $[0,\infty)$ that does give $x_1=x_2$; on $\mathbb R$ or $\mathbb Z$ it does not.
4. One example is not a proof. Showing $f(1)\ne f(2)$ does not prove $f$ is one-one; you need a general argument. But one example is enough to disprove.
Graphs, the Horizontal Line Test and Finite Sets
For $f:A\to B$ with $A,B\subseteq\mathbb R$, the solutions of $f(x)=c$ are the $x$-coordinates where the horizontal line $y=c$ meets the graph. That gives a picture of both properties โ the horizontal line test:
$f$ is one-one exactly when every horizontal line meets the graph at most once;
$f$ is onto $B$ exactly when every horizontal line $y=c$ with $c\in B$ meets the graph at least once.
A sketch suggests the answer; for a Board answer you still write the algebraic proof.
Interactive 2 โ The Horizontal Line Test
The graph is drawn only over the domain; the codomain is the green band on the $y$-axis. Play sweeps the line $y=c$ through the codomain and marks every solution of $f(x)=c$. Two or more dots at one height: not one-one. A height in the band with no dot: not onto. Notice how the same rule $x^2$ changes type when the domain or codomain changes.
height $c$โ
solutions of $f(x)=c$โ
whereโ
type of $f$โ
For finite sets, counting alone decides a lot. If $n(A)\gt n(B)$, some element of $B$ must receive two arrows (there are more arrows than targets โ the pigeonhole principle), so no function $A\to B$ is one-one. If $n(A)\lt n(B)$, at most $n(A)$ elements of $B$ are hit, so no function $A\to B$ is onto. When the sizes are equal, the two properties come together.
๐ Theorem 1.2 โ One-one and onto coincide for equal finite sets
Let $A$ and $B$ be finite sets with the same number of elements, $n(A)=n(B)=n$, and let $f:A\to B$. Then $f$ is one-one if and only if $f$ is onto. In particular, for a finite set $A$, a function $f:A\to A$ is one-one if and only if it is onto.
Why. If $f$ is one-one, the $n$ images $f(a_1),\dots,f(a_n)$ are all different, so they are $n$ different elements of $B$ โ that is all of $B$, so $f$ is onto. If $f$ is onto, all $n$ elements of $B$ are images of the $n$ elements of $A$; if two elements of $A$ shared an image, at most $n-1$ elements of $B$ could be reached. So $f$ is one-one. The hypothesis โfiniteโ is essential: $f:\mathbb N\to\mathbb N$, $f(n)=2n+1$ (Example 3) is one-one but not onto.
โ๏ธ Example 6 โ Using the theorem
Let $A=\{1,2,3,4,5\}$. (a) A function $f:A\to A$ satisfies $f(1)=3$, $f(2)=5$, $f(3)=1$, and $f$ is one-one. Must $f$ be onto? What are the possible values of $f(4)$? (b) Can a function from $A$ to $\{p,q,r,s\}$ be one-one?
๐ก Show solutionโถ
(a) $A$ is finite and $f:A\to A$ is one-one, so by Theorem 1.2 it is onto. The values $3,5,1$ are used, so $f(4)$ and $f(5)$ must be the two remaining values $2$ and $4$ in some order: $f(4)\in\{2,4\}$.
(b) No: $5$ arrows go into $4$ targets, so by the pigeonhole principle some target receives two arrows.
Check Set $n(A)=5$, $n(B)=4$ in Interactive 1 and let it play: the one-one tally never moves.
๐ Beyond the board syllabus (JEE Main ยท JEE Advanced)
In JEE Main and JEE Advanced 2026; not in the CBSE Class 12 syllabus. JEE also uses two ideas built on this section.
Composition. If $f:A\to B$ and $g:B\to C$, then $g\circ f:A\to C$ is $(g\circ f)(x)=g(f(x))$ โ first $f$, then $g$. In general $g\circ f\ne f\circ g$. If $f$ and $g$ are both one-one (both onto), so is $g\circ f$.
Inverse of a bijection. If $f:A\to B$ is bijective, each $y\in B$ comes from exactly one $x\in A$; setting $f^{-1}(y)=x$ defines $f^{-1}:B\to A$ with $f^{-1}(f(x))=x$ and $f(f^{-1}(y))=y$. Only bijections have inverses.
Counting ($n(A)=m$, $n(B)=n$): there are $n^m$ functions $A\to B$, and $n(n-1)\cdots(n-m+1)$ one-one functions when $m\le n$ ($n!$ bijections when $m=n$).
Worked example. $f,g:\mathbb R\to\mathbb R$, $f(x)=3x-2$, $g(x)=x^2$. Then $(g\circ f)(x)=(3x-2)^2$ and $(f\circ g)(x)=3x^2-2$, which differ (at $x=0$: $4$ and $-2$). $f$ is bijective (Example 2 method), and solving $y=3x-2$ gives $f^{-1}(y)=\dfrac{y+2}{3}$; check $f^{-1}(f(x))=\dfrac{3x-2+2}{3}=x$. $g$ has no inverse on $\mathbb R$ because $g(-1)=g(1)$.
Exercises
I
Finite sets and arrow diagrams. Classify each function as one-one, onto, bijective or neither.
5 Is $\{(1,2),(2,3),(1,3)\}$ a function from $\{1,2\}$ to $\{1,2,3\}$? Explain.
6 $f:\{-2,-1,0,1,2\}\to\{0,1,4\}$, $f(x)=x^2$
7 $f:\{1,2,3,4\}\to\{1,2,3,4\}$, $f(x)=$ the remainder when $3x$ is divided by $5$
8 $A=\{1,2,\dots,6\}$. What is the least possible $n(B)$ if some $f:A\to B$ is one-one? What is the greatest possible $n(B)$ if some $f:A\to B$ is onto?
Check: type a function between finite sets and test it
โ
๐ก Show solutionsโถ
1 Images $5,6,4$ are all different and cover $\{4,5,6\}$: bijective.
2 $f(1)=f(2)=4$: not one-one; $5$ is not an image: not onto. Neither.
3 $f(b)=f(d)=2$: not one-one; $1,2,3$ are all images: onto. (Pigeonhole: $4$ arrows, $3$ targets.)
4 $f(1)=2$, $f(2)=3$: one-one; $1$ is not an image: not onto.
5 No: $1$ has two images, $2$ and $3$. A function gives each element of the domain exactly one image.
6 $f(-1)=f(1)$: not one-one; $0=f(0)$, $1=f(1)$, $4=f(2)$: onto.
7 $3\cdot1=3$, $3\cdot2=6\to1$, $3\cdot3=9\to4$, $3\cdot4=12\to2$: $f=\{(1,3),(2,1),(3,4),(4,2)\}$. All different, and all of $\{1,2,3,4\}$ is used: bijective (Theorem 1.2 confirms: one-one on equal finite sets gives onto).
8 One-one needs $6$ different images, so $n(B)\ge6$: least $6$. Onto needs every element of $B$ to be one of at most $6$ images, so $n(B)\le6$: greatest $6$.
II
Prove or disprove that each function is one-one, and that it is onto.
1 $f:\mathbb R\to\mathbb R$, $f(x)=5x-7$
2 $f:\mathbb N\to\mathbb N$, $f(n)=n^2$
3 $f:\mathbb Z\to\mathbb Z$, $f(n)=n-4$
4 $f:\mathbb Z\to\mathbb Z$, $f(n)=3n$
5 $f:\mathbb R\to\mathbb R$, $f(x)=x^2+1$
6 $f:\mathbb R\to\mathbb R$, $f(x)=x^3+2$
7 $f:\mathbb R\to\mathbb R$, $f(x)=|x|$
8 $f:\mathbb R\to\mathbb R$, $f(x)=[x]$, the greatest integer not exceeding $x$
9 $f:\mathbb N\to\mathbb N$, $f(n)=n+1$
10 the signum function $f:\mathbb R\to\mathbb R$: $f(x)=1$ for $x\gt0$, $f(0)=0$, $f(x)=-1$ for $x\lt0$
2 $n_1^2=n_2^2$ with $n_1,n_2\gt0$ gives $n_1=n_2$: one-one. $2$ is not a perfect square, so it has no preimage: not onto.
3 $n_1-4=n_2-4\Rightarrow n_1=n_2$. For $m\in\mathbb Z$, $n=m+4\in\mathbb Z$. Bijective.
4 $3n_1=3n_2\Rightarrow n_1=n_2$: one-one. $3n=1$ gives $n=\tfrac13\notin\mathbb Z$: not onto.
5 $f(-1)=f(1)=2$: not one-one. $x^2+1\ge1$, so $0$ is not an image: not onto.
6 $x_1^3+2=x_2^3+2\Rightarrow x_1^3=x_2^3\Rightarrow x_1=x_2$ (a real number has exactly one real cube root). For $y\in\mathbb R$, $x=\sqrt[3]{y-2}$ works. Bijective.
7 $|-2|=|2|$: not one-one. $|x|\ge0$, so $-1$ is not an image: not onto.
8 $[0.2]=[0.7]=0$: not one-one. Every value is an integer, so $0.5$ is not an image: not onto.
9 $n_1+1=n_2+1\Rightarrow n_1=n_2$: one-one. $n+1=1$ gives $n=0\notin\mathbb N$: not onto.
10 $f(1)=f(2)=1$: not one-one. The range is $\{-1,0,1\}\ne\mathbb R$ (e.g. $2$ is not an image): not onto.
III
Domains, codomains and less familiar rules.
1 $f:[0,\infty)\to[0,\infty)$, $f(x)=x^2$. Show $f$ is bijective.
2 $f:\mathbb R\to[1,\infty)$, $f(x)=x^2+1$. Is $f$ one-one? onto?
3 $f:\mathbb R-\{1\}\to\mathbb R-\{1\}$, $f(x)=\dfrac{x+1}{x-1}$. Show $f$ is bijective.
4 $f:\mathbb R\to\mathbb R$, $f(x)=\dfrac{x}{1+x^2}$. Show $f$ is neither one-one nor onto. (Hint: compare $f(2)$ and $f\!\left(\tfrac12\right)$; show $|f(x)|\le\tfrac12$.)
5 $f:\mathbb R\to\mathbb R$, $f(x)=2x$ for $x\ge0$ and $f(x)=x$ for $x\lt0$. Is $f$ bijective?
6 $f:\mathbb N\to\mathbb N$, $f(n)=$ the number of digits of $n$. Is $f$ one-one? onto?
7 $f(x)=x^2-4x+5$. Find the smallest codomain $B$ for which $f:\mathbb R\to B$ is onto, and a domain of the form $[a,\infty)$ on which $f$ is one-one.
๐ก Show solutionsโถ
1 $x_1^2=x_2^2$ with $x_1,x_2\ge0$: $x_1=\pm x_2$, and the minus sign is only possible when both are $0$; so $x_1=x_2$. For $y\ge0$, $x=\sqrt y\ge0$ gives $f(x)=y$. Bijective.
2 $f(-1)=f(1)$: not one-one. For $y\ge1$, $x=\sqrt{y-1}$ gives $f(x)=y$: onto. (Compare Exercise II.5: only the codomain changed.)
3 $f(x)=1$ would need $x+1=x-1$: impossible, so images lie in $\mathbb R-\{1\}$. One-one: $(x_1+1)(x_2-1)=(x_2+1)(x_1-1)\Rightarrow x_2-x_1=x_1-x_2\Rightarrow x_1=x_2$. Onto: $y(x-1)=x+1\Rightarrow x=\dfrac{y+1}{y-1}$ ($y\ne1$), and $x=1$ would need $y+1=y-1$, impossible. Bijective.
4 $f(2)=\tfrac25$ and $f\!\left(\tfrac12\right)=\dfrac{1/2}{5/4}=\tfrac25$: not one-one. Since $(|x|-1)^2\ge0$, $1+x^2\ge2|x|$, so $|f(x)|\le\tfrac12$; hence $1$ is not an image: not onto.
5 For $x\ge0$ the values $2x$ fill $[0,\infty)$; for $x\lt0$ the values $x$ fill $(-\infty,0)$. These ranges do not overlap, and each piece is one-one, so $f$ is one-one; together they fill $\mathbb R$, so $f$ is onto. Bijective.
6 $f(1)=f(2)=1$: not one-one. For $k\in\mathbb N$, $f\!\left(10^{k-1}\right)=k$: onto.
7 $f(x)=(x-2)^2+1\ge1$, and every $y\ge1$ is reached at $x=2+\sqrt{y-1}$, so $B=[1,\infty)$. On $[2,\infty)$, $(x_1-2)^2=(x_2-2)^2$ with $x_1-2,x_2-2\ge0$ gives $x_1=x_2$: one-one (so $a=2$, or any $a\ge2$).
IV
Reasoning and modelling.
1Examinations. $120$ candidates are given roll numbers from $1001$ to $1120$, no two the same. Explain why the assignment is a bijection. What changes if the numbers run from $1001$ to $1150$?
2Library. $500$ books are placed on $40$ shelves. Explain why โbook $\mapsto$ its shelfโ cannot be one-one, and show that some shelf holds at least $13$ books.
3Transport. A taxi fare is $F(d)=50+15d$ rupees for a trip of $d$ km, $0\le d\le40$. Show that $F:[0,40]\to[50,650]$ is bijective, and find the distance for a fare of โน$200$.
4 True or false: if $A,B$ are finite, $n(A)=n(B)$ and $f:A\to B$ is one-one, then $f$ is onto. Give a reason.
5 Give an example of a function $\mathbb N\to\mathbb N$ that is onto but not one-one.
6 For which real numbers $a,b$ is $f:\mathbb R\to\mathbb R$, $f(x)=ax+b$, bijective? Justify.
๐ก Show solutionsโถ
1 โNo two the sameโ means one-one. There are $1120-1001+1=120$ numbers, equal to the number of candidates, so by Theorem 1.2 the assignment is onto as well: bijective. With $1001$โ$1150$ there are $150$ numbers; the map stays one-one but $30$ numbers are unused, so it is not onto.
2 $500\gt40$, so two books must share a shelf (pigeonhole). If every shelf held at most $12$ books, the shelves would hold at most $40\times12=480\lt500$ books, a contradiction. So some shelf holds at least $13$.
3 $F(0)=50$, $F(40)=650$, so images lie in $[50,650]$. One-one: $50+15d_1=50+15d_2\Rightarrow d_1=d_2$. Onto: for $y\in[50,650]$, $d=\tfrac{y-50}{15}\in[0,40]$. Fare โน$200$: $d=\tfrac{150}{15}=10$ km.
4 True โ this is Theorem 1.2: the $n$ different images fill all $n$ elements of $B$.
5 $f(1)=1$ and $f(n)=n-1$ for $n\ge2$: every $m\in\mathbb N$ equals $f(m+1)$, but $f(1)=f(2)=1$. (Exercise III.6 is another example.)
6 Exactly when $a\ne0$ ($b$ arbitrary). If $a\ne0$: $ax_1+b=ax_2+b\Rightarrow x_1=x_2$, and $x=\tfrac{y-b}{a}$ solves $f(x)=y$. If $a=0$, $f$ is the constant $b$: $f(0)=f(1)$, and $b+1$ is not an image.
How this is examined: Board papers ask you to show that a given function is (or is not) one-one and onto โ the onto part loses marks most often, because students solve for $x$ and forget to check that $x$ is in the domain. JEE asks for the type of a function in an MCQ, and counts functions.
E1.Board ยท 1 mark The function $f:\mathbb R\to\mathbb R$, $f(x)=x^4$, is (A) one-one and onto (B) many-one and onto (C) one-one but not onto (D) neither one-one nor onto
๐ก Show solutionโถ
Idea $f(-1)=f(1)=1$: not one-one. $x^4\ge0$, so $-1$ is not an image: not onto.
Answer (D). The trap is (B): $x^4$ is onto $[0,\infty)$, but the codomain here is $\mathbb R$.
E2.Board ยท 1 markAssertionโReason. Assertion (A): every one-one function $f:\{1,2,3\}\to\{p,q,r\}$ is onto. Reason (R): if $A$ and $B$ are finite sets with the same number of elements, a function $f:A\to B$ is one-one if and only if it is onto. (A) Both A and R are true and R is the correct explanation of A (B) Both A and R are true but R is not the correct explanation of A (C) A is true but R is false (D) A is false but R is true
๐ก Show solutionโถ
Idea R is Theorem 1.2, and A is the special case $n=3$.
Answer (A).
E3.Board ยท 3 marks Let $A=\mathbb R-\left\{\tfrac12\right\}$ and $B=\mathbb R-\left\{\tfrac32\right\}$. Show that $f:A\to B$, $f(x)=\dfrac{3x-1}{2x-1}$, is one-one and onto.
๐ก Show solutionโถ
Images in B $f(x)=\tfrac32$ would need $6x-2=6x-3$: impossible.
One-one If $f(x_1)=f(x_2)$ then $(3x_1-1)(2x_2-1)=(3x_2-1)(2x_1-1)$, i.e. $6x_1x_2-3x_1-2x_2+1=6x_1x_2-3x_2-2x_1+1$. Cancelling gives $-x_1=-x_2$, so $x_1=x_2$. (1 mark)
Onto For $y\in B$: $y(2x-1)=3x-1\Rightarrow x(2y-3)=y-1\Rightarrow x=\dfrac{y-1}{2y-3}$, defined since $y\ne\tfrac32$. If $x=\tfrac12$ then $2y-2=2y-3$, impossible, so $x\in A$, and $f(x)=y$. (2 marks)
Check $y=2$: $x=1$, $f(1)=\tfrac21=2$. โ
E4.Board ยท Case study A school in Lucknow gives each of its $40$ Class 12 students a locker. The lockers are numbered $1$ to $50$, every student gets exactly one locker and no locker is shared. Let $f$ assign to each student their locker number. (i) Is $f$ a function from the set $S$ of students to $L=\{1,\dots,50\}$, and is it one-one? [2 marks] (ii) Is it onto $L$? [1 mark] (iii) After $10$ new students join and each gets one of the empty lockers, what type of function is $f$? [1 mark]
๐ก Show solutionโถ
(i) It is a function: each student has exactly one locker number. It is one-one: no locker is shared, so different students have different numbers.
(ii) No: only $40$ of the $50$ numbers are used ($n(S)\lt n(L)$).
(iii) Now $n(S)=n(L)=50$ and $f$ is still one-one, so by Theorem 1.2 it is onto: a bijection.
E5.JEE Main The number of onto functions from $\{1,2,3,4\}$ to $\{a,b,c\}$ is (A) $24$ (B) $36$ (C) $64$ (D) $81$
๐ก Show solutionโถ
Method There are $3^4=81$ functions in all. Remove those that miss some letter: missing a given letter leaves $2^4=16$ functions, and there are $3$ letters, but the $3$ constant functions have been removed twice. Onto functions: $81-3\cdot16+3=36$.
Another way An onto function puts two of the four numbers together on one letter: choose the pair in $\binom42=6$ ways, then assign the three โblocksโ to $a,b,c$ in $3!=6$ ways: $36$.
Answer (B). Trap (D) $81$ counts all functions; (A) $24$ wrongly treats it as arranging $4$ objects.
E6.JEE Advanced(One or more options correct.) Let $f,g:\mathbb R\to\mathbb R$, $f(x)=x^3+x$ and $g(x)=x^3-x$. Then (A) $f$ is one-one (B) $f$ is onto (C) $g$ is one-one (D) $f\circ g$ is onto
๐ก Show solutionโถ
(A) True $f(a)-f(b)=(a-b)\left(a^2+ab+b^2+1\right)$ and $a^2+ab+b^2=\left(a+\tfrac b2\right)^2+\tfrac34b^2\ge0$, so the second factor is at least $1$. Hence $f(a)=f(b)\Rightarrow a=b$.
(B) True $f$ is a polynomial (so its graph has no breaks) that takes arbitrarily large positive and negative values, so every horizontal line meets its graph.
(C) False $g(-1)=g(0)=g(1)=0$.
(D) True $g$ is onto by the same argument as (B). For $y\in\mathbb R$ choose $u$ with $f(u)=y$, then $x$ with $g(x)=u$: $(f\circ g)(x)=y$. (Being onto survives composition; being one-one need not โ $f\circ g$ is not one-one, since $g$ is not.)
Answer (A), (B), (D). โฑ Fast route: $f'(x)=3x^2+1\gt0$, so $f$ is strictly increasing โ one-one at once.
๐ฌ ResearchโTeaching NexusMini project ยท about 45 minutes
Research question. In a class of $n$ students, how likely is it that the function โstudent $\mapsto$ birthdayโ is one-one โ that no two students share a birthday?
Why it matters. The same question decides how long ID numbers, PINs and computer โhash codesโ must be. Databases, UPI transaction IDs and digital signatures all rely on functions that are one-one in practice; a clash (two inputs, one output) can cause errors or security holes. The surprise is how early clashes appear.
What to do.
Collect the birthdays (day and month only) of your class, anonymously. Is the function one-one? By the pigeonhole principle, from which class size is a clash certain?
Ignoring 29 February, the chance that $n$ birthdays are all different is $p_n=\dfrac{365}{365}\cdot\dfrac{364}{365}\cdots\dfrac{365-n+1}{365}$. Build a spreadsheet column for $n=1,\dots,60$.
Find the smallest $n$ with $p_n\lt\tfrac12$.
Simulate: generate $n$ random days with RANDBETWEEN(1,365), check for duplicates, repeat $100$ times for $n=23$ and $n=40$, and compare with $p_n$.
Tools: Spreadsheet; class survey.
Hand in: Your class data, the table of $p_n$, your simulation results, and two sentences on what this means for choosing the length of a $4$-digit PIN.
Going further. Repeat with $10\,000$ possible PINs instead of $365$ days: how many users before a shared PIN becomes more likely than not?
Instructor note: $p_{23}\approx0.493$ is the first value below $\tfrac12$, $p_{30}\approx0.294$, $p_{40}\approx0.109$; a clash is certain from $n=366$. For $10\,000$ PINs the threshold is $n=119$.
๐งช Self-check quiz
0/5 correct
Q1. $f:\mathbb R\to\mathbb R$, $f(x)=x^2$, is
Q2. $n(A)=5$ and $n(B)=3$. A function $f:A\to B$ can be
Q3. $f:\mathbb Z\to\mathbb Z$, $f(n)=n+5$, is
Q4. To prove that $f:A\to B$ is onto you must show that
Q5. $f:\{1,2,3,4\}\to\{1,2,3,4\}$ is one-one. Then $f$