HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, the sign function or signum function (from '' signum'',
Latin Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally a dialect spoken in the lower Tiber area (then known as Latium) around present-day Rome, but through ...
for "sign") is an
odd Odd means unpaired, occasional, strange or unusual, or a person who is viewed as eccentric. Odd may also refer to: Acronym * ODD (Text Encoding Initiative) ("One Document Does it all"), an abstracted literate-programming format for describing X ...
mathematical function that extracts the
sign A sign is an object, quality, event, or entity whose presence or occurrence indicates the probable presence or occurrence of something else. A natural sign bears a causal relation to its object—for instance, thunder is a sign of storm, or ...
of a
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
. In mathematical expressions the sign function is often represented as . To avoid confusion with the sine function, this function is usually called the signum function.


Definition

The signum function of a
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
is a
piecewise In mathematics, a piecewise-defined function (also called a piecewise function, a hybrid function, or definition by cases) is a function defined by multiple sub-functions, where each sub-function applies to a different interval in the domain. P ...
function which is defined as follows: \sgn x :=\begin -1 & \text x < 0, \\ 0 & \text x = 0, \\ 1 & \text x > 0. \end


Properties

Any real number can be expressed as the product of its
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
and its sign function: x = , x, \sgn x. It follows that whenever is not equal to 0 we have \sgn x = \frac = \frac\,. Similarly, for ''any'' real number , , x, = x\sgn x. We can also ascertain that: \sgn x^n=(\sgn x)^n. The signum function is the
derivative In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. ...
of the absolute value function, up to (but not including) the indeterminacy at zero. More formally, in integration theory it is a
weak derivative In mathematics, a weak derivative is a generalization of the concept of the derivative of a function (''strong derivative'') for functions not assumed differentiable, but only integrable, i.e., to lie in the L''p'' space L^1( ,b. The method ...
, and in convex function theory the subdifferential of the absolute value at 0 is the interval , "filling in" the sign function (the subdifferential of the absolute value is not single-valued at 0). Note, the resultant power of is 0, similar to the ordinary derivative of . The numbers cancel and all we are left with is the sign of . \frac = \sgn x \text x \ne 0\,. The signum function is differentiable with derivative 0 everywhere except at 0. It is not differentiable at 0 in the ordinary sense, but under the generalised notion of differentiation in distribution theory, the derivative of the signum function is two times the
Dirac delta function In mathematics, the Dirac delta distribution ( distribution), also known as the unit impulse, is a generalized function or distribution over the real numbers, whose value is zero everywhere except at zero, and whose integral over the enti ...
, which can be demonstrated using the identity \sgn x = 2 H(x) - 1 \,, where is the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argum ...
using the standard formalism. Using this identity, it is easy to derive the distributional derivative: \frac = 2 \frac = 2\delta(x) \,. The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed ...
of the signum function is \int_^\infty (\sgn x) e^dx = \mathrm\frac, where means Cauchy principal value. The signum can also be written using the
Iverson bracket In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement ...
notation: \sgn x = - < 0+ > 0\,. The signum can also be written using the
floor A floor is the bottom surface of a room or vehicle. Floors vary from simple dirt in a cave to many layered surfaces made with modern technology. Floors may be stone, wood, bamboo, metal or any other material that can support the expected load ...
and the
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
functions: \sgn x = \Biggl\lfloor \frac \Biggr\rfloor - \Biggl\lfloor \frac \Biggr\rfloor \,.The signum function has very simple definition If 0^0 is accepted to be equal to 1. Then signum can be written for all real numbers as \sgn x = 0^ \left ( - x + \left\vert x \right\vert \right ) - 0^ \left ( x + \left\vert x \right\vert \right ) \,. The signum function coincides with the limits \sgn x=\lim_\frac\,. and \sgn x=\lim_\frac\tan^(nx)\,. For , a smooth approximation of the sign function is \sgn x \approx \tanh kx \,. Another approximation is \sgn x \approx \frac \,. which gets sharper as ; note that this is the derivative of . This is inspired from the fact that the above is exactly equal for all nonzero if , and has the advantage of simple generalization to higher-dimensional analogues of the sign function (for example, the partial derivatives of ). See Heaviside step function – Analytic approximations.


Complex signum

The signum function can be generalized to complex numbers as: \sgn z = \frac for any complex number except . The signum of a given complex number is the point on the
unit circle In mathematics, a unit circle is a circle of unit radius—that is, a radius of 1. Frequently, especially in trigonometry, the unit circle is the circle of radius 1 centered at the origin (0, 0) in the Cartesian coordinate system in the Eucli ...
of the
complex plane In mathematics, the complex plane is the plane formed by the complex numbers, with a Cartesian coordinate system such that the -axis, called the real axis, is formed by the real numbers, and the -axis, called the imaginary axis, is formed by the ...
that is nearest to . Then, for , \sgn z = e^\,, where is the complex argument function. For reasons of symmetry, and to keep this a proper generalization of the signum function on the reals, also in the complex domain one usually defines, for : \sgn(0+0i)=0 Another generalization of the sign function for real and complex expressions is ,Maple V documentation. May 21, 1998 which is defined as: \operatorname z= \begin 1 & \text \mathrm(z) > 0, \\ -1 & \text \mathrm(z) < 0, \\ \sgn \mathrm(z) & \text \mathrm(z) = 0 \end where is the real part of and is the imaginary part of . We then have (for ): \operatorname z = \frac = \frac.


Generalized signum function

At real values of , it is possible to define a generalized function–version of the signum function, such that everywhere, including at the point , unlike , for which . This generalized signum allows construction of the
algebra of generalized functions In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functio ...
, but the price of such generalization is the loss of
commutativity In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
. In particular, the generalized signum anticommutes with the Dirac delta function \varepsilon(x) \delta(x)+\delta(x) \varepsilon(x) = 0 \, ; in addition, cannot be evaluated at ; and the special name, is necessary to distinguish it from the function . ( is not defined, but .)


Generalization to matrices

Thanks to the Polar decomposition theorem, a matrix \boldsymbol A\in\mathbb K^ (n\in\mathbb N and \mathbb K\in\) can be decomposed as a product \boldsymbol Q\boldsymbol P where \boldsymbol Q is a unitary matrix and \boldsymbol P is a self-adjoint, or Hermitian, positive definite matrix, both in \mathbb K^. If \boldsymbol A is invertible then such a decomposition is unique and \boldsymbol Q plays the role of \boldsymbol A's signum. A dual construction is given by the decomposition \boldsymbol A=\boldsymbol S\boldsymbol R where \boldsymbol R is unitary, but generally different than \boldsymbol Q. This leads to each invertible matrix having a unique left-signum \boldsymbol Q and right-signum \boldsymbol R. In the special case where \mathbb K=\mathbb R,\ n=2, and the (invertible) matrix \boldsymbol A = \left begina&-b\\b&a\end\right/math>, which identifies with the (nonzero) complex number a+\mathrm i b=c, then the signum matrices satisfy \boldsymbol Q=\boldsymbol P=\left begina&-b\\b&a\end\right, c, and identify with the complex signum of c, \sgn c = c/, c, . In this sense, polar decomposition generalizes to matrices the signum-modulus decomposition of complex numbers.


See also

*
Absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
*
Heaviside function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argumen ...
*
Negative number In mathematics, a negative number represents an opposite. In the real number system, a negative number is a number that is less than zero. Negative numbers are often used to represent the magnitude of a loss or deficiency. A debt that is owed ma ...
* Rectangular function *
Sigmoid function A sigmoid function is a mathematical function having a characteristic "S"-shaped curve or sigmoid curve. A common example of a sigmoid function is the logistic function shown in the first figure and defined by the formula: :S(x) = \frac = \f ...
( Hard sigmoid) * Step function (
Piecewise constant function In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having only ...
) * Three-way comparison * Zero crossing * Polar decomposition


Notes

{{DEFAULTSORT:Sign Function Special functions Unary operations