On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Advanced Functions · Grade 9-12

Step Function Intuition

A step function is piecewise constant: it stays at a fixed output across each interval, then jumps abruptly at the cutoffs.

⌊x⌋ = greatest integer ≤x (floor function)

Quick Answer

A step function is piecewise constant: it stays at a fixed output across each interval, then jumps abruptly at the cutoffs. You use it whenever a rule charges, scores or counts by bands: postage by the ounce, parking by the started hour, letter grades, data-plan tiers. Inside a band, changing the input changes nothing; crossing a cutoff changes the output all at once. The floor function ⌊x⌋ and the ceiling function ⌈x⌉ are the two basic step functions, and most band rules are built from one of them.

Why This Matters

Threshold rules are everywhere prices and rules meet: shipping weights, parking meters, phone data tiers, age limits. Seeing them as step functions tells you that 2.1 hours and 2.9 hours of parking cost the same, and that the only inputs worth checking are the cutoffs. Treat such a rule as a smooth line and you will quote prices nobody charges, such as $2.40 for 2.4 hours of a $1-per-hour meter.

Intuitive Explanation

Picture a parking garage that charges $3 for every hour or part of an hour. Park 10 minutes: $3. Park 59 minutes: still $3. Park 61 minutes: $6. Plot cost against time and you get flat segments joined by sudden jumps, like the side view of a staircase. In symbols the cost is 3⌈t⌉, where ⌈t⌉ rounds the time t up to the next whole hour.

Two details decide every step-function answer. The first is which way the rounding goes: the ceiling ⌈2.3⌉=3 charges you for the partial unit, while the floor ⌊2.3⌋=2 drops it, the way your age in years ignores the months since your last birthday. The second is who owns the boundary. At exactly one hour, is the cost $3 or $6? The graph shows it with a closed dot at the end of one step and an open dot at the start of the next, and the wording of the rule ("up to and including", "more than") tells you which is which.

A taxi meter that charges $2 per mile, measured continuously, looks similar because the cost still rises with distance. But it rises inside every interval: 2.4 miles costs $4.80 and 2.5 miles costs $5.00. That graph is a sloped line with no flat parts. To tell them apart, nudge the input a little without crossing a cutoff: if the output does not move, you have a step function.

Think of it like this. A staircase seen from the side: you stay at one height along the whole tread and rise all at once at the riser, so walking further along a tread never lifts you. Unlike a real staircase, a step function can also step down, and it takes no value partway up the riser.

Core idea. A step function holds one constant value across a whole interval, then leaps to a new value at the boundary.


When to Use

Reach for a step function when a rule talks in bands: up to 1 oz, per started hour, each full year, tiers, brackets of scores or cutoffs for grades. Wording like rounded up or "any part of" calls for a ceiling; "complete" or "whole" units call for a floor. If the cost grows with every extra bit of input, as with a per-mile or per-gram price, use a linear function instead; if each piece has its own slope, it is a piecewise linear function.

Tip. Ask: Is the output constant within each interval and changing only by sudden jumps at boundaries?

How to Recognize It

Before using a step function, check whether a little more input ever changes the output by a little, or whether the output moves only when the input crosses a set cutoff.

  1. Is a partial unit charged as a full one, like 2 hours 10 minutes of parking billed as 3 hours?

    If yes, the rule rounds up, so use the ceiling ⌈x⌉. If a partial unit is dropped, like counting only complete years of age, use the floor ⌊x⌋. The wrong choice shifts every answer by one step.

  2. Within one band, does each extra bit of input still cost something extra, like a per-kilometre fare above 10 km?

    If yes, the pieces have slopes, so it is a piecewise linear function, not a step function. A step function charges the same for every input inside a band.

  3. Does the problem give a value exactly at a cutoff, such as a parcel weighing exactly 2 kg?

    If yes, read the band's endpoints carefully: 'up to and including 2 kg' puts it in the lower band, 'under 2 kg' puts it in the higher one. On a graph, the filled dot shows which band owns the point.

  4. Does the question ask for a rate of change inside a band?

    If yes, the answer is 0, because the output does not move between cutoffs; at a cutoff the rate is undefined, since the graph jumps. A nonzero rate inside a band means the function is not a step function.

Step Function Intuition compared with Piecewise linear function, Floor vs. ceiling, and Continuous function

Each row describes how the output reacts as the input passes a value, which is why they get confused. Ask whether the output stays flat between cutoffs, slopes between them, or never jumps at all, and whether a partial unit rounds up or down.

Step Function Intuition

Meaning
Use this when the output stays constant across an interval and only jumps at fixed thresholds.
Key test
Is the output constant within each interval and changing only by sudden jumps at boundaries?
Formula
⌊x⌋ = greatest integer ≤x (floor function)
Example
Mail costs $1 for up to 1 oz, $2 for over 1 up to 2 oz, $3 for over 2 up to 3 oz. What does a 2.4 oz letter cost?

Piecewise linear function

Meaning
Each piece is a sloped line segment, not a flat value.
Key test
Use when the output changes continuously within each piece, like a tax with a rate per bracket.
Formula
f(x)=mix+bi on each piece
Example
Phone plan charging per minute over the cap

Floor vs. ceiling

Meaning
Floor rounds down to the integer below; ceiling rounds up to the integer above.
Key test
Use ceiling when a partial unit still costs a full unit (postage), floor when you drop the remainder.
Formula
⌊x⌋ vs ⌈x⌉
Example
⌈2.1⌉=3 stamps; ⌊2.9⌋=2 full hours earned

Continuous function

Meaning
Output flows smoothly with no jumps.
Key test
Use when small input changes always cause small output changes.
Example
Temperature over time

Formula & Notation

⌊x⌋ = greatest integer ≤x (floor function)
⌊x⌋=max⁡{n∈Z∣n≤x}; ⌈x⌉=min⁡{n∈Z∣n≥x}

How to read it: ⌊x⌋ denotes the floor (greatest integer ≤x). ⌈x⌉ denotes the ceiling (least integer ≥x).

Worked Examples

Example 1 — Postage by ounces

Easy

Mail costs $1 for up to 1 oz, $2 for over 1 up to 2 oz, $3 for over 2 up to 3 oz. What does a 2.4 oz letter cost?
Show the steps and the answer
  1. List the bands with their endpoints: (0,1] costs $1, (1,2] costs $2, (2,3] costs $3.

    "Up to" includes the right end, so each band is open on the left and closed on the right.

  2. Place the letter: 2<2.4≤3, so 2.4 oz is in the third band.

    Only the band matters; where 2.4 sits inside the band does not change the price.

  3. Read that band's price: $3. The ceiling gives the same result: ⌈2.4⌉=3 ounces charged at $1 each.

    Every partial ounce is charged as a full ounce, which is exactly what rounding up does.

  4. Check two neighbours: 2.9 oz also costs $3, while 2.0 oz costs $2.

    The price stays flat inside the band and changes only once 2 oz is passed; 2.0 oz is still "up to 2".

Answer: $3

Takeaway: Find the band first, including which end it owns; inside the band the price is fixed, so the exact weight no longer matters.

Example 2 — Per-unit, not per-band

Standard

A taxi charges $2 per mile, billed continuously. Is a 2.4-mile fare a step function?
Show the steps and the answer
  1. Compare two nearby trips: 2(2.4)=4.80 and 2(2.5)=5.00.

    A 0.1-mile change moves the fare by 20 cents, so the output is not flat on any interval.

  2. Write the rule as C(x)=2x dollars for x miles.

    Billing continuously charges every fraction of a mile at the same rate: a line with slope 2.

  3. Evaluate: C(2.4)=2⋅2.4=4.80, a fare of $4.80.

    There are no bands to round to, so the exact distance is used.

  4. Contrast a meter charging $2 per started mile: 2⌈2.4⌉=2⋅3=6, a fare of $6.

    Billing per started unit is the change that would turn this same taxi into a step function.

Answer: No — it's continuous linear, $4.80

Takeaway: If every small change in the input changes the output, the rule is linear, not a step function; "per started unit" or "up to" wording is what creates steps.

Example 3 — Find the mistake: averaging between steps

Application

A garage charges $4 for up to 1 hour, $7 for more than 1 and up to 2 hours, and $10 for more than 2 and up to 3 hours. Priya parks for 1.5 hours and writes: "1.5 hours is halfway between 1 and 2 hours, so the cost is halfway between $4 and $7, which is $5.50." Find the mistake and correct it.
Show the steps and the answer
  1. Place 1.5 hours: 1<1.5≤2, the second band.

    The price depends only on which band the time is in.

  2. Name the error: Priya averaged the prices at the two ends, as if the cost climbed a slope between them.

    That is interpolation, which assumes the output changes inside a band; a step function is flat there, so $5.50 is never charged.

  3. Read the band's price: $7.

    Every stay from just over 1 hour up to 2 hours costs the same $7, including 1.5 hours.

  4. Check the jump: 1 hour costs $4, and 1 hour 1 minute costs $7.

    The whole $3 increase happens at the instant 1 hour is passed, not gradually across the hour.

Answer: $7

Takeaway: Never average between steps: find the band and read its single value.

Where You'll See It

  • Parking by the started hour

    A garage charging $3 per hour or part of an hour bills 3⌈t⌉. A stay of 2 hours 5 minutes costs 3⌈2.08⌉=3⋅3=9 dollars, while leaving at 1 hour 59 minutes costs 6 dollars. Crossing the 2-hour mark by a few minutes costs a full $3.

  • Your age in whole years

    Age is a floor function of the time since you were born: someone 15 years and 11 months old is ⌊15.92⌋=15. That is why an "under 16" ticket price changes on the birthday itself, not gradually through the year.

  • Phone data tiers

    A plan charging $10 for up to 2 GB and $15 for up to 5 GB bills 1.1 GB and 2.0 GB the same $10, but 2.01 GB jumps to $15. Cutting your usage only saves money if it takes you below a cutoff.

Common Mistakes

  1. The slip: Interpolating between steps

    Instead: within a step the value is constant, so a half-step input keeps the same output.

  2. The slip: Mixing up floor and ceiling at thresholds

    Instead: decide whether a partial unit rounds up (charged) or down (dropped).

  3. The slip: Getting the boundary endpoint wrong

    Instead: check whether the jump value belongs to the interval on the left or the right (open vs. closed).


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Evaluate ⌊3.7⌋, ⌊−1.2⌋ and ⌊5⌋.

    Hint: The floor is the greatest integer less than or equal to the number. Picture a number line for the negative one.

  2. A garage charges $4 for each hour or part of an hour. What does parking for 2 hours 10 minutes cost?

    Hint: Does a part of an hour round up or down here?

  3. A phone company bills calls at $0.25 per minute and rounds every call up to a whole minute. What do a 4.2-minute call and a 4.0-minute call cost?

    Hint: Use the ceiling: round up to the next whole minute only if there is a partial minute.

  4. Movie tickets cost $8 under age 12, $12 for ages 12 to 64, and $9 for 65 and over. What do tickets cost for a family aged 11, 12, 40 and 65?

    Hint: Check which band each boundary age belongs to.

  5. An income tax is 10% of income up to $10,000, plus 20% of each dollar above $10,000. Is tax owed a step function of income, or piecewise linear?

    Hint: Within one income band, does the tax stay flat or keep growing?

  6. Shipping costs $5 for up to 2 kg and $9 for over 2 kg up to 4 kg. A student says a 3 kg box costs $7, 'halfway between.' Find and correct the mistake.

    Hint: Is the price flat or changing inside each weight band?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

What is ⌊−2.3⌋, and why is it not −2?

The floor is the greatest integer less than or equal to the number. On the number line, −2-2 sits to the right of −2.3-2.3, so it is too big. The integer just below −2.3-2.3 is −3-3, so ⌊−2.3⌋=−3\lfloor -2.3 \rfloor = -3. Chopping off the decimal gives −2-2, which matches the floor only for positive numbers. The ceiling goes the other way: ⌈−2.3⌉=−2\lceil -2.3 \rceil = -2.

Is income tax a step function?

In most systems, no, even though tax brackets look like steps. A bracket rate such as 22% applies only to the dollars that fall inside that bracket, so the tax owed rises a little with each extra dollar, and its graph is piecewise linear. Crossing into a higher bracket never makes your whole income taxed at the higher rate. A true step would be a fixed fee that jumps to a new amount at each income cutoff.

Can a step function be continuous?

Only if it never actually steps. A function that is constant on one interval and then jumps to a new value has a break at the jump: from the left the graph approaches one height and from the right another. The only step functions with no break are constant functions, a single flat line. That is why graphs use an open dot and a filled dot at each cutoff: one height owns the point, and the other only approaches it.

How do I write 'round to the nearest whole number' with a floor?

Add one half, then take the floor: ⌊x+0.5⌋\lfloor x + 0.5 \rfloor. For x=3.4x = 3.4 this gives ⌊3.9⌋=3\lfloor 3.9 \rfloor = 3, and for x=3.6x = 3.6 it gives ⌊4.1⌋=4\lfloor 4.1 \rfloor = 4. Adding the half moves every cutoff from the whole numbers to the halves, so the jumps happen at 0.5, 1.5, 2.5 and so on. At exactly 3.5 it gives 4, matching the usual round-half-up rule.

Learning Path

← Before

Piecewise Function
Step Function Intuition

You are here

Next →

Nothing after this yet
Start from Piecewise Function: defining a rule interval by interval and reading conditions such as < and ≤. A step function is the special case where every piece is a constant, which brings in the floor and ceiling functions and careful reading of each boundary. It prepares you for tiered-pricing and rounding problems, for integer division in programming, and later for limits, where a jump is the standard example of a point with no limit.

See Also