Rectangle Function — Definition, Formula & Examples
The rectangle function (often written rect) is a piecewise function that equals 1 inside a specified interval and 0 outside it. It models ideal on/off signals and serves as a building block in Fourier analysis and signal processing.
The rectangle function is defined as for , for , and for . It can equivalently be expressed using Heaviside step functions as .
Key Formula
Where:
- = The independent variable (often time or a normalized coordinate)
How It Works
To create a rectangular pulse of width centered at , substitute . The argument scaling stretches the unit-width pulse to width , and the shift moves its center to . Because the function has sharp transitions, its Fourier transform is a sinc function: . This rect–sinc duality is one of the most important pairs in Fourier analysis.
Worked Example
Problem: A radar system transmits a pulse that is on from to and off elsewhere. Express this pulse using the rectangle function.
Find center and width: The pulse runs from 2 to 6, so its center is the midpoint and its width is the difference.
Write the rect expression: Substitute into the shifted and scaled rectangle function.
Verify: At : the argument is . Since , the function equals 1. At : the argument is , and , so the function equals 0.
Answer: The radar pulse is .
Why It Matters
In electrical engineering and physics courses, the rectangle function is the standard model for ideal pulses and finite-duration signals. Its Fourier transform (the sinc function) explains bandwidth limitations in communication systems and the ringing artifacts seen in signal reconstruction.
Common Mistakes
Mistake: Forgetting that the width parameter goes in the denominator, not the numerator, of the argument.
Correction: To get a pulse of width , write . Placing in the numerator would compress the pulse instead of stretching it.
