For , a smooth approximation of the sign function is
Another approximation is
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 ).
The signum function is differentiable everywhere except when Its derivative is zero when is non-zero:
This follows from the differentiability of any constant function, for which the derivative is always zero. The signum acts as a constant function when it is restricted to the negative open region where it equals -1. It can similarly be regarded as a constant function within the positive open region where the corresponding constant is +1. Although these are two different constant functions, their derivative is zero in each case.
It is not possible to define a classical derivative at , because there is a discontinuity there. Nevertheless, the signum function has a definite integral between any pair of finite values a and b, including zero. The resulting integral for a and b is equal to the difference between their absolute values:
This is consistent with the partial converse that the signum function is the derivative of the absolute value function, except where there is an abrupt change in gradient before and after zero:
We can understand this as before by considering the separate regions and For example, the absolute value function is identical to in the region whose derivative is the constant value +1, equalling there.
In integration theory, the signum function is a weak derivative of the absolute value function at zero, as well as elsewhere. In convex function, theory the subdifferential of the absolute value at zero is the interval , "filling in" the sign function (the subdifferential of the absolute value is not single-valued at zero).
Although it is not differentiable at in the ordinary sense, under the generalized notion of differentiation in distribution theory,
the derivative of the signum function is two times the Dirac delta function. This can be demonstrated using the identity [2]
where is the Heaviside step function using the standard formalism.
Using this identity, it is easy to derive the distributional derivative:[3]
The signum function can be generalized to complex numbers as:
for any complex number except . The signum of a given complex number is the point on the unit circle of the complex plane that is nearest to . Then, for ,
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 :
Another generalization of the sign function for real and complex expressions is ,[5] which is defined as:
where is the real part of and is the imaginary part of .
Thanks to the Polar decomposition theorem, a matrix ( and ) can be decomposed as a product where is a unitary matrix and is a self-adjoint, or Hermitian, positive definite matrix, both in . If is invertible then such a decomposition is unique and plays the role of 's signum. A dual construction is given by the decomposition where is unitary, but generally different than . This leads to each invertible matrix having a unique left-signum and right-signum .
In the special case where and the (invertible) matrix , which identifies with the (nonzero) complex number , then the signum matrices satisfy and identify with the complex signum of , . In this sense, polar decomposition generalizes to matrices the signum-modulus decomposition of complex numbers.
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, but the price of such generalization is the loss of commutativity. In particular, the generalized signum anticommutes with the Dirac delta function[6]
in addition, cannot be evaluated at ; and the special name, is necessary to distinguish it from the function . ( is not defined, but .)
^Burrows, B. L.; Colwell, D. J. (1990). "The Fourier transform of the unit step function". International Journal of Mathematical Education in Science and Technology. 21 (4): 629–635. doi:10.1080/0020739900210418.