In short

The greatest integer function [x] (also written \lfloor x \rfloor) returns the largest integer that is less than or equal to x. For positive numbers this is "round down": [3.7] = 3. For negative numbers the floor is below the number on the number line: [-2.3] = -3. The graph is a staircase of horizontal segments, each closed on the left and open on the right. This function appears throughout number theory, combinatorics, and competitive-exam problems.

Picture the fare chart at an auto-rickshaw stand in Pune. The meter shows ₹23 per kilometre, but the driver rounds the distance down to the nearest whole kilometre before multiplying. If your ride is 4.8 km, the driver charges you for 4 km, not 5. If your ride is exactly 5.0 km, the driver charges for 5 km. That act of rounding down — always toward the smaller integer, never up — is precisely what the greatest integer function does.

Mathematicians call it the floor function and write it as \lfloor x \rfloor. In Indian textbooks for class 11, the standard notation is [x] and the standard name is the greatest integer function (GIF). Both notations mean the same thing: the largest integer that does not exceed x.

The definition

Greatest Integer Function

For any real number x, the greatest integer function [x] is defined as the largest integer n such that n \le x. Equivalently:

[x] = n \quad \text{where } n \in \mathbb{Z} \text{ and } n \le x < n+1

Domain: \mathbb{R}. Range: \mathbb{Z} (the set of all integers).

Here are some values to build your intuition:

x [x] Reasoning
3.7 3 The largest integer \le 3.7 is 3
3.0 3 The largest integer \le 3.0 is 3 itself
0.5 0 The largest integer \le 0.5 is 0
-0.5 -1 The largest integer \le -0.5 is -1, not 0
-2.3 -3 The largest integer \le -2.3 is -3, not -2
-4.0 -4 An integer is its own floor

The negative cases are where most errors happen. The floor of -2.3 is -3, not -2, because -2 > -2.3 — the integer -2 is above the number, not below it. The floor must be at or below the number on the number line.

Number line showing floor of negative 2.3 equals negative 3A number line from negative 5 to 2. The point negative 2.3 is marked. An arrow points left from negative 2.3 to negative 3, which is circled and labelled as the floor. The integer negative 2 is shown to the right of negative 2.3, with a note that it is too large. −5 −4 −3 −2 −1 0 −2.3 [−2.3] = −3 −2 is too large
On the number line, $-2.3$ sits between $-3$ and $-2$. The floor function picks the integer to the *left* (the smaller one): $[-2.3] = -3$. The common mistake is to pick $-2$, which is to the right and therefore larger than $-2.3$.

The fractional part

A companion to [x] is the fractional part \{x\} = x - [x]. It measures how far x sits above its floor.

The fractional part always satisfies 0 \le \{x\} < 1. When x is an integer, \{x\} = 0. When x is not an integer, \{x\} is a positive number less than 1.

The identity x = [x] + \{x\} holds for every real number. This decomposition — splitting a real number into its integer part and its fractional part — is useful in number theory, modular arithmetic, and many competition problems.

The staircase graph

The graph of y = [x] is a staircase. On each interval [n, n+1), the function takes the constant value n. At x = n, the function jumps to the next step.

Staircase graph of the greatest integer functionA staircase graph. Horizontal segments are drawn at integer heights. Each segment is closed on the left (solid dot) and open on the right (hollow dot). The stairs go from negative 3 to 4. The y-axis is labelled y equals bracket x. x y 1 2 3 4 −1 −2 1 2 −1 −2
The staircase graph of $y = [x]$. Each step is a horizontal segment. The solid dot on the left of each segment means the left endpoint is included ($[n] = n$). The hollow dot on the right means the right endpoint is excluded (just before $n+1$, the function still equals $n$, then it jumps at $x = n+1$). The function is constant between consecutive integers and has a jump discontinuity at every integer.

Key features of the staircase:

Properties of [x]

Here are the algebraic properties you will use most often.

Property 1. [x] \le x < [x] + 1 for all x \in \mathbb{R}.

This is a restatement of the definition. The floor [x] is at most x, and the next integer [x] + 1 is strictly greater than x.

Property 2. [x] = x if and only if x is an integer.

If x is already an integer, its floor is itself. If x is not an integer, the floor is strictly less.

Property 3. [x + n] = [x] + n for any integer n.

Adding an integer to x shifts the staircase by n steps. The fractional part does not change: \{x + n\} = \{x\}.

Property 4. [x] + [y] \le [x + y] \le [x] + [y] + 1 for all x, y.

The floor of a sum is not simply the sum of the floors. It could be one more. For example, [1.7] + [1.6] = 1 + 1 = 2, but [1.7 + 1.6] = [3.3] = 3 = 2 + 1.

Property 5. [-x] = -[x] when x is an integer, and [-x] = -[x] - 1 when x is not an integer.

This is why the negatives are tricky. For non-integer x, the floor of -x is one less than the negative of [x].

Illustration of Property 3: adding an integer to x shifts the floorTwo number lines. The top one shows x equals 2.7 with floor 2. The bottom one shows x plus 3 equals 5.7 with floor 5. The floors differ by exactly 3. x = 2.7 1 2 3 4 5 2.7 [2.7] = 2 x + 3 = 5.7 3 4 5 6 7 5.7 [5.7] = 5 = 2 + 3
Property 3 in action. Adding $3$ to $x = 2.7$ gives $5.7$. The floor jumps from $2$ to $5$ — exactly $3$ more. The fractional part $0.7$ stays the same.

The graph of y = \{x\}

Since \{x\} = x - [x], the fractional part graph is a sawtooth wave. On each interval [n, n+1), \{x\} = x - n — a line segment rising from 0 to just below 1, then dropping back to 0 at the next integer.

Sawtooth graph of the fractional part functionA repeating sawtooth pattern. On each unit interval, a line rises from 0 to just below 1, then drops back to 0. Solid dots are at the left of each tooth (y equals 0) and hollow dots at the right (just below y equals 1). x y 1 1 2 3 4 −1 −2
The fractional part function $y = \{x\}$. Each tooth rises linearly from $0$ (included) to just below $1$ (excluded), then resets. The pattern repeats with period $1$. The range is $[0, 1)$.

The fractional part function is periodic with period 1: \{x + 1\} = \{x\} for all x. Its range is [0, 1).

Applications

The greatest integer function appears in several practical and theoretical settings.

Counting multiples. The number of multiples of d in the set \{1, 2, 3, \ldots, n\} is \left[\frac{n}{d}\right]. For instance, the number of multiples of 7 up to 100 is \left[\frac{100}{7}\right] = [14.28\ldots] = 14.

Postage and pricing. When a post office charges ₹5 for the first 10 grams and ₹2 for each additional 10-gram slab, the charge for a letter weighing w grams is 5 + 2 \cdot \left[\frac{w - 1}{10}\right] (for w > 10). The floor function captures the "slab" structure of the pricing.

The staircase in competitive problems. Many JEE and olympiad problems ask you to evaluate sums, solve equations, or sketch graphs involving [x]. The key technique is to break the real line into intervals [n, n+1) and work on each interval separately, since [x] = n is constant on that interval.

Two worked examples

Example 1: Sketch $y = x - [x]$ and find its domain and range

Step 1. Recognise that x - [x] = \{x\}, the fractional part function.

Why: by definition, \{x\} = x - [x]. Recognising this saves you from graphing from scratch — you already know the shape.

Step 2. On each interval [n, n+1), the value is x - n. At x = n, this is 0. Just before x = n+1, this approaches 1. So each piece is a line segment from (n, 0) to just before (n+1, 1).

Why: since [x] = n on [n, n+1), the expression x - [x] simplifies to x - n, a linear function of x with slope 1.

Step 3. At each integer, the function resets to 0. The graph is a sawtooth wave.

Why: at x = n+1, the floor jumps to n+1, so x - [x] = (n+1) - (n+1) = 0. The function drops from just below 1 back to 0.

Step 4. State domain and range.

Domain: \mathbb{R} (every real number has a fractional part). Range: [0, 1) (the fractional part is always at least 0 and strictly less than 1).

Result: Domain = \mathbb{R}. Range = [0, 1). The graph is the sawtooth wave.

Sawtooth graph of y equals x minus floor of xA sawtooth graph with teeth rising from 0 to just below 1 on each unit interval. Solid dots at each integer mark y equals 0. Hollow dots just before each next integer mark y approaching 1. x y 1 1 2 3 −1
The fractional part function $y = \{x\} = x - [x]$. Each rising segment has slope $1$. The solid dots at the bottom of each tooth show that $\{n\} = 0$ for every integer $n$. The hollow dots at the top show that the value $1$ is never reached — $\{x\}$ gets arbitrarily close to $1$ but never equals it.

The sawtooth pattern repeats with period 1. At every integer the function resets to 0, confirming that the range is [0, 1) — the value 1 is never achieved.

Example 2: Solve $[x]^2 - 5[x] + 6 = 0$

Step 1. Let n = [x]. Since [x] is always an integer, n \in \mathbb{Z}. The equation becomes n^2 - 5n + 6 = 0.

Why: substituting n = [x] converts the problem into a standard quadratic in integers, which is much easier to handle.

Step 2. Factor the quadratic: n^2 - 5n + 6 = (n - 2)(n - 3) = 0, so n = 2 or n = 3.

Why: the product of two factors is zero exactly when at least one factor is zero.

Step 3. Convert back to x. If [x] = 2, then 2 \le x < 3. If [x] = 3, then 3 \le x < 4.

Why: the definition of [x] = n means n \le x < n + 1. Each integer solution for n gives an entire interval of x-values.

Step 4. Combine the intervals: x \in [2, 3) \cup [3, 4) = [2, 4).

Why: the two intervals share the endpoint x = 3, which is included in the second interval. Together they cover everything from 2 to just below 4.

Result: x \in [2, 4).

Number line showing solution set x in [2, 4)A number line from 0 to 6. The interval from 2 to 4 is shaded. A solid dot at 2 and a hollow dot at 4 indicate the interval is closed on the left and open on the right. Below the line, two sub-intervals are labelled: [2,3) where floor equals 2, and [3,4) where floor equals 3. 0 1 2 3 4 5 [x] = 2 [x] = 3 solution: [2, 4)
The solution set $[2, 4)$ shown on the number line. The left sub-interval $[2, 3)$ corresponds to $[x] = 2$, and the right sub-interval $[3, 4)$ corresponds to $[x] = 3$. Together, they form one continuous interval.

The key move is the substitution n = [x]: it converts a floor-function equation into a polynomial in integers, which you can factor. After solving for n, you convert each integer back into an interval of real numbers.

Common confusions

Going deeper

The properties and graph above are enough for class 11. The material below explores a formula useful in competition mathematics and a connection to number theory.

Hermite's identity

For any real x and positive integer n:

[nx] = [x] + \left[x + \frac{1}{n}\right] + \left[x + \frac{2}{n}\right] + \cdots + \left[x + \frac{n-1}{n}\right]

This says that the floor of nx can be computed by summing n floors of x shifted by \frac{k}{n} for k = 0, 1, \ldots, n-1.

For n = 2: [2x] = [x] + \left[x + \frac{1}{2}\right].

Check with x = 1.3: [2.6] = 2. And [1.3] + [1.8] = 1 + 1 = 2. It works.

Check with x = 1.7: [3.4] = 3. And [1.7] + [2.2] = 1 + 2 = 3. Correct again.

Prime factorisation and Legendre's formula

The highest power of a prime p that divides n! is given by:

\nu_p(n!) = \left[\frac{n}{p}\right] + \left[\frac{n}{p^2}\right] + \left[\frac{n}{p^3}\right] + \cdots

The sum is finite because eventually p^k > n and the floor becomes 0.

For n = 100, p = 5: \left[\frac{100}{5}\right] + \left[\frac{100}{25}\right] + \left[\frac{100}{125}\right] = 20 + 4 + 0 = 24. So 100! has exactly 24 factors of 5 in its prime factorisation — and therefore exactly 24 trailing zeros (since there are more than enough factors of 2).

This is a classic application of the floor function to number theory, and it appears regularly in olympiad problems and JEE Advanced.

Where this leads next

The greatest integer function is the first in a family of "special" functions that behave differently from the smooth, continuous functions you met in graphs of basic functions. Here is what connects to it.