The greatest integer function, explained from scratch
The greatest integer function sends a number to the greatest integer that is less than or equal to it: , and , because on the number line it always lands on the first integer at or to the left of the number. That makes its graph a staircase of flat steps, each closed at one end and open at the other, and the same staircase, with a minus sign inside the bracket and another in front, is the rule behind any price charged per started block.
What the function does to a number
Read as an instruction: stand at on the number line and walk left until you reach an integer. If you are standing on one already, stay where you are.
- . The integers at or below 3.7 are , and the greatest of them is 3.
- . The definition says less than or equal to, so 4 is its own answer. The function leaves every integer where it is.
- . Walking left from , the first integer you meet is . The integer lies to the right of , so it is too big to count.
An integer plus a leftover
A second way to see it settles negative numbers for good. Every real number can be split, in exactly one way, into an integer and a leftover that is at least 0 and less than 1:
The integer is . For the first two numbers the split is plain: and . The negative one is where it earns its keep: , so . Splitting into and a leftover of does not count, because the leftover has to be at least 0.
Written as inequalities, the same fact reads: exactly when . Both forms are used below.
A word on notation. The ministry's notation guide for secondary mathematics writes the greatest integer of with square brackets, , so you may meet that form in class. This site writes , as its worksheets do. The two mean exactly the same function.
Why the graph is a staircase
- Nothing changes between two integers. Every in splits as with , so on that whole interval. Over it, the graph is a flat segment at height 3.
- At each integer the output jumps by 1. , but .
- The jump decides the dots. The point is on the graph, so the step at height 4 begins with a closed dot. The point is not, because is 4, so the step at height 3 ends with an open dot: it runs right up to 4 without reaching it.
- So every step is half-open. For the steps are : one unit long, one unit above the step before, closed on the left and open on the right.
Worked example 1: every number that goes to −4
Find every with .
- By the definition, means .
- So , that is, .
- Check both ends. , so belongs. , so does not.
- Check a point inside: is in the interval, and , as found above.
The answer is the bottom step of the figure, closed at its left end and open at its right.
Why it models anything charged per started block
On every step a whole interval of inputs shares one output, and that is exactly how a price paid by the block behaves: flat while you stay inside one block, then a jump the moment the next one begins. Take a parking lot that charges $3 for each started 20 minutes.
Worked example 2: the parking rule
Write the cost , in dollars, of a stay of minutes, .
- Count blocks by hand first. A 5-minute stay starts one block. So does a 20-minute stay: it fills the first block exactly and starts no second one. A 21-minute stay starts two blocks, a 40-minute stay still two, a 41-minute stay three.
- Turn the count into inequalities. A stay that starts blocks is longer than blocks and no longer than blocks:
- Multiply every part by . Both inequality signs reverse:
- Recognize the definition. That is with and , so
- Price the blocks. At $3 a block:
- Test at a step end and just past it. , and . Forty minutes is two blocks, $6; half a minute more starts a third, $9.
In the rule , this is , , and . The negative is what moves the closed dot to the right end of every step: the $6 step is , because a 40-minute stay is still two blocks.
The plain function counts the other kind of block: is the number of completed 20-minute blocks, two in a 47-minute stay. Whole years of age and full boxes are counted that way; anything charged "per block or part of a block" needs the two minus signs.
The trap: "completed blocks plus one". The number of started 20-minute blocks is . Adding one to the number of completed blocks looks like the same thing and agrees for almost every , which is why it survives a quick check. It goes wrong at every multiple of 20: a 40-minute stay has started two blocks, and completed-plus-one counts three. Test a rule at the end of a step, never only in the middle of one.
Check your understanding
No calculator needed.
- Evaluate , and .
- Find and .
- Which of these points lie on the graph of : , , and ?
- How many multiples of 7 are there from 1 to 100? Show that the count is and explain why.
- True or false, with a reason: if , then .
- Each situation counts blocks. Say whether it counts completed blocks or started blocks, and write the count with the greatest integer function. (a) A person's age in whole years, years after birth. (b) The number of 30-second blocks billed for a phone call of seconds, when every started block is billed. (c) The number of complete dozens in eggs.
- A laundromat dryer costs $2 for every started 15 minutes. A student models a cycle of minutes with , tests it at and at , and both tests match the price list. Find a cycle length where the model is wrong, explain why the tests missed it, and give a correct rule.
Show the answers
- , and . . , so its greatest integer is , not . And is already an integer, so it is its own answer.
- , since . : from you get , and the function takes the integer on the left.
- and are on the graph. is the open dot at the end of the step , and it is not on the graph because . is not on it either: .
- 14. The multiples are with , that is , and the largest whole number allowed is , because . The count is the number of completed blocks of 7 in 100.
- False. only says that is in . For , . The statement holds only for in .
- (a) Completed: . (b) Started: , so a 31-second call is billed for 2 blocks. (c) Completed: , so 30 eggs make 2 dozen with 6 left over.
- It is wrong at , and at 30, 45 and every other multiple of 15: , but a 15-minute cycle starts only one block, which costs $2. The tests at 10 and 25 both fell in the middle of a step, and the model differs from the price list only at the step ends. A correct rule is .
Practise it
The free Secondary 4 step functions worksheet takes the staircase further: the parameters , , and , graphing with the right dots, and pricing problems, with the methods explained on the page. Solving an equation such as is practised in the Secondary 4 equations and inequalities worksheet.
Want one-on-one help with this? I offer Secondary 4 and 5 math tutoring in Montreal, in person or online. Sessions start with a short written diagnostic, and a written recap goes to whoever books after every session.
Practise the greatest integer function
Sources
- Notations, symboles et représentations utilisés en mathématique (secondaire) — Ministère de l'Éducation. Checked 2026-10-05.