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

Exercise 1.2 · Q3: The greatest integer function

Exercise 1.2Types of functions · Exercise 1.2
The question

Prove that the Greatest Integer Function f:R→Rf : \R\to\R⁠, given by f(x)=[x]f(x) = [x]⁠, is neither one-one nor onto, where [x][x] denotes the greatest integer less than or equal to xx⁠.

Exam answer

f(1)=[1]=1f(1) = [1] = 1 and f(1.5)=[1.5]=1f(1.5) = [1.5] = 1⁠, but 1≠1.51 \ne 1.5⁠. So ff is not one-one.

[x][x] is an integer for every x∈Rx \in \R⁠, so 0.5∈R0.5 \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 greatest integer function rounds down to an integer. Two consequences settle the whole question. First, a whole interval of inputs is rounded down to the same integer (everything from 11 up to, but not including, 22 goes to 11⁠), so many inputs share one output: not one-one. Second, every output is an integer, so a non-integer value in the codomain R\R⁠, such as 0.50.5⁠, is never produced: not onto. Its graph is a staircase of flat steps, which shows both facts at a glance.

Given, to show, and the plan
Given
f:R→Rf : \R\to\R⁠, f(x)=[x]f(x) = [x]⁠, the greatest integer less than or equal to xx⁠.
To show
ff is not one-one, and ff is not onto.
Plan
(1) Make the definition usable: [x]=n[x] = n exactly when nn is an integer with n≤x<n+1n \le x < n+1⁠. (2) Not one-one: exhibit two different inputs with the same output, and verify each value from the definition. (3) Not onto: name a real number that is not an integer and prove no input reaches it. (4) Conclude.

Basics you need

1The greatest integer [x][x]

[x][x] is the largest integer that does not exceed xx⁠. Equivalently, [x]=n[x] = n means n∈Zn\in\Z and n≤x<n+1n \le x < n+1⁠. Examples: [2.7]=2[2.7] = 2⁠, [3]=3[3] = 3⁠, [−0.3]=−1[-0.3] = -1 and [−1.5]=−2[-1.5] = -2 (since −2≤−1.5<−1-2 \le -1.5 < -1⁠). For negative non-integers, rounding down moves away from zero. Basics: integers, even and odd

2Domain and codomain

Here both are R\R⁠. The codomain is the set outputs are allowed to land in; onto asks whether they land on all of it. Basics: what a function is

3One-one and onto

One-one: f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2)\Rightarrow x_1 = x_2 for all inputs (Definition 5). Onto: every yy in the codomain is f(x)f(x) for some input xx (Definition 6). Basics: one-one and onto

4Disproving a "for all" statement

Both properties are "for all" statements, so each is disproved by one explicit counterexample: a pair of inputs for one-one, a codomain value for onto. For onto, we must also prove that nothing maps to the chosen value. Basics: how to prove and disprove

Solution

  1. [x][x] is well defined for every real xx

    The intervals [n,n+1)[n, n+1)⁠, one for each integer nn⁠, are

    …, [−2,−1), [−1,0), [0,1), [1,2), [2,3), …\dots,\ [-2,-1),\ [-1,0),\ [0,1),\ [1,2),\ [2,3),\ \dots

    They follow on from each other without gaps or overlaps, so every real xx lies in exactly one of them, say [n,n+1)[n, n+1)⁠. Then n≤xn \le x⁠, so nn is an integer not exceeding xx⁠; and every larger integer is at least n+1>xn+1 > x⁠. So nn is the greatest integer ≤x\le x⁠, and [x]=n[x] = n⁠. Thus ff gives each real number exactly one output, and that output is an integer.

    We need two facts from this step. "Exactly one output" confirms ff is a function from R\R to R\R⁠. "The output is always an integer" is the key to the onto part. Writing [x]=n  ⟺  n≤x<n+1[x] = n \iff n \le x < n+1 also gives a reliable way to compute values, including for negative numbers, where guessing often goes wrong.
    The greatest integer ≤x\le x is the nn with n≤x<n+1n\le x<n+1 (Basic 1).
  2. Not one-one: f(1)=f(1.5)f(1) = f(1.5)

    Compute both values with the rule from Step 1:

    1≤1<2 ⟹ f(1)=[1]=1,1≤1.5<2 ⟹ f(1.5)=[1.5]=1.\begin{aligned} 1 \le 1 < 2 \ &\Longrightarrow\ f(1) = [1] = 1,\\ 1 \le 1.5 < 2 \ &\Longrightarrow\ f(1.5) = [1.5] = 1. \end{aligned}

    So f(1)=f(1.5)f(1) = f(1.5) although 1≠1.51 \ne 1.5⁠. Two different inputs have the same image, so ff is not one-one.

    One-one claims that equal outputs always come from equal inputs. A single pair that breaks this is a complete disproof. The pair is not special: every xx in [1,2)[1, 2) has [x]=1[x] = 1⁠, so infinitely many inputs share the output 11⁠. On the graph this is the flat step at height 1.
    One counterexample disproves a "for all" statement (Basic 4). Basics: how to prove and disprove
  3. Not onto: 0.50.5 is never an output

    The number 0.50.5 belongs to the codomain R\R⁠. By Step 1, f(x)=[x]f(x) = [x] is an integer for every x∈Rx\in\R⁠. Since 0<0.5<10 < 0.5 < 1⁠, the number 0.50.5 is not an integer, so

    f(x)≠0.5for every x∈R.f(x) \ne 0.5 \qquad \text{for every } x\in\R.

    No element of the domain is mapped to 0.50.5⁠, so ff is not onto.

    −2−111.523 xy f(1) = f(1.5) = 1 y = 0.5: never reached …… 12−1−2
    The graph of y=[x]y = [x] for −2≤x<3-2 \le x < 3 (scales differ). Each step [n,n+1)[n, n+1) sits at height nn⁠; the filled dot at its left end belongs to the graph and the open dot at its right end does not, because [n+1]=n+1[n+1] = n+1⁠. The flat step at height 1 contains both x=1x = 1 and x=1.5x = 1.5 (not one-one). The dashed line y=0.5y = 0.5 runs between two steps and meets the graph nowhere (not onto).
    To disprove onto we must choose a value in the codomain and show that no input reaches it. Checking a few inputs would not be enough; the argument "every output is an integer, and 0.50.5 is not" covers all real inputs at once. Any non-integer real number (2\sqrt2⁠, −3.7-3.7⁠, π\pi⁠, …) would serve equally well. The range of ff is exactly Z\Z⁠, which is much smaller than the codomain R\R⁠.
    Onto means every element of the codomain is an image (Basic 3). Definition 6, and the Remark after it: ff is onto if and only if its range equals the codomain. Basics: one-one and onto
  4. Conclude, and note what the codomain does

    ff is not one-one (Step 2) and not onto (Step 3), so the greatest integer function f:R→Rf : \R\to\R is neither one-one nor onto.

    If the codomain were Z\Z instead of R\R⁠, the function would become onto: for every integer mm⁠, m≤m<m+1m \le m < m+1⁠, so [m]=m[m] = m⁠, and mm is the image of itself. It would still not be one-one, because [1]=[1.5][1] = [1.5] does not depend on the codomain.

    Onto is a statement about the codomain, so changing the codomain can change the answer. One-one depends only on which inputs share outputs, so changing the codomain cannot repair it. This is why the question has to say f:R→Rf : \R\to\R⁠, and why both sets matter.
Result

f(x)=[x]f(x) = [x] from R\R to R\R is not one-one, because f(1)=f(1.5)=1f(1) = f(1.5) = 1 with 1≠1.51 \ne 1.5⁠, and not onto, because every value [x][x] is an integer, so the real number 0.50.5 in the codomain is never an image. Hence it is neither one-one nor onto, as required. (The textbook's answer list gives no entry for this "prove that" question; the result is the statement asked for.)

Check it with numbers

Using [x]=n  ⟺  n≤x<n+1[x] = n \iff n \le x < n+1⁠: [2.7]=2[2.7] = 2⁠, [3]=3[3] = 3⁠, [−0.3]=−1[-0.3] = -1⁠, [−1.5]=−2[-1.5] = -2⁠, [1.99]=1[1.99] = 1⁠, [1.5]=1[1.5] = 1⁠, [1]=1[1] = 1⁠. The last three show one output shared by several inputs. A computer check of 20012001 inputs from −10-10 to 1010 in steps of 0.010.01 gives only 2121 different outputs, all of them integers, and 0.50.5 is never among them.

Common mistakes
  1. Rounding negative numbers towards zero. [−1.5][-1.5] is −2-2⁠, not −1-1⁠: it must be an integer less than or equal to −1.5-1.5⁠.
  2. Choosing an integer to disprove onto. Every integer mm is reached ([m]=m[m] = m⁠). The missed values are the non-integers.
  3. Writing "not onto because the graph has gaps" with no specific value. Name a codomain value such as 0.50.5 and say why nothing maps to it.
  4. Drawing the steps with both ends filled. Each step includes its left end and excludes its right end; drawing both ends filled would make f(2)f(2) look like it had two values.
What to take away
  1. The working form of the definition is [x]=n  ⟺  n∈Z, n≤x<n+1[x] = n \iff n\in\Z,\ n \le x < n+1⁠.
  2. A function that is constant on an interval is never one-one. A function whose outputs all lie in a set that leaves out part of the codomain is never onto.
  3. Onto depends on the codomain: [x][x] is onto Z\Z but not onto R\R⁠.

Every fact used, and where it comes from

FactUsed inSource
[x][x] is the greatest integer ≤x\le xSteps 1 to 4Statement of Exercise 1.2, Q3
[x]=n  ⟺  n∈Z, n≤x<n+1[x] = n \iff n\in\Z,\ n \le x < n+1Steps 1, 2, 4The intervals [n,n+1)[n, n+1) cover R\R without overlap
Definition of one-oneStep 2Definition 5, Section 1.3 (Lesson: types of functions)
Definition of onto; onto   ⟺  \iff range = codomainSteps 3, 4Definition 6 and the Remark after it, Section 1.3
One counterexample disproves a "for all" statementSteps 2, 3Logic of quantifiers
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 →