INVERSE-FFT computes the inverse DFT with n lg n additions and (n/2) lg n + n multiplications full
This proof shows: correctness, complexity.
Statement. Let R be a commutative ring, n=2t with t≥0, ω∈R a principal n-th root of unity, and suppose n⋅1 is a unit of R. For each X∈Rn, INVERSE-FFT(X,ω) ends with X replaced by the unique x∈Rn with DFTω(x)=X, that is xj=n1∑kXkω−jk. Without line L13 it ends with nx. It does exactly nlgn additions and subtractions and 2nlgn+n multiplications, besides the at most n/2 multiplications of line L2.
The forward stages. For 1≤h≤n/2 a power of two, let Wh=ωn/(2h) and let Sh:Rn→Rn be the map that, for each block start s∈{0,2h,4h,…} and each 0≤k<h, replaces the pair (ys+k,ys+k+h)=(u,v) by (u+Whkv, u−Whkv). The pairs for different (s,k) are disjoint and cover all positions, so Sh is well defined and R-linear. Let P be the bit-reversal permutation of the positions, (Py)j=yrevt(j). The iterative FFT computes P and then S1,S2,…,Sn/2, and its correctness (proved on the page of the fast Fourier transform) is the identity
Sn/2∘⋯∘S2∘S1∘P=Fn,(Fn)kj=ωjk.(1) One inverse stage. Fix h, and let Ih be the map of lines L5 to L9 for this h. Line L9 reads V[k⋅n/(2h)]=ω−kn/(2h)=Wh−k, which exists since ω is a unit (ω⋅ωn−1=1). Lines L7 to L9 read the two cells of one pair and write only those two cells, and different (s,k) touch disjoint pairs, so Ih acts on each pair separately, by (a,b)↦(a+b, Wh−k(a−b)). It is R-linear. For the pair (a,b)=(u+Whkv, u−Whkv) produced by Sh,
a+b=2u,Wh−k(a−b)=Wh−k⋅2Whkv=2v. Hence
Ih∘Sh=2⋅id.(2) The whole loop. Line L3 sets h=n/2, line L10 halves h, and line L4 stops when h<1. So the loop runs In/2 first and I1 last, t stages in all (none when n=1). Lines L11 and L12 swap j and revt(j) once for each pair j<revt(j) and leave the fixed points alone; since revt is an involution, this applies P, and P∘P=id. Write G=P∘I1∘I2∘⋯∘In/2 for the map of lines L3 to L12. By (1) and then (2) applied t times from the inside out, using that 2⋅id commutes with every linear map,
G∘Fn=P∘I1∘⋯∘In/2∘Sn/2∘⋯∘S1∘P=2t⋅P∘P=n⋅id. Conclusion. Since n is a unit and ω is principal, Fn is invertible with inverse n1(ω−jk)j,k; this is the inverse formula, proved on the DFT page from ∑kωrk=0 for 1≤r≤n−1. Multiplying G∘Fn=n⋅id on the right by Fn−1 gives G=nFn−1. So after line L12 the array holds nFn−1X=nx, and line L13 multiplies by n−1, leaving x. Uniqueness of x is the injectivity of Fn. Without line L13 the array holds nx. Since nFn−1=(ω−jk)j,k, this is the unnormalized inverse X↦(∑kXkω−jk)j.
Operation count. In the stage with half length h there are n/(2h) blocks with h butterflies each, so n/2 butterflies. Each does one addition (line L8), one subtraction and one multiplication (line L9). Over t=lgn stages this is nlgn additions and subtractions and 2nlgn multiplications, for every input. Line L13 adds n multiplications. Line L2 needs at most n/2 multiplications for the powers of ω−1, once per length. The loops of lines L4 to L12 take O(nlogn) index steps, so the time is Θ(nlogn) for every input. The table V and the table of reversed indices take Θ(n) space, and the transform itself writes only into X. ■