Sign Function
The sign function gives −1 for any negative real number, 0 for zero, or +1 for any positive real number.
It is written:
f(x) = sign(x)
or
f(x) = sgn(x)
This is its graph:
The Sign Function
Note the circles on the graph!
- The solid dot at (0, 0) means that when x is exactly 0, the function value is exactly 0
- The open circles at (0, 1) and (0, −1) show that those endpoints are not included. For example, if x is slightly positive (like 0.001), the value is 1, but at exactly 0, it jumps to 0
Connection to Absolute Value
For any number other than zero, we can use the absolute value function and write the sign function as:
sgn(x) = x|x|
Let's try it:
- If x = 5, then 5|5| = 55 = 1
- If x = −5, then −5|−5| = −55 = −1
Other
It is an odd function.
Plot the graph here.