Introduction

The sign function assigns to each real number its sign, disregarding its magnitude. The function is defined as follows:

\[sgn ( x ) = \{ - 1 & \text{if} x < 0 \\ 0 & \text{if} x = 0 \\ 1 & \text{if} x > 0 \forall x \in \mathbb{R}\]

Specifically, $sgn ( x )$ returns $- 1$ for negative values, $0$ when $x = 0$, and $1$ for positive values. The function does not quantify the magnitude of $x$ but solely indicates the position of $x$ relative to zero. For example, applying the definition we have:

\[sgn ( - 7 ) = - 1 sgn ( 0 ) = 0 sgn ( 4 ) = 1\]

The graph of $y = sgn ( x )$ consists of two horizontal rays and one isolated point. The ray on $y = - 1$ extends over all $x < 0$, the ray on $y = 1$ extends over all $x > 0$, and the isolated point at the origin $( 0 , 0 )$ lies on $y = 0$. The two rays approach but do not intersect the y-axis.

Sign function.

The sign function is classified as an odd function because it satisfies the identity:

\[sgn ( - x ) = - sgn ( x ) \forall x \in \mathbb{R}\]

Properties

  • Domain: $\mathbb{R}$.
  • Range: $- 1 , 0 , 1$.
  • The function is odd, since $sgn ( - x ) = - sgn ( x )$.
  • The function has exactly one root at $x = 0$, since $sgn ( x ) = 0$ only when $x = 0$.
  • The function is constant on $( - \infty , 0 )$ and on $( 0 , + \infty )$, hence increasing in the sense that it is non-decreasing over $\mathbb{R}$.
  • The function has a jump discontinuity at $x = 0$; it is continuous everywhere else.
  • The function is not differentiable at $x = 0$. It is differentiable, with zero derivative, at every other point.
  • Limits approaching $x = 0$ from either side: \(\underset{x \rightarrow 0^{-}}{lim} sgn ( x ) & = - 1 \\ \underset{x \rightarrow 0^{+}}{lim} sgn ( x ) & = 1\)

Since the two one-sided limits differ, the two-sided the following limit does not exist: \(\underset{x \rightarrow 0}{lim} sgn ( x )\)

Limits at infinity

As $x$ moves away from the origin in either direction, the sign function stabilizes at a constant value:

\[\underset{x \rightarrow - \infty}{lim} sgn ( x ) & = - 1 \\ \underset{x \rightarrow + \infty}{lim} sgn ( x ) & = 1\]

These are simply a consequence of the fact that $sgn ( x ) = - 1$ for all $x < 0$ and $sgn ( x ) = 1$ for all $x > 0$, so the function value does not change as $x$ moves further from zero.

Derivative and integral

On each of the two open half-lines where the sign function is constant, its derivative is zero:

\[\frac{d}{d x} sgn ( x ) = 0 \text{for} x \neq 0\]

At $x = 0$, the derivative does not exist because the function is discontinuous there. In the sense of distributions, however, the derivative of the sign function is:

\[\frac{d}{d x} sgn ( x ) = 2 \delta ( x )\]

$\delta ( x )$ is the Dirac delta, a generalised function that is zero everywhere except at the origin and integrates to one over the entire real line. This distributional identity demonstrates that the sign function exhibits a discontinuity of amplitude $2$ at the origin, as:

\(\underset{x \rightarrow 0^{-}}{lim} sgn ( x ) = - 1\) \(\underset{x \rightarrow 0^{+}}{lim} sgn ( x ) = 1\)

This amplitude explains the presence of the factor $2$ preceding the Dirac delta function.


The indefinite integral of the sign function, computed away from the origin, gives back the absolute value:

\[\int sgn ( x ) d x = | x | + c\]
This is consistent with the fact that the derivative of $ x $ equals $sgn ( x )$ wherever the former is differentiable.

Relationship with the absolute value function

A direct algebraic relationship exists between the sign function and the absolute value. For any $x \neq 0$, the following identity holds:

\[sgn ( x ) = \frac{x}{| x |}\]
This result is consistent with the definition: when $x > 0$, the ratio $x / x = x / x = 1$. When $x < 0$, the ratio $x / x = x / ( - x ) = - 1$. The formula is undefined at $x = 0$, so the value $sgn ( 0 ) = 0$ is assigned separately by convention.

Conversely, the absolute value can be expressed in terms of the sign function using the following identity:

\[| x | = x \cdot sgn ( x )\]
This identity holds for all $x \in \mathbb{R}$, including $x = 0$, where both sides are zero. Together, these two identities demonstrate that $ x $ and $sgn ( x )$ are complementary: the absolute value preserves magnitude and omits sign, whereas the sign function preserves sign and omits magnitude.

Two additional identities arise from the relationship between the sign function and the absolute value. The first identity is as follows:

\[x = | x | \cdot sgn ( x )\]
This identity expresses any real number as the product of its magnitude and its sign. The second identity utilises the equality $ x = \sqrt{x^{2}}$, which is valid for all $x \in \mathbb{R}$, and provides an alternative representation of the sign function for $x \neq 0$:
\[sgn ( x ) = \frac{x}{\sqrt{x^{2}}}\]

Relationship with the Heaviside step function

The Heaviside step function $H ( x )$ is defined as:

\[H ( x ) = \{ 0 & \text{if} x < 0 \\ \frac{1}{2} & \text{if} x = 0 \\ 1 & \text{if} x > 0\]

Heaviside step function.

The sign function and the Heaviside step function are related by a simple linear transformation. Specifically:

\[sgn ( x ) = 2 H ( x ) - 1\]

Equivalently, we have:

\[H ( x ) = \frac{1 + sgn ( x )}{2}\]

This relationship is frequently utilised as converting between these representations can simplify calculations. The Heaviside function maps $( - \infty , 0 )$ to $0$ and $( 0 , + \infty )$ to $1$, and may therefore be interpreted as a shifted and rescaled form of the sign function.