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

Exercise 1.2 · Q5: The signum function

Exercise 1.2Types of functions · Exercise 1.2
The question

Show that the Signum Function f:R→Rf : \R \to \R⁠, given by f(x)={1,if x>00,if x=0−1,if x<0f(x) = \begin{cases} 1, & \text{if } x > 0 \\ 0, & \text{if } x = 0 \\ -1, & \text{if } x < 0 \end{cases} is neither one-one nor onto.

(In many PDF viewers the last line shows as "1, if x<0x < 0", with a blank space in front of the 1. The minus sign is in the file, but it uses a font that is not embedded, so some viewers do not draw it. The rule is −1-1 for negative xx⁠, as the signum function requires.)

Exam answer

f(1)=1f(1) = 1 and f(2)=1f(2) = 1⁠, but 1≠21 \ne 2⁠. So ff is not one-one.

The range of ff is {−1,0,1}\{-1, 0, 1\}⁠, so 2∈R2 \in \R is not the image of any xx⁠. So ff is not onto.

Hence ff is neither one-one nor onto.

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

The one idea this problem is built on

The signum function only ever reports the sign of xx⁠: positive, zero or negative. So it squeezes the whole real line into just three outputs, 11⁠, 00 and −1-1⁠. Squeezing infinitely many inputs into three outputs forces many inputs to share an output, so ff is not one-one. And three outputs cannot cover a codomain as large as R\R⁠, so ff is not onto.

Given, to show, and the plan
Given
The rule f(x)=1f(x) = 1 for x>0x>0⁠, f(0)=0f(0) = 0⁠, f(x)=−1f(x) = -1 for x<0x<0⁠, with domain R\R and codomain R\R⁠.
To show
(a) ff is not one-one; (b) ff is not onto.
Plan
(1) Confirm the three pieces cover every real number exactly once, so ff is a genuine function. (2) Not one-one: find two different inputs with the same output. (3) Find the range of ff by checking all three cases. (4) Not onto: name one real number outside the range and prove nothing maps to it. (5) Conclude.

Basics you need

1A function defined piece by piece

The signum rule has three pieces. To evaluate f(x)f(x)⁠, first decide which piece xx belongs to (is it positive, zero or negative?), then use only that piece. Basics: what a function is

2Trichotomy of real numbers

Every real number xx satisfies exactly one of x>0x>0⁠, x=0x=0⁠, x<0x<0⁠. So the three pieces never overlap and never leave a gap.

3One-one, and how to disprove it

ff is one-one if f(x1)=f(x2)f(x_1)=f(x_2) always forces x1=x2x_1=x_2 (Definition 5). This is a "for all" claim, so one pair x1≠x2x_1 \ne x_2 with f(x1)=f(x2)f(x_1)=f(x_2) is enough to disprove it. Basics: one-one and onto

4Onto, and how to disprove it

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 (Definition 6). Equivalently, the range of ff is all of YY⁠. To disprove it, name one y∈Yy\in Y and show that no xx gives f(x)=yf(x) = y⁠. Basics: proving and disproving

Solution

  1. Check that ff is a genuine function on R\R

    By trichotomy (Basic 2), each real xx is positive, zero or negative, and only one of these. So exactly one of the three formulas applies to each xx⁠, and it gives exactly one value. A few sample values:

    f(5)=1,f(0.001)=1,f(0)=0,f(−0.001)=−1,f(−7)=−1.f(5) = 1, \qquad f(0.001) = 1, \qquad f(0) = 0, \qquad f(-0.001) = -1, \qquad f(-7) = -1.
    A piecewise rule is a function only if every input falls in exactly one piece. If the pieces overlapped (say "x≥0x \ge 0" and "x=0x = 0"), the input 0 would get two different values; if there were a gap, some input would get none. Trichotomy rules out both problems. Notice also that the size of xx never matters, only its sign: f(0.001)f(0.001) and f(5)f(5) are both 1.
    A function from XX to YY assigns to every element of XX exactly one element of YY⁠. Basics: what a function is
  2. Not one-one: two different inputs, one output

    Both 1 and 2 are positive, so the first piece applies to both:

    f(1)=1andf(2)=1.f(1) = 1 \qquad\text{and}\qquad f(2) = 1.

    So f(1)=f(2)f(1) = f(2) although 1≠21 \ne 2⁠. Two different inputs share an output, so ff is not one-one. (It is many-one, in the textbook's word from Definition 5.)

    "One-one" says: for every pair of inputs, equal outputs force equal inputs. A single pair that breaks this destroys the claim, so the pair 1, 2 is a complete proof. Any two positive numbers would do just as well, and so would any two negative numbers, such as f(−1)=f(−3)=−1f(-1) = f(-3) = -1⁠. In fact every output except 0 is shared by infinitely many inputs.
    To disprove a "for all" statement, one counterexample is enough. Basics: proving and disproving
  3. Find the range by checking every case

    Take any x∈Rx\in\R⁠. By trichotomy there are exactly three cases:

    • If x>0x > 0⁠, then f(x)=1f(x) = 1⁠.
    • If x=0x = 0⁠, then f(x)=0f(x) = 0⁠.
    • If x<0x < 0⁠, then f(x)=−1f(x) = -1⁠.

    So every output is one of 1,0,−11, 0, -1⁠, and each of the three really occurs (for example f(1)=1f(1)=1⁠, f(0)=0f(0)=0⁠, f(−1)=−1f(-1)=-1⁠). Hence

    Range of f={−1, 0, 1}.\text{Range of } f = \{-1,\ 0,\ 1\}.
    −3−2−1123 −22 x y y = 2: no point of the graph on this line f(1) = f(2) = 1 y = 1 for x > 0 y = −1 for x < 0 f(0) = 0
    The graph of the signum function. The left ray sits at height −1-1 and the right ray at height 11⁠; the open dots at x=0x=0 show that those rays do not include x=0x = 0⁠, whose value is the filled dot f(0)=0f(0)=0⁠. The two green points show f(1)=f(2)=1f(1)=f(2)=1 (not one-one). The dashed line y=2y=2 meets no point of the graph (not onto).
    To show that ff misses some value, we need to know exactly which values it does take. Because the cases cover all real numbers, this list of three values is complete: no input can produce anything else. Without the case check we would only have examples, and examples cannot prove that a value is never reached.
    Proof by cases: if every possibility falls into one of the listed cases, a conclusion checked in each case holds for all xx⁠. Basics: proving and disproving
  4. Not onto: the value 2 is never reached

    The codomain is R\R⁠, and 2∈R2\in\R⁠. Is there an x∈Rx\in\R with f(x)=2f(x) = 2⁠? By Step 3, f(x)f(x) is always 11⁠, 00 or −1-1⁠, and none of these equals 2. So no real xx satisfies f(x)=2f(x) = 2⁠: the element 2 of the codomain is not the image of any element of the domain. Hence ff is not onto.

    The same argument works for every real number other than −1,0,1-1, 0, 1⁠, for example 12\tfrac12⁠, −5-5 or π\pi⁠. The range {−1,0,1}\{-1,0,1\} is a tiny part of the codomain R\R⁠.

    "Onto" says every element of the codomain is hit. To disprove it we pick one element and show it is never hit. Showing "never" needs a general reason, not trial and error, and Step 3 supplies it: the full list of possible outputs does not contain 2. This is also the textbook's Remark after Definition 6 in action: ff is onto exactly when its range equals the codomain, and here {−1,0,1}≠R\{-1,0,1\} \ne \R⁠.
    Onto means range = codomain (Remark after Definition 6). To disprove onto, exhibit one codomain element with no preimage. Basics: one-one and onto
  5. Conclude

    ff is not one-one (Step 2) and not onto (Step 4). So the signum function f:R→Rf:\R\to\R is neither one-one nor onto.

    The two failures are independent and each needs its own reason: one is about inputs colliding, the other about outputs being missed. Note that changing the codomain to {−1,0,1}\{-1,0,1\} would make ff onto, but it would still not be one-one, because 1 and 2 would still collide.
Result

The signum function is not one-one, because f(1)=f(2)=1f(1) = f(2) = 1 with 1≠21 \ne 2⁠. It is not onto, because its range is only {−1,0,1}\{-1, 0, 1\}⁠, so a codomain element such as 2 is the image of no real number. Hence it is neither one-one nor onto, as required.

Check it with numbers

Evaluate ff at the 17 inputs −4,−3.5,−3,…,3.5,4-4, -3.5, -3, \dots, 3.5, 4 (steps of 0.5). The 8 negative inputs all give −1-1⁠, the input 0 gives 00⁠, and the 8 positive inputs all give 11⁠. Seventeen inputs produce just three distinct outputs, {−1,0,1}\{-1, 0, 1\}⁠, so collisions are unavoidable, and the value 2 never appears.

Common mistakes
  1. Reading the printed rule as "1 if x<0x<0". The minus sign does not show in some PDF viewers; the signum function gives −1-1 for negative inputs. (With "1" there the conclusion would be the same, but the function would not be the signum function.)
  2. Picking a counterexample for onto that is in the range. −1-1⁠, 00 and 11 are all reached; choose something else, such as 2.
  3. Showing only examples for "not onto". Saying "I tried several xx and never got 2" is not a proof. The case check in Step 3 is what proves 2 is never reached.
  4. Putting the endpoint in the wrong piece on the graph. At x=0x = 0 the value is 0, so the rays at heights 11 and −1-1 must end in open dots.
What to take away
  1. If a function on an infinite set takes only finitely many values, it cannot be one-one.
  2. To prove "not onto", first find the exact range by checking every case, then pick a codomain element outside it.
  3. One-one and onto are separate questions with separate reasons; answer both.

Every fact used, and where it comes from

FactUsed inSource
Each real number is positive, zero or negative, and only one of these (trichotomy)Steps 1, 3Order properties of the real numbers
The signum function and its graphQuestion, Step 3Class XI; recalled at the start of Section 1.3
f(1)=f(2)=1f(1) = f(2) = 1⁠, f(0)=0f(0) = 0⁠, f(−1)=−1f(-1) = -1Steps 2, 3Direct substitution into the signum rule
Definition of one-one (and of many-one)Step 2Definition 5, Section 1.3 (Lesson: types of functions)
Definition of onto; onto ⇔ range = codomainStep 4Definition 6 and the Remark after it, Section 1.3
One counterexample disproves a "for all" statementSteps 2, 4Logic of quantifiers
All numerical valuesCheckRecomputed 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 →