Sign function

From Freepedia

Image:Signum.png In mathematics and especially in computer science, the sign function is a logical function which extracts the sign of a real number. To avoid confusion with the sine function, this function is often called the signum function. The sign function is often represented as sgn and can be defined thus:

<math> \sgn x = \left\{ \begin{matrix}

-1 & : & x < 0 \\ 0 & : & x = 0 \\ 1 & : & x > 0 \end{matrix} \right. </math>

or using the Iverson bracket notation:

<math>\ \sgn x = -[x < 0] + [x > 0] </math>

Any real number can be expressed as the product of its absolute value and its sign function:

<math> x = ( \sgn x ) |x|. \qquad \qquad (1)</math>

From equation (1) it follows that whenever x is not equal to 0 we have

<math> \sgn x = {x \over |x|} \qquad \qquad (2) </math>

The signum function is the derivative of the absolute value function (up to the indeterminacy at zero):

<math> {d |x| \over dx} = {x \over |x|}. </math>

The signum function is differentiable with derivative 0 everywhere except at 0. It is not differentiable at 0 in the ordinary sense, but under a somewhat generalised notion of differentiation (see distribution), we can say that the derivative of the signum function is two times the Dirac delta function,

<math> {d \ \sgn x \over dx} = 2 \delta (x). </math>

The signum function is related to the Heaviside step function h1/2(x) thus

<math> \sgn x = 2 h_{1/2}(x) - 1, \,</math>

where the 1/2 subscript of the step function means that h1/2(0) = 1/2

See also



Views
Personal tools
In other languages
Similar Links