Greatest integer function

The greatest integer function, also called step function, is a piecewise function whose graph looks like the steps of a staircase. The greatest integer function is denoted by f(x) = [x] and is defined as the greatest integer less or equal to x.

Example #1

[2.5] is the greatest integer less or equal to 2.5. 

Notice that the number we are looking for must meet two conditions.

  • The number has to be an integer.
  • The number has to be less than or equal to 2.5.  

Which number can you think of that is less than 2.5 and is an integer? That number is 2!

[2.5] = 2

Example #2

[-2.5] is the greatest integer less or equal to -2.5. 

Again, the number we are looking for must meet the following two conditions.

  • The number has to be an integer.
  • The number has to be less than or equal to -2.5.  

A common mistake by students is to say that [-2.5] = -2.
For [2.5] = 2, it appears that we just removed the .5. By the same token, students may think that all we need to do here is to remove the 0.5 and [-2.5] = -2. Wrong! 

[-2.5] is not equal to -2. Remember that we are looking for a number smaller than -2.5. The number that is smaller than -2.5 is -3, so [-2.5]= -3

Example #3

[4] is the greatest integer less or equal to 4. 

We are looking for a number less or equal to 4. Now, we need to pay more attention to the part or equal to 4. Since 4 is equal to 4, [4] = 4

Example #4

[0.5] is the greatest integer less or equal to 0.5. 

Again, focus on the word less and try to ignore as much as possible the word greatest. Which integer is less than 0.5? Since it is 0, [0.5] = 0. 

The greatest integer function is also called the floor function.

[x] = floor(x)

Graphing the greatest integer function

When graphing the greatest integer function, a table of values can be a great help. 

Choose values for x in the interval 0 ≤ x ≤ 1 and make a table with values of x and f(x)

x 0 0.2 0.6 0.99 1
f(x) 0 0 0 0 1


Choose values for x in the interval -1 ≤ x ≤ 0 and make a table with values of x and f(x)

x -1 -0.6 -0.5 -0.2 0
f(x) -1 -1 -1 -1 0

The graph for these two intervals is shown below. The only thing that is not included is [1] = 1.

Step function

Notice that the right endpoint of each step is an open circle. For points in the interval [0, 1], even if the value is 0.9999999, [0.9999999] = 0 since we are looking for the integer that is less than 0.9999999. Similarly, for points in the interval [-1, 0], even if the value is -0.00001, [-0.00001] = -1 since we are looking for the integer that is less than -0.00001. When x finally reaches 0, [0] = 0

Below is the graph for the greatest integer function in the interval [-5,6] 

Greatest integer function

Recent Articles

  1. Quadratic Formula: Easy To Follow Steps

    Jan 26, 23 11:44 AM

    Quadratic formula
    Learn about the quadratic formula, the discriminant, important definitions related to the formula, and applications.

    Read More

  2. Area Formula - List of Important Formulas

    Jan 25, 23 05:54 AM

    Frequently used area formulas
    What is the area formula for a two-dimensional figure? Here is a list of the ones that you must know!

    Read More

Tough algebra word problems

100 Tough Algebra Word Problems.

If you can solve these problems with no help, you must be a genius!

Math quizzes

 Recommended

Math vocabulary quizzes