girgit.org

Relations and Functions

Signum and greatest integer functions

The big ideaSome functions jump instead of flowing: the signum function only reports whether a number is positive, zero or negative, and the greatest integer function \( [x] \) rounds every number down to an integer.

In simple words

One machine looks at a number and says only "plus", "zero" or "minus", as 1, 0 or −1. Another machine is like counting your age in whole years. On the day before your 17th birthday you are still 16, however close you are. Its graph looks like a flight of stairs. Some machines also follow one rule for some inputs and a different rule for others.

The signum function

The signum function \( f : \mathbf{R} \to \mathbf{R} \) ("signum" is Latin for "sign") is

\[ f(x) = \begin{cases} 1, & x \gt 0 \\ 0, & x = 0 \\ -1, & x \lt 0 \end{cases} \]

So \( f(8) = 1 \), \( f(0.001) = 1 \), \( f(0) = 0 \), \( f(-250) = -1 \). It ignores the size of the number and keeps only its sign. Domain \( = \mathbf{R} \), range \( = \{-1, 0, 1\} \).

For \( x \ne 0 \) you can also write it as \( \dfrac{|x|}{x} \): a positive number divided by itself gives 1, and \( \dfrac{|{-3}|}{-3} = \dfrac{3}{-3} = -1 \).

Its graph: three separate pieces.

  • For \( x \gt 0 \): a horizontal ray at height 1, running from just right of the \( y \)-axis off to the right. Its left end, \( (0, 1) \), is drawn as a hollow circle because \( x = 0 \) is not included.
  • At \( x = 0 \): a single solid dot at the origin, \( (0, 0) \).
  • For \( x \lt 0 \): a horizontal ray at height \( -1 \), running from just left of the \( y \)-axis off to the left, with a hollow circle at \( (0, -1) \).

The graph jumps at \( x = 0 \): from \( -1 \), down to the single point 0, up to 1.

The greatest integer function

The greatest integer function \( f : \mathbf{R} \to \mathbf{R} \) is \( f(x) = [x] \), where \( [x] \) is the greatest integer less than or equal to \( x \). (Some books call it the floor function and write \( \lfloor x \rfloor \).)

On a number line, \( [x] \) is the integer at or just to the left of \( x \):

  • \( [3.7] = 3 \), \( [3] = 3 \), \( [0.5] = 0 \).
  • \( [-0.5] = -1 \), \( [-2.3] = -3 \), \( [-2] = -2 \). For negatives it is not "drop the decimal": \( -2.3 \) lies between \( -3 \) and \( -2 \), and the integer on its left is \( -3 \).

From the definition, \( [x] \) stays fixed on each stretch between integers:

  • \( [x] = -1 \) for \( -1 \le x \lt 0 \)
  • \( [x] = 0 \) for \( 0 \le x \lt 1 \)
  • \( [x] = 1 \) for \( 1 \le x \lt 2 \)
  • \( [x] = 2 \) for \( 2 \le x \lt 3 \)

and so on in both directions. Domain \( = \mathbf{R} \), range \( = \mathbf{Z} \), the set of integers.

Its graph: a staircase. Over each interval \( [n, n + 1) \) it is a flat step at height \( n \), one unit long. Each step has a solid dot at its left end \( (n, n) \), because \( [n] = n \), and a hollow circle at its right end \( (n + 1, n) \), because at \( x = n + 1 \) the value has already jumped up to \( n + 1 \). The steps rise one unit at every integer, climbing to the right and falling to the left. On \( [0, 1) \) the step lies along the \( x \)-axis itself.

Try it: walk along the stairs, then try some negative numbers. Tap the function name to switch to the signum function.

Functions defined in pieces

The modulus, signum and greatest integer functions all use different rules on different parts of the number line. Any function can be built this way, as long as each \( x \) falls under exactly one rule (or the rules agree where they meet).

Worked example

Describe the graph of \( f(x) = \begin{cases} 2 - x, & x \lt 0 \\ 2, & x = 0 \\ 2 + x, & x \gt 0 \end{cases} \)

  1. For \( x \lt 0 \): \( f(-1) = 3 \), \( f(-2) = 4 \), \( f(-3) = 5 \). The values grow as you go left.
  2. At 0: \( f(0) = 2 \).
  3. For \( x \gt 0 \): \( f(1) = 3 \), \( f(2) = 4 \), \( f(3) = 5 \). The values grow as you go right.
  4. The graph is a V with its corner at \( (0, 2) \): the V of \( |x| \) lifted 2 units. In fact \( f(x) = 2 + |x| \). Range \( = [2, \infty) \).

Don't mix these up

  • \( [-1.2] = -2 \), not \( -1 \). Always go to the integer on the left.
  • \( [x] = x \) only when \( x \) is an integer.
  • The signum function has range \( \{-1, 0, 1\} \): three numbers, not the interval \( [-1, 1] \).

Try it. (a) Find \( [4.99] \), \( [-4.01] \) and \( [\pi] \). (b) For which \( x \) is \( [x] = 5 \)? (c) Find \( f(-7) + f(0) + f(\sqrt{2}) \) where \( f \) is the signum function.

Answer
(a) \( [4.99] = 4 \), \( [-4.01] = -5 \), \( [\pi] = 3 \) since \( \pi \approx 3.14 \). (b) All \( x \) with \( 5 \le x \lt 6 \), that is \( x \in [5, 6) \). (c) \( -1 + 0 + 1 = 0 \).

Words to know

Signum function
Gives 1 for positive, 0 for zero, \( -1 \) for negative inputs.
Greatest integer function \( [x] \)
The greatest integer less than or equal to \( x \).
Step graph
A graph made of flat pieces with jumps between them, like a staircase.
Hollow circle
Marks an end point that is not part of the graph.
Piecewise function
A function given by different rules on different parts of its domain.

What is \( [-3.6] \)?

  1. \( -3 \)
  2. \( -4 \)
  3. \( -3.5 \)

What is the range of the signum function?

  1. \( [-1, 1] \)
  2. \( \{-1, 1\} \)
  3. \( \{-1, 0, 1\} \)

On the graph of \( y = [x] \), what is drawn at the point \( (2, 1) \)?

  1. A solid dot
  2. A hollow circle
  3. Nothing at all