Eight samples shifted round a ring, one dial per DFT bin. Guess first: if no sample is lost, what happens to each bin’s size?
Shift the repetition, turn every bin
N = 8, x = 5, 4, 3, 2, 1, 0, 0, 0. The faint copies are 13.1's repetition.
No shift. Every dial points right: nothing turned yet.
Describe this picture
Two panels for and . The first plots against the sample as stems with filled-dot heads, inside a shaded box labelled “one period, n = 0 to 7”; the faint open circles outside the box are 13.1’s repetition. The second holds eight small dials, labelled “k = 0” to “k = 7”, showing the turn of each bin, with the size under each dial. The readouts are the shift and how far bin 1 has turned.
The clip plays once, over 14 s. It starts with no shift and every dial pointing right. Then the repetition slides one place at a time and holds at , 2 and 4, while the caption says how far each dial has turned. The readout for bin 1 reads 0°, −45°, −90° and −180° at the four holds, and the sizes under the dials never change. Once the clip has finished, dragging the stems sideways, or the arrow keys, chooses from 0 to 7, through a control named “Shift n₀”; at the caption reads “n₀ = 3: bin 1 has turned −135°; bin k turns by −45° × k × n₀.”
Shifting on a ring
The DFT (13.2) gave me numbers for samples . The reason those numbers describe a repetition is in Sampling the spectrum (13.1): sampling the spectrum at repeats the signal every samples. So every operation in time happens to that repetition, and I read the result on to . This page asks what each operation does to the bins.
I need one new piece of notation. The expression is the remainder after dividing by , so it always lands in to . For , and . Walking off one end of the sequence brings you back in at the other end, which is why I call the positions a ring.
Circular shift by is . It is 13.1’s repetition moved places later and read on to . Samples that leave at come back in at . The word “later” is as in Shifting, reversing and scaling time (2.1): a delay.
The picture at the top of the page shifts this way, with . At every sample moves one place later, and the last one (a 0) comes round to . Dial 1 has turned −45° and dial 2 −90°: bin turns by −45° × , so dial turns times as fast as dial 1.
At dial 1 is at −90° and dial 2 at −180°, and the sizes under the dials have not changed. At the 1 that sat at has wrapped round to . Dial 1 has turned half a turn, and dial half turns. A circular shift turns bin by and leaves its size alone.
When the clip ends, you can drag the stems sideways to choose from 0 to 7. At bin 1 has turned −135°, which is −45° × × . Try and then , and watch the sizes under the dials stay put.
Why the sizes stay and the bins turn
The proof takes three lines. The DFT of the shifted sequence is
Write . Then and differ by a multiple of , and repeats every in , so I can replace by . As runs over to , so does , and the sum becomes
This is Properties of the DTFT (12.3) with the delay rule read at . The factor has size 1, so is unchanged, and it turns bin by . For that is −45° × × , which is what the dials showed.
Circular reversal is . The sample stays, and swap, and swap, and so on. For and , the reversed sequence is . The same substitution as above, with , shows that the DFT of the reversed sequence is . For a real sequence, bin is the conjugate of bin (The DFT, 13.2), so this is .
Mirror on the ring
Reversal turns into its conjugate when is real. A conjugate keeps the real part and flips the sign of the imaginary part (Complex numbers for signals, 3.3). Now think about a sequence that equals its own reversal. Its DFT would have to equal its own conjugate. What kind of number does that? Watch the hatched bars, the imaginary parts, as the clip ends.
Mirror on the ring
Circular reversal x[(−n) mod 8] keeps x[0] and mirrors the rest. Bars: real and imaginary parts of X[k].
x = 4, 3, 2, 1, 0, 0, 0, 0 and its DFT: real parts solid, imaginary parts hatched.
Describe this picture
Three stacked panels and no control. The first plots the sequence against the sample as stems with dot heads. The second plots the real parts against the bin as solid bars, and the third the imaginary parts as hatched bars. The readouts say which sequence is showing and the largest .
The clip starts on , whose largest imaginary bar is 4.83 tall. Small arcs swap the samples at and , and the imaginary bars flip to their negatives; the readout says “x reversed”, and the largest imaginary bar is still 4.83. Then the sequence morphs into the average of and its reversal, and the clip ends with the readout “circular-even part” and the largest imaginary bar at 0.00. The caption is blank while the picture moves.
Reversed on the ring, 4 stays at , and 3, 2, 1 now sit at , 6, 5. The real parts are unchanged and the imaginary parts flip sign: becomes . Then the average of and its mirror equals its own reversal, and all its imaginary parts are 0. A real sequence that equals its own reversal has a real DFT.
A sequence with is circular-even. One with is circular-odd. The mirror is about , so is its own partner, and for even so is . Any real sequence splits into the two, as in Decomposing signals (2.3): and . Their DFTs are and . The clip showed the first. Its odd partner is , and its DFT is the imaginary part.
The figure uses and shows both cases at full size. The even sequence has the DFT , , , , , , , , with no imaginary part. The odd sequence has an imaginary DFT, , , , , , , , , with no real part.
Circular convolution
Convolution in Discrete convolution (5.2) flipped one sequence and slid it along the other. On a ring I do the same, but positions wrap. The circular convolution of two sequences of length is
Its rule is the one I wanted from the start:
The proof uses the shift rule. Multiply by term by term:
The bracket is the DFT of shifted circularly by . So the sum is the DFT of , which is the circular convolution. Inverting gives the rule in the other direction. Circular vs linear convolution (13.4) shows the wrap-around as a picture, and when the result equals the ordinary convolution.
Here is a small case with . Take and . Their DFTs are and . The products are , and the inverse DFT of those is . The sum directly gives the same: at it is .
The ordinary convolution of the same two sequences is . The last two values, 7 and 4, wrapped round onto the first two, and .
The same two rules, swapped
Multiplying in time gives a circular convolution in frequency, with a factor : . Multiplying by shifts the spectrum, . Both are the shift and convolution rules read from the other side. That is duality: applying the DFT twice gives
The reason is the inverse formula evaluated at . For the DFT of its DFT is , that is .
Where you’ll meet this
The maths behind it · permutation matrices
A circular shift is a permutation matrix: the identity with its columns rotated. In the DFT’s description it becomes a diagonal matrix of turns . That is the first sign that the DFT diagonalises shifts, which The DFT as a matrix (13.5) develops.
The maths behind it · circular autocorrelation
Circular lags are what a circular (wrap-around) autocorrelation uses. It is quick to compute with the DFT, but it mixes the end of a record into its start. That is why Correlation (24.3) pads first.
The even and odd rules return in The discrete cosine transform (13.6), where the choice of mirror decides how well a block compacts.
Worked example
Take with and shift it by 4, as the clip ended. The shifted sequence is . Its bin 1 is the old bin 1 times , a half turn, and the size is still 9.04. Bin 2 turns by , a full turn, so bin 2 is unchanged. In general, for and , odd bins flip sign and even bins stay.
Now reverse and read bin 1. The DFT has . The reversed sequence has , the conjugate, as the rule says.
Reference card
| Property | Time ( mod ) | DFT |
|---|---|---|
| Circular shift | : sizes unchanged | |
| Frequency shift | ||
| Circular reversal | ; real : | |
| Real | ||
| Real, circular-even | real | |
| Real, circular-odd | imaginary | |
| Circular convolution | ||
| Multiplication | ||
| Duality |