Skip to main content

Functions MCQ: f(x) = x, if x is rational 0, if x is irrational…

JEE · Mathematics · Functions

1 Easy +4 | -1 Analyzing
f(x)={x,    if    x    is    rational0,    if    x    is    irrationalf\left( x \right) = \left\{ {\begin{array}{cccccccccccccccccccc} {x,\;\;if\;\;x\;\;is\;\;rational}\\ {0,\;\;if\;\;x\;\;is\;\;irrational} \end{array}} \right. and
f(x)={0,    if    x    is    rationalx,    if    x    is    irrational  f\left( x \right) = \left\{ {\begin{array}{cccccccccccccccccccc} {0,\;\;if\;\;x\;\;is\;\;rational}\\ {x,\;\;if\;\;x\;\;is\;\;irrational\;} \end{array}} \right.. Then, f−gf - g is
View answer and explanation
Correct option: D
One-one and onto
Option D (One-one and onto) is correct because the function f-g is both injective (one-to-one) and surjective (onto).
Solution approach
  1. Correct Answer + Core Reason: One-one and onto. The function f-g is both injective and surjective.

    Step-by-Step Solution:

    Step 1: Define the functions f(x)f(x) and g(x)g(x):
    f(x)={x,if x is rational0,if x is irrationalf(x) = \begin{cases} x, & \text{if } x \text{ is rational} \\ 0, & \text{if } x \text{ is irrational} \end{cases}
    g(x)={0,if x is rationalx,if x is irrationalg(x) = \begin{cases} 0, & \text{if } x \text{ is rational} \\ x, & \text{if } x \text{ is irrational} \end{cases}

    Step 2: Find f(x)−g(x)f(x) - g(x):
    (f−g)(x)=f(x)−g(x)={x−0=x,if x is rational0−x=−x,if x is irrational(f - g)(x) = f(x) - g(x) = \begin{cases} x - 0 = x, & \text{if } x \text{ is rational} \\ 0 - x = -x, & \text{if } x \text{ is irrational} \end{cases}

    Step 3: Check for one-to-one (injective):\nLet (f−g)(x1)=(f−g)(x2)(f - g)(x_1) = (f - g)(x_2).\nIf x1x_1 and x2x_2 are both rational, then x1=x2x_1 = x_2.\nIf x1x_1 and x2x_2 are both irrational, then −x1=−x2⇒x1=x2-x_1 = -x_2 \Rightarrow x_1 = x_2.\nIf x1x_1 is rational and x2x_2 is irrational, then x1=−x2x_1 = -x_2. Since x1x_1 is rational and x2x_2 is irrational, x1=0x_1 = 0 and x2=0x_2 = 0. But 0 is rational, so this case is not possible.\nThus, (f−g)(x)(f - g)(x) is one-to-one.

    Step 4: Check for onto (surjective):\nLet y∈Ry \in \mathbb{R}. We want to find an xx such that (f−g)(x)=y(f - g)(x) = y.\nIf yy is rational, then let x=yx = y. Then (f−g)(x)=x=y(f - g)(x) = x = y.\nIf yy is irrational, then let x=−yx = -y. Then (f−g)(x)=−x=−(−y)=y(f - g)(x) = -x = -(-y) = y.\nThus, for every y∈Ry \in \mathbb{R}, there exists an x∈Rx \in \mathbb{R} such that (f−g)(x)=y(f - g)(x) = y. Therefore, (f−g)(x)(f - g)(x) is onto.

    Step 5: Conclusion: f−gf - g is one-to-one and onto.

    Why other options are wrong:
    - Option A (One-one and into): The function is onto, not into.
    - Option B (Neither one-one nor onto): The function is both one-one and onto.
    - Option C (Many one and onto): The function is one-one, not many-to-one.

    Key Concepts:
    - One-to-one (injective) functions
    - Onto (surjective) functions

    Memory Aids:
    - One-to-one: Each element in the range corresponds to a unique element in the domain.
    - Onto: Every element in the codomain is mapped to by at least one element in the domain.

    Quick Tips:
    - To check for one-to-one, show that f(x1)=f(x2)f(x_1) = f(x_2) implies x1=x2x_1 = x_2.
    - To check for onto, show that for every yy in the codomain, there exists an xx in the domain such that f(x)=yf(x) = y.

More Questions from Functions

Practice all chapter MCQs →
Type at least 2 characters or jump directly:

Save your learning progress

Sign in with a free account to save your practice answers and quiz results, then return to them when you revise.

Scan to install TopAll Pro

Point your Android or iPhone camera at this code to open TopAll Pro. Try 2 chapters and 25 AI credits free first.

Question image

Use + and − to zoom, arrow keys or drag to pan, Escape to close.