Knaph

Piecewise Functions and Moving Graphs40 of 1002 min read

Step Functions

Aisha parks for 2 hours and 5 minutes. The garage charges $2 for every hour or part of an hour. How much does she pay, and why does the graph look like stairs?

Constant pieces that jump

A step function is constant on each piece and jumps from one value to the next. At this garage, up to 1 hour costs $2, over 1 and up to 2 hours costs $4, and over 2 and up to 3 hours costs $6.

Aisha's time is just over 2 hours, so she is in the third step: she pays $6. Even one minute into a new hour starts a new step.

A staircase graph of cost against hours parked. A step at 2 dollars from 0 to 1 hour, at 4 dollars from 1 to 2 hours, and at 6 dollars from 2 to 3 hours. Each step has an open dot on its left end and a closed dot on its right end.

Open and closed dots

At exactly 1 hour the garage charges $2, because the first step includes its right end. That end has a closed dot at (1,2)(1, 2). The next step starts with an open dot at (1,4)(1, 4), since 1 hour itself is not in it.

Each input has only one output, so the closed dot says which value is the real one.

Rounding down

The greatest integer function ⌊x⌋\lfloor x \rfloor gives the greatest whole number that is ≤x≤ x. So ⌊3.7⌋=3\lfloor 3.7 \rfloor = 3 and ⌊5⌋=5\lfloor 5 \rfloor = 5.

Careful with negatives: ⌊−2.5⌋=−3\lfloor -2.5 \rfloor = -3, because 3 below zero is the whole number just under −2.5-2.5, and −2-2 is above it. Its graph steps up at each whole number, with a closed dot on the left of each step and an open dot on the right.

The graph of the greatest integer function. Flat steps one unit long: height 0 from 0 to 1, height 1 from 1 to 2, height 2 from 2 to 3, each with a closed dot on its left end and an open dot on its right end. Height minus 1 from minus 1 to 0.

Careful

Rounding down is not cutting off the decimals for negatives: the greatest integer of −2.5 is −3, not −2.

Try it at home

  1. Find a price in your town that goes up in steps, such as postage or parking.
  2. Write its table and sketch its steps with open and closed dots.
  3. Find the greatest integer of 4.9, 4 and −0.5.

Words in this lesson

  • step function - a function that is constant on each piece and jumps between pieces.
  • greatest integer - the greatest whole number that is not more than the input.

Big idea

A step function holds one value over each interval, then jumps. A closed dot shows the value that belongs at the jump, and the greatest integer rounds down.

Test your understanding

Sign in to test your understanding of this lesson and track your progress.