| Fourier transforms |
|---|
Inmathematics, thediscrete Fourier transform over a ring generalizes thediscrete Fourier transform (DFT), of a function whose values are commonlycomplex numbers, over an arbitraryring.
LetR be anyring, let be an integer, and let be aprincipalnth root of unity, defined by:[1]
| 1 |
The discrete Fourier transform maps ann-tuple of elements ofR to anothern-tuple of elements ofR according to the following formula:
| 2 |
By convention, the tuple is said to be in thetime domain and the indexj is calledtime. The tuple is said to be in thefrequency domain and the indexk is calledfrequency. The tuple is also called thespectrum of. This terminology derives from the applications of Fourier transforms insignal processing.
IfR is anintegral domain (which includesfields), it is sufficient to choose as aprimitiventh root of unity, which replaces the condition (1) by:[1]
Take with. Since,, giving:
where the sum matches (1). Since is a primitive root of unity,. SinceR is an integral domain, the sum must be zero. ∎
Another simple condition applies in the case wheren is a power of two: (1) may be replaced by.[1]
The inverse of the discrete Fourier transform is given as:
| 3 |
where is the multiplicative inverse ofn inR (if this inverse does not exist, the DFT cannot be inverted).
Substituting (2) into the right-hand-side of (3), we get
This is exactly equal to, because when (by (1) with), and when. ∎
Since the discrete Fourier transform is alinear operator, it can be described bymatrix multiplication. In matrix notation, the discrete Fourier transform is expressed as follows:
The matrix for this transformation is called theDFT matrix.
Similarly, the matrix notation for the inverse Fourier transform is
Sometimes it is convenient to identify ann-tuple with a formal polynomial
By writing out the summation in the definition of the discrete Fourier transform (2), we obtain:
This means that is just the value of the polynomial for, i.e.,
| 4 |
The Fourier transform can therefore be seen to relate thecoefficients and thevalues of a polynomial: the coefficients are in the time-domain, and the values are in the frequency domain. Here, of course, it is important that the polynomial is evaluated at thenth roots of unity, which are exactly the powers of.
Similarly, the definition of the inverse Fourier transform (3) can be written:
| 5 |
With
this means that
We can summarize this as follows: if thevalues of are thecoefficients of, then thevalues of are thecoefficients of, up to a scalar factor and reordering.[2]
If is the field of complex numbers, then theth roots of unity can be visualized as points on theunit circle of thecomplex plane. In this case, one usually takes
which yields the usual formula for thecomplex discrete Fourier transform:
Over the complex numbers, it is often customary to normalize the formulas for the DFT and inverse DFT by using the scalar factor in both formulas, rather than in the formula for the DFT and in the formula for the inverse DFT. With this normalization, the DFT matrix is then unitary. Note that does not make sense in an arbitrary field.
If is afinite field, whereq is aprime power, then the existence of a primitiventh root automatically implies thatndivides, because themultiplicative order of each element must divide the size of themultiplicative group ofF, which is. This in particular ensures that is invertible, so that the notation in (3) makes sense.
An application of the discrete Fourier transform over is the reduction ofReed–Solomon codes toBCH codes incoding theory. Such transform can be carried out efficiently with proper fast algorithms, for example,cyclotomic fast Fourier transform.
Suppose. If, it may be the case that. This means we cannot find an root of unity in. We may view the Fourier transform as an isomorphism for some polynomials, in accordance withMaschke's theorem. The map is given by theChinese remainder theorem, and the inverse is given by applyingBézout's identity for polynomials.[3]
, a product of cyclotomic polynomials. Factoring in is equivalent to factoring the prime ideal in. We obtain polynomials of degree where and is the order of.
As above, we may extend the base field to in order to find a primitive root, i.e. asplitting field for. Now, so an element maps to for each.
When, we may still define an-linear isomorphism as above. Note that where and. We apply the above factorization to, and now obtain the decomposition. The modules occurring are now indecomposable rather than irreducible.
Suppose so we have an root of unity. Let be the above DFT matrix, aVandermonde matrix with entries for. Recall that since if, then every entry is 1. If, then we have ageometric series with common ratio, so we obtain. Since the numerator is zero, but so the denominator is nonzero.
First computing the square,. Computing similarly and simplifying the deltas, we obtain. Thus, and the order is.
In order to align with the complex case and ensure the matrix is order 4 exactly, we can normalize the above DFT matrix with. Note that though may not exist in the splitting field of, we may form a quadratic extension in which the square root exists. We may then set, and.
Suppose. One can ask whether the DFT matrix isunitary over a finite field. If the matrix entries are over, then one must ensure is a perfect square or extend to in order to define the order two automorphism. Consider the above DFT matrix. Note that is symmetric. Conjugating and transposing, we obtain.
by a similar geometric series argument as above. We may remove the by normalizing so that and. Thus is unitary iff. Recall that since we have an root of unity,. This means that. Note if was not a perfect square to begin with, then and so.
For example, when we need to extend to to get a 5th root of unity..
For a nonexample, when we extend to to get an 8th root of unity., so, and in this case and. is a square root of the identity, so is not unitary.
When, we have an root of unity in the splitting field. Note that thecharacteristic polynomial of the above DFT matrix may not split over. The DFT matrix is order 4. We may need to go to a further extension, the splitting extension of the characteristic polynomial of the DFT matrix, which at least contains fourth roots of unity. If is a generator of the multiplicative group of, then the eigenvalues are, in exact analogy with the complex case. They occur with some nonnegative multiplicity.
Thenumber-theoretic transform (NTT)[4] is obtained by specializing the discrete Fourier transform to, theintegers modulo a primep. This is afinite field, and primitiventh roots of unity exist whenevern divides, so we have for a positive integerξ. Specifically, let be a primitiveth root of unity, then annth root of unity can be found by letting.
e.g. for,
when
The number theoretic transform may be meaningful in thering, even when the modulusm is not prime, provided a principal root of ordern exists. Special cases of the number theoretic transform such as theFermat Number Transform (m = 2k+1), used by theSchönhage–Strassen algorithm, or Mersenne Number Transform[5] (m = 2k − 1) use a composite modulus.
In general, if, then one may find an root of unity modm by finding primitive roots of unity mod, yielding a tuple. The preimage of under theChinese remainder theorem isomorphism is an root of unity such that. This ensures that the above summation conditions are satisfied. We must have that for each, where is theEuler's totient function function.[6]
Fast Fourier transform can be adapted to NTT and implemented with only integer operations.[7] Some choices ofm such as theSolinas prime are even easier to calculate on computers as they require no division operation for reduction.[8]
Thediscrete weighted transform (DWT) is a variation on the discrete Fourier transform over arbitrary rings involvingweighting the input before transforming it by multiplying elementwise by a weight vector, then weighting the result by another vector.[9] TheIrrational base discrete weighted transform is a special case of this.
Most of the important attributes of thecomplex DFT, including the inverse transform, theconvolution theorem, and mostfast Fourier transform (FFT) algorithms, depend only on the property that the kernel of the transform is a principal root of unity. These properties also hold, with identical proofs, over arbitrary rings. In the case of fields, this analogy can be formalized by thefield with one element, considering any field with a primitiventh root of unity as an algebra over the extension field[clarification needed]
In particular, the applicability offast Fourier transform algorithms to compute the NTT, combined with the convolution theorem, mean that thenumber-theoretic transform gives an efficient way to compute exactconvolutions of integer sequences. While the complex DFT can perform the same task, it is susceptible toround-off error in finite-precisionfloating point arithmetic; the NTT has no round-off because it deals purely with fixed-size integers that can be exactly represented.
For the implementation of a "fast" algorithm (similar to howFFT computes theDFT), it is often desirable that the transform length is also highly composite, e.g., apower of two. However, there are specialized fast Fourier transform algorithms for finite fields, such as Wang and Zhu's algorithm,[10] that are efficient regardless of the transform length factors.