Greatest integer, least integer and fractional part
The floor function [x], the ceiling function and the fractional part of x: definitions, step graphs and their properties.
Lesson 5 of 12
5 min read
7 practice questions
What this lesson covers
Some functions round a real number to an integer. The greatest integer function rounds down, the least integer function rounds up, and the fractional part function keeps what is left over. This lesson defines all three, describes their step-shaped graphs and lists their properties.
Greatest integer function
If x∈R and n≤x<n+1 with n∈Z, then f(x)=n is called the greatest integer function, step function or floor function. It is written [x] and read "step x". In words, [x] is the greatest integer that is less than or equal to x.
Examples: [1.5]=1, [−1.5]=−2, [1.2]=1, [−1.2]=−2, [1]=1, [−1]=−1. Notice that for a negative non-integer we move down to the next integer, not towards zero.
Reading off intervals:
x in
[x]
[−2,−1)
−2
[−1,0)
−1
[0,1)
0
[1,2)
1
[2,3)
2
[x] is defined for every real x: domain =R, range =Z.
Graph. The graph is a staircase of horizontal segments. On each interval [n,n+1) it is the segment at height n, with a filled dot at the left end (n,n) and an open dot at the right end (n+1,n).
Properties of the greatest integer function
[x]≤x for all x∈R.
[x]=x⟺x∈Z.
[x]<x⟺x∈R−Z.
[x]>x for no real x.
If x∈R and k∈Z, then [x+k]=[x]+k.
[−x]=−[x] for x∈Z.
[−x]=−[x]−1 for x∈R−Z.
[x]+[−x]=0 for x∈Z, and [x]+[−x]=−1 for x∈R−Z.
For k∈Z: [x]≥k⇒x∈[k,∞).
For k∈Z: [x]>k⇒x∈[k+1,∞).
For k∈Z: [x]≤k⇒x∈(−∞,k+1).
For k∈Z: [x]<k⇒x∈(−∞,k).
[[x]]=[x] for all x∈R.
x−1<[x]≤x for all x∈R.
[x+y]=[x]+[y+x−[x]] for all x,y∈R.
[x+y]≥[x]+[y] for x,y∈R.
[x+y]=[x]+[y] when {x}+{y}<1, where {x} and {y} are the fractional parts of x and y.
[nx]+[nx+1]+[nx+2]+⋯+[nx+n−1]=[x], for n∈N.
[x]+[x+n1]+[x+n2]+⋯+[x+nn−1]=[nx], for n∈N.
Properties 9 to 12 are what you use to solve inequalities like [x]≥3: think of the number line marked at k−1, k, k+1.
Least integer function
For x∈R, the least integer greater than or equal to x is called the least integer function or ceiling function. In these lessons it is written (x); another common notation is ⌈x⌉.
With numbers it is clearer to use the second notation. Examples: ⌈3.2⌉=4, ⌈−2.3⌉=−2, ⌈5⌉=5.
(x)=⎩⎨⎧−1,0,1,2,−2<x≤−1−1<x≤00<x≤11<x≤2
and so on. Domain =R, range =Z.
Graph. Again a staircase, but now on each interval (n−1,n] the segment is at height n, with an open dot at the left end and a filled dot at the right end.
Properties of the least integer function
Here I denotes the set of integers.
((x))=(x).
(x)=[x]=x if x∈I, and (x)=[x]+1 if x∈/I.
(x)+(−x)=0 if x∈I, and (x)+(−x)=1 if x∈/I.
(x)−(−x)=2x if x∈I, and (x)−(−x)=2(x)−1 if x∈/I.
(x)=(2x)+(2x−1).
(x)+(x+n1)+(x+n2)+⋯+(x+nn−1)=(nx)+n−1, for n∈N.
(2n+1)+(4n+2)+(8n+4)+⋯+(2nn+2n−1)=2n−1, for n∈N (a sum of n terms).
Fractional part of x
For x∈R, the function f(x)=x−[x] is called the fractional part of x, written {x}. If x=n+f with n∈Z and 0≤f<1, then {x}=f.
Graph. On each interval [n,n+1) the graph is a slanted segment rising from (n,0) towards (n+1,1), never reaching the line y=1. It looks like the teeth of a saw. Domain =R, range =[0,1).
Example 1
Solve [x]=3 and [x]≤−2.
[x]=3 means 3≤x<4, so x∈[3,4). By property 11 with k=−2, [x]≤−2 gives x∈(−∞,−1).
Example 2
Find [−4.3]+[4.3] and {−4.3}.
[−4.3]=−5 and [4.3]=4, so the sum is −1 (property 8). {−4.3}=−4.3−(−5)=0.7.
Practice
Find [2.9], [−0.1], ⌈2.9⌉ and ⌈−0.1⌉.
Find {5.25} and {−5.25}.
Solve [x]>2.
Solve [x]<−1.
Find [x]+[−x] when x=7.5.
Use property 19 with n=3 to evaluate [0.4]+[0.4+31]+[0.4+32].