article

SGN redirects here. For the IATA airport code of Ho Chi Minh City's airport, please see Tan Son Nhat International Airport.

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:

\sgn x = \left\{ \begin{matrix}
-1 & : & x < 0 \\ 0 & : & x = 0 \\ 1 & : & x > 0 \end{matrix} \right.

or using the Iverson bracket notation:

\ \sgn x = -< 0 + > 0

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

x = ( \sgn x ) |x|. \qquad \qquad (1)
From equation (1) it follows that whenever x is not equal to 0 we have
\sgn x = {x \over |x|} \qquad \qquad (2)

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

{d |x| \over dx} = {x \over |x|}.

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,

{d \ \sgn x \over dx} = 2 \delta (x).

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

\sgn x = 2 H_{1/2}(x) - 1, \,
where the 1/2 subscript of the step function means that H1/2(0) = 1/2

Complex Signum


The signum function can be generalized to complex numbers as

\sgn z = \frac{z}{|z|}

for any z\mathbb{C} except z=0. The signum of a given complex number, z is the point on the unit circle of the complex plane that is nearest to z. For this reason, all numbers with the same signum form a line that passes through their signum and has a removable singularity at the origin. Another consequence of the fact that all complex numbers that represent the signum of another number lie on the unit circle of the complex plane is that for some nth root of unity.

\sgn (r) = r

Because zero has an equal distance to all points on the uinit circle, it is generally given the signum 0.

See also


Elementary special functions

Funkce signum | Signum (Mathematik) | Función signo | Funzione segno | Szignumfüggvény | Signum (wiskunde) | Signum | Сигнум функција | Signumfunktionen | İşaret fonksiyonu | 符号函数

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Sign function".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld