Class 12 Maths, Worked in Full Past papersGet updates
Chapter 1 · Relations and Functions

Exercise 1.2 · Q1: f(x)=1/xf(x)=1/x on the non-zero reals

Exercise 1.2Types of functions · Exercise 1.2
The question

Show that the function f:R∗→R∗f : \R_* \to \R_* defined by f(x)=1xf(x) = \dfrac{1}{x} is one-one and onto, where R∗\R_* is the set of all non-zero real numbers. Is the result true, if the domain R∗\R_* is replaced by N\N with co-domain being same as R∗\R_*⁠?

Exam answer

One-one: Let x1,x2∈R∗x_1, x_2 \in \R_* with f(x1)=f(x2)f(x_1) = f(x_2)⁠. Then 1x1=1x2\frac{1}{x_1} = \frac{1}{x_2}⁠, so x1=x2x_1 = x_2⁠. Thus ff is one-one.

Onto: Let y∈R∗y \in \R_*⁠. Then x=1y∈R∗x = \frac1y \in \R_* and f(x)=11/y=yf(x) = \frac{1}{1/y} = y⁠. Thus ff is onto.

So ff is one-one and onto.

With domain N\N⁠: let g:N→R∗g : \N \to \R_*⁠, g(x)=1xg(x) = \frac1x⁠. As above, g(n1)=g(n2)⇒n1=n2g(n_1) = g(n_2) \Rightarrow n_1 = n_2⁠, so gg is one-one.

But 2∈R∗2 \in \R_*⁠, and 1n=2⇒n=12∉N\frac1n = 2 \Rightarrow n = \frac12 \notin \N⁠. So 2 has no preimage, and gg is not onto.

No. With domain N\N the function is one-one but not onto.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Taking the reciprocal undoes itself: 11/y=y\frac{1}{1/y} = y⁠. So for any non-zero yy⁠, the number x=1yx = \frac1y is sent to yy⁠, and no other number is. That gives one-one and onto on R∗\R_* at once. The second part changes only the domain, to N\N⁠, and keeps the codomain R∗\R_*⁠. The formula is the same, but now the inputs are only 1,2,3,…1, 2, 3, \dots⁠, so the outputs are only 1,12,13,…1, \frac12, \frac13, \dots⁠. One-one survives, but most of R∗\R_* (for example 22⁠) is never reached. Whether a function is one-one or onto depends on its domain and codomain, not on the formula alone.

Given, to show and find, and the plan
Given
f(x)=1xf(x) = \frac1x⁠, first as a function R∗→R∗\R_* \to \R_*⁠, where R∗={x∈R:x≠0}\R_* = \{x\in\R : x \ne 0\}⁠; then as a function g:N→R∗g : \N \to \R_* with the same rule g(x)=1xg(x) = \frac1x⁠.
To show
f:R∗→R∗f : \R_*\to\R_* is one-one and onto.
To find
Whether g:N→R∗g : \N\to\R_* is still one-one and onto.
Plan
(1) Check that ff really maps R∗\R_* into R∗\R_*⁠. (2) One-one: assume f(x1)=f(x2)f(x_1) = f(x_2) and derive x1=x2x_1 = x_2⁠. (3) Onto: for an arbitrary y∈R∗y\in\R_*⁠, produce x∈R∗x\in\R_* with f(x)=yf(x)=y⁠. (4) Repeat both tests for gg on N\N⁠: one-one carries over, onto fails, and we exhibit a specific value that is never reached.

Basics you need

1Domain and codomain are part of the function

A function f:X→Yf : X \to Y consists of a domain XX⁠, a codomain YY and a rule that gives each x∈Xx\in X exactly one image in YY⁠. Changing XX or YY gives a different function, even if the formula is unchanged. Basics: what a function is

2One-one (injective)

ff is one-one if for every x1,x2x_1, x_2 in the domain, f(x1)=f(x2)f(x_1) = f(x_2) implies x1=x2x_1 = x_2 (Definition 5). To prove it, start from f(x1)=f(x2)f(x_1)=f(x_2) with x1,x2x_1, x_2 arbitrary and reach x1=x2x_1 = x_2⁠. Basics: one-one and onto

3Onto (surjective)

f:X→Yf : X\to Y is onto if for every y∈Yy\in Y there is an x∈Xx\in X with f(x)=yf(x) = y (Definition 6). To disprove it, name one y∈Yy\in Y and show that no x∈Xx \in X gives it.

4Reciprocals

Every real x≠0x \ne 0 has a reciprocal 1x\frac1x⁠, which is again non-zero (since x⋅1x=1≠0x\cdot\frac1x = 1 \ne 0⁠). Multiplying both sides of an equation by a non-zero number gives an equivalent equation. Zero has no reciprocal, which is why 00 is removed from R∗\R_*⁠.

5Natural numbers

N={1,2,3,… }\N = \{1, 2, 3, \dots\}⁠. A number such as 12\frac12 is not in N\N⁠. If n∈Nn\in\N⁠, then n≥1n \ge 1⁠, so 0<1n≤10 < \frac1n \le 1⁠. Basics: integers, even and odd

Solution

  1. Check that ff maps R∗\R_* into R∗\R_*

    Take any x∈R∗x\in\R_*⁠, so x≠0x \ne 0⁠. Then 1x\frac1x is defined, and it is a single real number. It is not zero, because

    x⋅1x=1≠0,x \cdot \frac1x = 1 \ne 0,

    and if 1x\frac1x were 00⁠, the product on the left would be 00⁠. So f(x)=1x∈R∗f(x) = \frac1x \in \R_* for every x∈R∗x \in \R_*⁠: ff is a genuine function from R∗\R_* to R∗\R_*⁠.

    The question states f:R∗→R∗f : \R_*\to\R_*⁠, and both halves of the proof depend on it. One-one needs f(x)f(x) to be defined for every input (that is why 00 is excluded from the domain), and onto only makes sense if all outputs lie in the stated codomain (that is why 00 is excluded from the codomain too: 1x\frac1x is never 00⁠).
    A product of real numbers is zero only if one of the factors is zero. Since x⋅1x=1x\cdot\frac1x = 1⁠, neither factor can be zero (Basic 4).
  2. One-one: equal reciprocals force equal numbers

    Let x1,x2∈R∗x_1, x_2\in\R_* be arbitrary and suppose f(x1)=f(x2)f(x_1) = f(x_2)⁠, that is,

    1x1=1x2.\frac{1}{x_1} = \frac{1}{x_2}.

    Multiply both sides by x1x2x_1x_2⁠, which is non-zero because x1≠0x_1 \ne 0 and x2≠0x_2 \ne 0⁠:

    x1x2⋅1x1=x1x2⋅1x2x2=x1.\begin{aligned} x_1x_2\cdot\frac{1}{x_1} &= x_1x_2\cdot\frac{1}{x_2}\\ x_2 &= x_1. \end{aligned}

    So f(x1)=f(x2)f(x_1)=f(x_2) implies x1=x2x_1 = x_2⁠, and ff is one-one.

    One-one is a statement about every pair of inputs, so we work with arbitrary x1,x2x_1, x_2⁠, not with chosen numbers. Clearing the fractions turns the equation into x2=x1x_2 = x_1 directly. Multiplying by x1x2x_1x_2 is allowed only because it is not zero; multiplying by zero would turn any equation into 0=00 = 0 and prove nothing.
    Definition 5: ff is one-one if f(x1)=f(x2)⇒x1=x2f(x_1)=f(x_2) \Rightarrow x_1=x_2 for all x1,x2x_1, x_2 in the domain (Basic 2). Basics: one-one and onto
  3. Onto: every non-zero yy is a reciprocal

    Take an arbitrary y∈R∗y\in\R_*⁠. We want x∈R∗x\in\R_* with 1x=y\frac1x = y⁠. Solving for xx (multiply both sides by xx⁠, then divide by y≠0y\ne0⁠) suggests x=1yx = \frac1y⁠. Now check this candidate:

    • x=1yx = \frac1y is defined because y≠0y \ne 0⁠, and it is non-zero by Step 1, so x∈R∗x\in\R_*⁠;
    • f(x)=11/y=yf(x) = \dfrac{1}{1/y} = y⁠.

    Every y∈R∗y\in\R_* is the image of 1y∈R∗\frac1y\in\R_*⁠, so ff is onto. Together with Step 2, f:R∗→R∗f : \R_*\to\R_* is one-one and onto (bijective).

    Onto is again a "for every yy" claim, so we take a general yy and build an input. Solving f(x)=yf(x) = y tells us where to look; the two checks then prove that the candidate is a legal input (it lies in the domain R∗\R_*⁠) and that it really works. Here the inverse of ff is ff itself: applying the reciprocal twice gives back the number you started with.
    Definition 6: f:X→Yf : X\to Y is onto if every y∈Yy\in Y equals f(x)f(x) for some x∈Xx\in X (Basic 3). Dividing 1 by a fraction flips it: 11/y=y\frac{1}{1/y} = y⁠.
  4. The second question: same rule, new domain N\N

    Now consider g:N→R∗g : \N\to\R_*⁠, g(x)=1xg(x) = \frac1x⁠. It is a function into R∗\R_*⁠: every n∈Nn\in\N is non-zero, so 1n\frac1n is defined and, by Step 1, non-zero.

    The formula has not changed, but the set of inputs has shrunk from all non-zero reals to {1,2,3,… }\{1, 2, 3, \dots\}⁠, while the codomain is still all of R∗\R_*⁠. So both properties have to be tested again.

    One-one and onto are properties of the triple (domain, codomain, rule). Shrinking the domain can only remove inputs, so it can never create two inputs with the same output (one-one is safe), but it can leave outputs unreached (onto is at risk). The next two steps confirm exactly this.
    A function is its domain, codomain and rule together (Basic 1). Basics: what a function is
  5. gg is still one-one

    Let n1,n2∈Nn_1, n_2\in\N with g(n1)=g(n2)g(n_1) = g(n_2)⁠, that is, 1n1=1n2\frac{1}{n_1} = \frac{1}{n_2}⁠. Both are non-zero, so multiplying by n1n2n_1n_2 exactly as in Step 2 gives n2=n1n_2 = n_1⁠. Hence gg is one-one.

    The algebra of Step 2 used only that x1x_1 and x2x_2 are non-zero real numbers. Natural numbers are non-zero real numbers, so the same argument applies word for word. (In general, restricting a one-one function to a smaller domain keeps it one-one.)
  6. gg is not onto: the value 22 is never reached

    The number 22 belongs to the codomain R∗\R_*⁠. Suppose some n∈Nn\in\N had g(n)=2g(n) = 2⁠. Then

    1n=2 ⟹ 1=2n ⟹ n=12.\frac1n = 2 \ \Longrightarrow\ 1 = 2n \ \Longrightarrow\ n = \frac12.

    But 12\frac12 is not a natural number, so no n∈Nn\in\N has g(n)=2g(n) = 2⁠. Therefore gg is not onto.

    In fact far more is missed. For n∈Nn \in \N we have n≥1n \ge 1⁠, so 0<1n≤10 < \frac1n \le 1⁠: every output of gg lies in (0,1](0, 1]⁠. Every negative number (such as −1-1⁠) and every number greater than 11 is missed, and so is a value like 0.30.3 inside (0,1](0,1]⁠, since 1n=0.3\frac1n = 0.3 would need n=103n = \frac{10}{3}⁠.

    −3−2−11234 xy y = 2 (1/2, 2): but 1/2 is not in N green dots: inputs n = 1, 2, 3, 4, 5 y = −1 (−1, −1) 12−1−2
    The graph of y=1xy = \frac1x on R∗\R_* (horizontal and vertical scales differ). Every horizontal line y=cy = c with c≠0c \ne 0 meets the curve exactly once, at x=1cx = \frac1c⁠: that is one-one and onto for f:R∗→R∗f : \R_*\to\R_*⁠. When only natural-number inputs are allowed (green dots), all heights lie in (0,1](0, 1]⁠. The line y=2y = 2 still meets the curve, but at x=12x = \frac12⁠, which is not a green dot, so g:N→R∗g : \N\to\R_* does not reach 2.
    To disprove onto we need one concrete value of the codomain and a proof that nothing in the domain maps to it. Solving 1n=2\frac1n = 2 finds the only real candidate, n=12n=\frac12 (Step 2 showed the reciprocal is one-one, so there cannot be another). Since that single candidate is not in the domain N\N⁠, the value 2 is unreached. Compare Step 3: on R∗\R_* the same candidate 12\frac12 was allowed, which is exactly why ff was onto.
    To disprove "for every yy there is an xx", produce one yy for which there is no xx (Basic 3). Basics: how to prove and disprove
  7. Answer the question

    The "result" was that the function is one-one and onto. With domain N\N and codomain R∗\R_*⁠, the function is one-one but not onto. So the result is not true.

    The question asks whether "the result" (both properties together) still holds. One property failing is enough for the answer "No", but a complete answer says which property survives and which fails, with a reason for each.
Result

(a) f:R∗→R∗f : \R_*\to\R_*⁠, f(x)=1xf(x)=\frac1x⁠, is one-one (1x1=1x2⇒x1=x2\frac1{x_1}=\frac1{x_2}\Rightarrow x_1=x_2⁠) and onto (every y∈R∗y\in\R_* equals f ⁣(1y)f\!\left(\frac1y\right)⁠), so it is bijective.

(b) No. With domain N\N and codomain R∗\R_*⁠, the function g(x)=1xg(x) = \frac1x is still one-one, but it is not onto: for example 2∈R∗2\in\R_* is not an image, because 1n=2\frac1n=2 forces n=12∉Nn=\frac12\notin\N⁠. (Textbook answer: "No".)

Check it with numbers

On R∗\R_*⁠: y=−25y = -\frac25 should come from x=1y=−52x = \frac1y = -\frac52⁠, and indeed f ⁣(−52)=1−5/2=−25f\!\left(-\frac52\right) = \frac{1}{-5/2} = -\frac25⁠. ✓ On N\N⁠: the first outputs are g(1)=1g(1) = 1⁠, g(2)=12g(2) = \frac12⁠, g(3)=13g(3) = \frac13⁠, g(4)=14g(4) = \frac14⁠, all different (one-one ✓) and all in (0,1](0,1]⁠. Since gg is decreasing, the outputs never climb back above 11⁠, so 22 is never produced. A computer search over n=1,…,10 000n = 1, \dots, 10\,000 finds no nn with 1n=2\frac1n = 2⁠, as expected.

Common mistakes
  1. Forgetting to check that the preimage is in the domain. In part (a), x=1yx = \frac1y must be non-zero; in part (b), 12\frac12 fails precisely this check.
  2. Multiplying by x1x2x_1x_2 without saying why it is allowed. The step is valid only because x1x2≠0x_1x_2 \ne 0⁠.
  3. Answering "No, because it is not one-one". It is one-one on N\N⁠. The failure is onto.
  4. Thinking the answer depends only on the formula 1x\frac1x⁠. The same formula is bijective on R∗\R_* and not onto from N\N⁠. The domain and codomain decide.
What to take away
  1. To prove onto, solve f(x)=yf(x) = y for an arbitrary yy⁠, then check the solution lies in the domain and really works.
  2. Shrinking the domain keeps one-one but can destroy onto. Enlarging the codomain has the same effect on onto.
  3. A "not onto" proof needs one specific codomain value and an argument that nothing maps to it.

Every fact used, and where it comes from

FactUsed inSource
A non-zero real has a non-zero reciprocal; 11/y=y\frac{1}{1/y} = ySteps 1, 3Arithmetic of real numbers
Multiplying an equation by a non-zero number keeps it equivalentSteps 2, 5, 6Algebra of equations
Definition of one-one (injective)Steps 2, 5Definition 5, Section 1.3 (Lesson: types of functions)
Definition of onto (surjective)Steps 3, 6Definition 6, Section 1.3
Bijective means one-one and ontoSteps 3, 7Definition 7, Section 1.3
n∈N⇒0<1n≤1n\in\N \Rightarrow 0 < \frac1n \le 1⁠; 12∉N\frac12 \notin \NStep 6N={1,2,3,… }\N = \{1,2,3,\dots\}
All numerical values and graph coordinatesCheck, figureRecomputed exactly in the site's verification script
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →