The function extracts only the sign of the sine, giving a square wave whose value alternates between and .
Definition
The sign function is defined by
and this function applies it to .
Values, domain, and range
Its domain is all real numbers. Where it equals , where it equals , and where , at , it is exactly . Its range is therefore the three values .
Periodicity and symmetry
Its period is , the same as sine: it equals on and on . Since , it has the odd symmetry of point symmetry about the origin (away from its discontinuities).
Discontinuities
At each the value jumps discontinuously between and . The jump has size , and the value at the instant of the jump is . In contrast to the smooth sine wave, the graph consists only of horizontal segments and vertical jumps — a staircase, or square, shape.
Relation to other functions
The square wave has the Fourier series
a sum of odd-harmonic sines. Approximating it with finitely many terms leaves an overshoot near the jumps known as the Gibbs phenomenon.
Applications
Square waves are fundamental in engineering as clock signals in digital circuits, in on-off control, in pulse-width modulation (PWM), and in electronic sound synthesis.