Set Relation to Spike → running sum, then to Switch → difference, and watch the same two traces come back with the arrow running the other way.
Naming the spike and the switch
Choose a pair; running sum and differencing relate them exactly.
↓ Running sum turns the spike into the switch. ↑ Differencing turns the switch back into the spike.
Describe this picture
Two traces of samples, one above the other, for from to 5, with a caption between them. Three “Relation” buttons choose the pair: “Spike → running sum” shows the spike above the switch; “Switch → running sum” the switch above the ramp; “Switch → difference” the switch above the spike. The caption names the two operations, for example ”↓ Running sum turns the spike into the switch. ↑ Differencing turns the switch back into the spike.”
Naming the spike and the switch
On the page on decomposing signals, I built two of the pieces I used to rebuild a sequence by hand and told you they’d get proper names once Chapter 3 arrived. That’s now. The spike, the piece that’s at one sample and everywhere else, is called the unit sample (or unit impulse), written . The switch, the piece that turns on at one instant and stays on forever after, is called the unit step, written . Nothing about them changes; they just have names now.
There’s a third piece worth naming here too. Running-summing the switch one level further, the way you ran a difference into a sum before, gives you a signal that climbs by every sample once it’s switched on: . That’s the ramp, written .
Here is the sample index, is the unit sample, is the unit step, and is the ramp: it equals once has switched it on, and before that. These three are tied together by exactly the difference and running-sum operations from the page on amplitude operations: differencing gives you back, and running-summing gives you back; running-summing (delayed by one sample, so it hasn’t switched on yet at the instant you’re summing) gives you .
In the picture at the top of the page, Spike → running sum and Switch → difference show the same two traces, running the arrow both ways: running-summing gives , and differencing gives back, exactly the operations from 2.2, just applied to signals that now have names.
Shrinking a pulse to a spike
A hammer strike is over almost instantly, yet it clearly lands with a definite amount of “push”. The shorter the strike, the harder it has to hit to deliver the same push. I want to build the continuous-time twin of the spike the same way.
Start with a rectangular pulse: some width, and a height chosen so the area under it (width times height) is exactly . Now shrink the width while keeping the area pinned at : the pulse has to get taller to compensate, since a narrower base with the same area needs a taller rectangle. Shrink the width toward and the height grows without bound. The idealized limit, too tall and thin to even draw as a curve, is called the Dirac delta, written : a spike that’s everywhere except at one instant, yet whose area is .
Drag Pulse width all the way down toward its smallest setting and watch Area under the pulse.
Shrinking a pulse to a spike
Narrower means taller, but the shaded area never changes.
Describe this picture
One plot of a rectangular pulse with its area shaded, held at 1. The “Pulse width” slider runs from 0.08 to 2, and the height grows as the width shrinks. The readout “Area under the pulse” shows the area to two decimals.
Notice the pulse gets visibly taller as it narrows, but Area under the pulse stays pinned at the entire time: that’s why can be “infinitely tall” and still have a perfectly finite, well-defined area underneath it.
The sifting property
Imagine a sensor that only reports a reading during a very brief “on” gate around one instant, and is silent the rest of the time. If that gate is narrow enough, what it reports back is close to the true value the signal had at that one instant. That’s the idea behind the sifting property.
If you know a little calculus, the “adding up” I’m about to describe is an integral: for now, think of it in plain words as a running area, the total area swept out under a curve. Multiply a signal by a narrow, unit-area pulse centred at some instant , and find the running area under that product. A wide gate blurs together nearby values of , but as the gate narrows toward , less and less of any other instant leaks in, until the running area becomes exactly , the signal’s own value right at :
Here is the signal being sampled, is a unit-area spike centred at , and the integral sign is that running-area total taken over all time. The delta “sifts out” one value of from the whole trace.
Drag Gate width down toward its narrowest setting and watch Estimate of the value there.
The sifting property
Narrow the gate around the marker; the estimate homes in on the trace's value there.
Describe this picture
One plot of a smooth trace over time, with a marker at and a gate around it. The “Gate width” slider runs from 0.08 to 2, and the readout “Estimate of the value there” shows the running area of the trace times the unit-area gate, to two decimals.
Notice the estimate homes in on the trace’s true height at the marked instant as the gate narrows, exactly what the sifting property predicts.
The continuous spike, switch and ramp
Flip a light switch at . The light level itself, off before and fully on after, is the continuous-time twin of the switch: the unit step , before and from on. The “flick,” the instantaneous, infinitely fast climb from off to on, is the continuous-time twin of the spike: the Dirac delta from the last section.
If you know a little calculus, the rate of climb of a curve at an instant is its derivative: in plain words, it’s the curve’s slope, how fast it’s rising or falling right there. sits flat at , then flat at , with all of its rise packed into zero width at : an infinitely steep slope for an instant, which is exactly . Running the other way, the running area under up to time is before and after, which is again. And running-summing (integrating) one level further gives the ramp , the continuous twin of the discrete ramp from the first section.
Here is the step’s derivative (its slope), is the Dirac delta, and is just a dummy time variable being run over inside the integral, distinct from the at which you’re reading the answer out.
Set Relation to Switch → derivative and read the caption, then to Switch → integral.
The continuous spike, switch and ramp
The same relation as before, now for continuous time.
Integrating turns the spike into the switch. Differentiating turns the switch back into the spike.
Describe this picture
Two traces over time, one above the other, with a caption between them, and three “Relation” buttons: “Spike → integral”, “Switch → integral” and “Switch → derivative”. The pairs are the spike and the switch, the switch and the ramp, and the switch and the spike. The delta is drawn as an arrow labelled with its area. The caption names the two operations, for example “Differentiating turns the switch into the spike. Integrating turns the spike back into the switch.”
Notice this mirrors the discrete-time selector from the first section exactly: differentiation and integration are standing in for differencing and running-summing, and the delta is drawn as an arrow, since it’s too tall and thin to plot as a curve.
The maths behind it · point masses
Statistics uses the same narrowing-pulse picture for a measurement you’re completely certain of: all of the probability piled onto one single value, with total probability still exactly 1.
Building a pulse from shifted pieces
A camera shutter that’s open for a fixed interval and then shuts is a rectangle: off, then on for a while, then off again. A stage light faded linearly up and then back down is a triangle. Both can be built from the pieces you already have.
A rectangular pulse is two shifted steps, one switching on and a later one switching back off, subtracted:
Here the first step switches on at and the second switches on (and is subtracted, so it switches the total off) at , giving a pulse of width and height centred at . A triangular pulse is built the same way from three shifted ramps: one ramping up, a steeper one ramping it back down, and a third ramping it back to flat.
Set Shape to Rectangle and look at the two coloured pieces against the pale outline, then switch to Triangle.
Building a pulse from shifted pieces
Add the coloured pieces together; they exactly reproduce the dashed outline.
Describe this picture
One plot over time, with two “Shape” buttons, “Rectangle” and “Triangle”. The rectangle is built from two shifted steps, the triangle from three shifted ramps, each piece in its own colour, with a dashed outline of the target pulse that their sum matches exactly.
Notice that adding the coloured pieces together, at every instant, exactly reproduces the plain outline: any signal that’s straight-line segments stitched together can be written this way.
Worked example
Take and . The sifting property says , and : the integral just reads off the value of at , no other calculation needed.
Now check the rectangular pulse at a point inside it and a point outside it. At : , inside the pulse, as expected. At : , outside the pulse on the right; and at : , outside on the left. The formula agrees with the picture at every point checked.
Where you’ll meet this
The unit sample is the building block Chapter 5 needs to describe how a system responds to any input at all, once you know how it responds to exactly one : that response has a name, the impulse response, and it turns out to tell you everything about the system. The unit step is the standard test input for how fast and how smoothly a system settles down, in Chapter 6. And a rectangular pulse is a window, the shape you’ll multiply a signal by whenever you want to look at just one stretch of it, in Chapter 15.
Reference card
| Term | Formula | Notes |
|---|---|---|
| Unit sample | at , else | |
| Unit step | (), () | |
| Ramp | running-summed step, one level further | |
| Dirac delta | (), | limit of a narrowing, unit-area pulse |
| Sifting property | picks out one value of | |
| Unit step (continuous) | (), () | , |
| Rectangular pulse | width , height , centred at |