Ma · Mathematics

Is the Greatest Integer Function Monotonically Increasing?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check the convention

    Increasing can mean nondecreasing or strictly increasing; the answer depends on which definition is being used.

  2. 2. Compare inputs

    If x is no greater than y, their greatest integers cannot be in the opposite order.

  3. 3. Test strictness

    Two different inputs in the same unit interval have the same floor, so the function is not strictly increasing.

The greatest integer function is usually written ⌊x⌋\lfloor x\rfloor and returns the largest integer less than or equal to xx. Whether it is called “monotonically increasing” depends on the convention: some texts use that phrase to mean nondecreasing, while others reserve “increasing” for strictly increasing functions.

Under the nondecreasing definition, the answer is yes. Under the strict definition, the answer is no.

What the floor function does

For any real number xx, ⌊x⌋\lfloor x\rfloor is the integer nn satisfying

n≤x<n+1.n\leq x<n+1.

Thus the function is constant on every interval [n,n+1)[n,n+1), where nn is an integer. For instance, every number from 22 up to (but not including) 33 has floor 22:

⌊2⌋=⌊2.1⌋=⌊2.9⌋=2.\lfloor 2\rfloor=\lfloor 2.1\rfloor=\lfloor 2.9\rfloor=2.

At the next integer, the value jumps: ⌊3⌋=3\lfloor 3\rfloor=3.

Why it is nondecreasing

A function ff is nondecreasing if x≤yx\leq y implies f(x)≤f(y)f(x)\leq f(y). To check this for the floor function, suppose x≤yx\leq y, and let m=⌊x⌋m=\lfloor x\rfloor. By the definition of floor,

m≤x≤y.m\leq x\leq y.

Since mm is an integer no greater than yy, it cannot be larger than the greatest integer no greater than yy. Therefore m≤⌊y⌋m\leq\lfloor y\rfloor, or

⌊x⌋≤⌊y⌋.\lfloor x\rfloor\leq\lfloor y\rfloor.

This proves that the floor function is nondecreasing over all real numbers, including negative values.

A numerical example

Take x=−1.4x=-1.4 and y=0.2y=0.2. Since x<yx<y, compare their floors:

⌊−1.4⌋=−2,⌊0.2⌋=0.\lfloor-1.4\rfloor=-2, \qquad \lfloor0.2\rfloor=0.

The output has not gone down as the input increased: −2≤0-2\leq0. The negative example also illustrates that floor means rounding down toward negative infinity, not rounding toward zero. In particular, ⌊−1.4⌋\lfloor-1.4\rfloor is −2-2, not −1-1.

Why it is not strictly increasing

A function is strictly increasing if x<yx<y always implies f(x)<f(y)f(x)<f(y). The floor function does not satisfy this condition. Choose two distinct numbers in the same unit interval, such as 2.1<2.92.1<2.9. Then

⌊2.1⌋=2=⌊2.9⌋.\lfloor2.1\rfloor=2=\lfloor2.9\rfloor.

The inputs are strictly ordered, but the outputs are equal. In fact, the function is constant throughout each interval [n,n+1)[n,n+1), so there are many such counterexamples.

What happens at integers

The floor function never decreases as you move from left to right. It stays level between consecutive integers, then increases by one at each integer. For an integer nn, values just below nn have floor n−1n-1, while ⌊n⌋=n\lfloor n\rfloor=n. The function is right-continuous at integers, but it has a jump there.

This staircase shape is a useful way to distinguish monotonicity from continuity. A function can be monotone without being continuous, and it can be nondecreasing without being strictly increasing. The floor function has both of those features: it is nondecreasing and discontinuous at every integer.

Common mistakes

  • Treating “increasing” as having only one meaning. Check whether a problem defines increasing as nondecreasing or strictly increasing. If it does not, state which interpretation you are using.
  • Assuming monotone means strictly changing at every step. A nondecreasing function is allowed to stay constant over intervals.
  • Rounding negative numbers toward zero. The greatest integer less than or equal to −1.4-1.4 is −2-2, so ⌊−1.4⌋=−2\lfloor-1.4\rfloor=-2.
  • Confusing floor with ceiling. The ceiling function gives the least integer greater than or equal to its input; the floor gives the greatest integer less than or equal to it.

So, if “monotonically increasing” means nondecreasing, the greatest integer function is monotonically increasing. If the phrase means strictly increasing, it is not.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.