Hubbry Logo
Discrete Fourier transform over a ringDiscrete Fourier transform over a ringMain
Open search
Discrete Fourier transform over a ring
Community hub
Discrete Fourier transform over a ring
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Discrete Fourier transform over a ring
Discrete Fourier transform over a ring
from Wikipedia

In mathematics, the discrete Fourier transform over a ring generalizes the discrete Fourier transform (DFT), of a function whose values are commonly complex numbers, over an arbitrary ring.

Definition

[edit]

Let R be any ring, let be an integer, and let be a principal nth root of unity, defined by:[1]

The discrete Fourier transform maps an n-tuple of elements of R to another n-tuple of elements of R according to the following formula:

By convention, the tuple is said to be in the time domain and the index j is called time. The tuple is said to be in the frequency domain and the index k is called frequency. The tuple is also called the spectrum of . This terminology derives from the applications of Fourier transforms in signal processing.

If R is an integral domain (which includes fields), it is sufficient to choose as a primitive nth root of unity, which replaces the condition (1) by:[1]

for
Proof

Take with . Since , , giving:

where the sum matches (1). Since is a primitive root of unity, . Since R is an integral domain, the sum must be zero. ∎

Another simple condition applies in the case where n is a power of two: (1) may be replaced by .[1]

Inverse

[edit]

The inverse of the discrete Fourier transform is given as:

where is the multiplicative inverse of n in R (if this inverse does not exist, the DFT cannot be inverted).

Proof

Substituting (2) into the right-hand-side of (3), we get

This is exactly equal to , because when (by (1) with ), and when . ∎

Matrix formulation

[edit]

Since the discrete Fourier transform is a linear operator, it can be described by matrix multiplication. In matrix notation, the discrete Fourier transform is expressed as follows:

The matrix for this transformation is called the DFT matrix.

Similarly, the matrix notation for the inverse Fourier transform is

Polynomial formulation

[edit]

Sometimes it is convenient to identify an n-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.,

The Fourier transform can therefore be seen to relate the coefficients and the values 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 the nth roots of unity, which are exactly the powers of .

Similarly, the definition of the inverse Fourier transform (3) can be written:

With

this means that

We can summarize this as follows: if the values of are the coefficients of , then the values of are the coefficients of , up to a scalar factor and reordering.[2]

Special cases

[edit]

Complex numbers

[edit]

If is the field of complex numbers, then the th roots of unity can be visualized as points on the unit circle of the complex plane. In this case, one usually takes

which yields the usual formula for the complex 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.

Finite fields

[edit]

If is a finite field, where q is a prime power, then the existence of a primitive nth root automatically implies that n divides , because the multiplicative order of each element must divide the size of the multiplicative group of F, 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 of Reed–Solomon codes to BCH codes in coding theory. Such transform can be carried out efficiently with proper fast algorithms, for example, cyclotomic fast Fourier transform.

Polynomial formulation without nth root

[edit]

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 with Maschke's theorem. The map is given by the Chinese remainder theorem, and the inverse is given by applying Bé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. a splitting field for . Now , so an element maps to for each .

When p divides n

[edit]

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.

Order of the DFT matrix

[edit]

Suppose so we have an root of unity . Let be the above DFT matrix, a Vandermonde matrix with entries for . Recall that since if , then every entry is 1. If , then we have a geometric 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 .

Normalizing the DFT matrix

[edit]

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 .

Unitarity

[edit]

Suppose . One can ask whether the DFT matrix is unitary 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.

Eigenvalues of the DFT matrix

[edit]

When , we have an root of unity in the splitting field . Note that the characteristic 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.

Number-theoretic transform

[edit]

The number-theoretic transform (NTT)[4] is obtained by specializing the discrete Fourier transform to , the integers modulo a prime p. This is a finite field, and primitive nth roots of unity exist whenever n divides , so we have for a positive integer ξ. Specifically, let be a primitive th root of unity, then an nth root of unity can be found by letting .

e.g. for ,

when

The number theoretic transform may be meaningful in the ring , even when the modulus m is not prime, provided a principal root of order n exists. Special cases of the number theoretic transform such as the Fermat Number Transform (m = 2k+1), used by the Schö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 mod m by finding primitive roots of unity mod , yielding a tuple . The preimage of under the Chinese 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 the Euler's totient function function.[6]

Fast Fourier transform can be adapted to NTT and implemented with only integer operations.[7] Some choices of m such as the Solinas prime are even easier to calculate on computers as they require no division operation for reduction.[8]

Discrete weighted transform

[edit]

The discrete weighted transform (DWT) is a variation on the discrete Fourier transform over arbitrary rings involving weighting the input before transforming it by multiplying elementwise by a weight vector, then weighting the result by another vector.[9] The Irrational base discrete weighted transform is a special case of this.

Properties

[edit]

Most of the important attributes of the complex DFT, including the inverse transform, the convolution theorem, and most fast 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 the field with one element, considering any field with a primitive nth root of unity as an algebra over the extension field [clarification needed]

In particular, the applicability of fast Fourier transform algorithms to compute the NTT, combined with the convolution theorem, mean that the number-theoretic transform gives an efficient way to compute exact convolutions of integer sequences. While the complex DFT can perform the same task, it is susceptible to round-off error in finite-precision floating point arithmetic; the NTT has no round-off because it deals purely with fixed-size integers that can be exactly represented.

Fast algorithms

[edit]

For the implementation of a "fast" algorithm (similar to how FFT computes the DFT), it is often desirable that the transform length is also highly composite, e.g., a power 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.

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The (DFT) over a ring is a generalization of the classical DFT that operates on sequences of elements from a with unity, typically a finite ring such as a or the modulo nn, by leveraging in the ring's to perform and synthesis via matrix operations. This framework enables exact computations in , circumventing the rounding errors inherent in the complex-number-based DFT, and requires the existence of a primitive nnth —an element of order nn in the unit group—for the transform to be invertible and well-defined for length-nn sequences. For a finite RR, the transform maps elements of the R[G]R[G], where GG is a finite of exponent nn, to the ring of RR-valued characters Hom(G,R×)\operatorname{Hom}(G, R^\times) via evaluation at characters, provided nn divides R/m1|R/\mathfrak{m}| - 1 for every m\mathfrak{m} of RR. The concept originated in the context of finite fields with J. M. Pollard's 1971 development of a fast algorithm for the transform over Fpk\mathbb{F}_{p^k}, analogous to the Cooley-Tukey FFT, achieving O(nlogn)O(n \log n) complexity when a primitive nnth root exists, and applying it to efficient cyclic convolution using integer arithmetic. Extensions to more general finite rings followed in the 1970s, with C. M. Rader introducing transforms over rings like Z/(2k1)Z\mathbb{Z}/(2^k - 1)\mathbb{Z} using Mersenne primes for convolution without floating-point operations, and Eric Dubois and A.N. Venetsanopoulos deriving necessary and sufficient conditions for direct sums of local rings to support a length-mm DFT, based on the order function O(R)=gcd{piki1}O(R) = \gcd\{p_i^{k_i} - 1\} over the characteristic pikip_i^{k_i} of each component. These rings, often Galois rings or their quotients, decompose uniquely into local components, allowing the transform to be computed componentwise via the Chinese Remainder Theorem. Notable applications include accelerating polynomial multiplication for large-integer arithmetic and error-correcting codes, as well as serving as the number theoretic transform (NTT) in , where it underpins efficient operations in schemes like and by transforming polynomials over rings such as Zq/(xn+1)\mathbb{Z}_q/(x^n + 1) into multiplications. As of , advances addressed NTT-unfriendly parameters by incomplete transforms or layered architectures, maintaining quasilinear time while supporting non-power-of-two degrees and composite moduli. Further developments as of 2025 include formal analyses of incompleteness tradeoffs and hardware-optimized pipelined NTT implementations for enhanced efficiency in .

Fundamentals

Definition

The (DFT) over a ring provides a of the classical DFT from the field of complex numbers to arbitrary commutative rings with unity, enabling the analysis of sequences whose entries belong to such rings. Specifically, it defines a linear transformation on finite sequences of length nn in the ring RnR^n, where RR must contain a primitive nnth ω\omega, meaning ωn=1\omega^n = 1 and ωk1\omega^k \neq 1 for 1k<n1 \leq k < n. Additionally, for the transform to be invertible, nn must be invertible in RR (i.e., there exists an element in RR that acts as the of nn). Given a sequence x=(x0,x1,,xn1)Rnx = (x_0, x_1, \dots, x_{n-1}) \in R^n, the DFT x^\hat{x} is defined componentwise by x^k=j=0n1xjωjk,k=0,1,,n1.\hat{x}_k = \sum_{j=0}^{n-1} x_j \omega^{jk}, \quad k = 0, 1, \dots, n-1. This formulation interprets the DFT as an between the group algebra R[Z/nZ]R[\mathbb{Z}/n\mathbb{Z}] (formal sums over the of order nn) and RnR^n, preserving the ring structure and facilitating operations like . The concept emerged in the as an extension of the classical DFT—initially developed for complex numbers and accelerated by the Cooley-Tukey algorithm—to broader algebraic structures, with foundational work establishing conditions for such transforms over finite rings. For illustration, consider the ring Z/3Z\mathbb{Z}/3\mathbb{Z} with n=2n=2, where ω=21(mod3)\omega = 2 \equiv -1 \pmod{3} serves as a primitive 2nd (since 22=41(mod3)2^2 = 4 \equiv 1 \pmod{3} and 2≢1(mod3)2 \not\equiv 1 \pmod{3}), and 2 is invertible with inverse 21=2(mod3)2^{-1} = 2 \pmod{3} (since 22=41(mod3)2 \cdot 2 = 4 \equiv 1 \pmod{3}). For a sequence x=(x0,x1)(Z/3Z)2x = (x_0, x_1) \in (\mathbb{Z}/3\mathbb{Z})^2, the DFT yields x^0=x0+x1\hat{x}_0 = x_0 + x_1 and x^1=x0+2x1(mod3)\hat{x}_1 = x_0 + 2 x_1 \pmod{3}, demonstrating a basic pointwise transformation within the ring.

Inverse transform

The inverse discrete Fourier transform (IDFT) recovers the original sequence (x0,,xn1)(x_0, \dots, x_{n-1}) in the ring RR from its DFT (x^0,,x^n1)(\hat{x}_0, \dots, \hat{x}_{n-1}), assuming the necessary conditions hold. It is defined by the formula xj=n1k=0n1x^kωjk,j=0,,n1,x_j = n^{-1} \sum_{k=0}^{n-1} \hat{x}_k \, \omega^{-j k}, \quad j = 0, \dots, n-1, where n1n^{-1} denotes the multiplicative inverse of the integer nn in RR, and ω\omega is a primitive nnth root of unity in RR (i.e., ωn=1\omega^n = 1 and ωm1\omega^m \neq 1 for 0<m<n0 < m < n). This formula mirrors the forward DFT but uses the inverse powers ω1\omega^{-1} as the root of unity and scales by n1n^{-1}. For the IDFT to be well-defined and invertible, two key conditions must be satisfied in the RR with unity: RR must contain a primitive nnth , and the nn must be invertible in RR (i.e., gcd(n,char(R))=1\gcd(n, \mathrm{char}(R)) = 1 if the ring has characteristic dividing some integers). These ensure that the scaling factor exists and the powers of ω\omega generate the necessary cyclic structure. Without a primitive root, the transform may not diagonalize cyclic convolutions properly; without nn invertible, the normalization fails. The correctness of the IDFT—that applying the forward DFT followed by the IDFT recovers the original sequence—follows from the orthogonality of the powers of ω\omega, provable via geometric series summation in the ring. Consider the composition: the (j,m)(j, m)-entry of the round-trip transformation matrix is n1k=0n1ωk(jm).n^{-1} \sum_{k=0}^{n-1} \omega^{k(j - m)}. Let ζ=ωjm\zeta = \omega^{j - m}. The sum is then k=0n1ζk\sum_{k=0}^{n-1} \zeta^k. If jm(modn)j \equiv m \pmod{n}, then ζ=1\zeta = 1 and the sum equals nn; multiplying by n1n^{-1} yields 1. Otherwise, ζn=1\zeta^n = 1 but ζ1\zeta \neq 1, so the geometric series sums to (1ζn)/(1ζ)=0(1 - \zeta^n)/(1 - \zeta) = 0. Thus, the matrix is the identity, confirming invertibility. This algebraic argument holds in any ring where the conditions are met, as the geometric series formula relies only on the ring's additive and multiplicative structures. In rings where nn is not invertible, such as those of characteristic dividing nn, the standard IDFT scaling fails, but a generalized inverse may exist using alternative normalizations or projections onto idempotents in the ring decomposition; such cases are addressed in special ring structures like those of characteristic 2. As a simple example over Z/5Z\mathbb{Z}/5\mathbb{Z} (where n=4n=4 is invertible since 44=161(mod5)4 \cdot 4 = 16 \equiv 1 \pmod{5}, and ω=2\omega = 2 is a primitive 4th root of unity as 24=161(mod5)2^4 = 16 \equiv 1 \pmod{5} with no smaller positive exponent working), consider the sequence x=(1,0,0,0)x = (1, 0, 0, 0). The forward DFT is x^k=j=03xj2jk=1\hat{x}_k = \sum_{j=0}^{3} x_j 2^{j k} = 1 for all kk, since only the j=0j=0 term contributes. Applying the IDFT gives xj=41k=0312jk=4k=03(2j)k(mod5).x_j' = 4^{-1} \sum_{k=0}^{3} 1 \cdot 2^{-j k} = 4 \sum_{k=0}^{3} (2^{-j})^k \pmod{5}. Since 21=3(mod5)2^{-1} = 3 \pmod{5} (as 23=612 \cdot 3 = 6 \equiv 1), for j=0j=0, 20=12^{0} = 1, sum = 4, and 44=161(mod5)4 \cdot 4 = 16 \equiv 1 \pmod{5}. For j=1j=1, ζ=3\zeta = 3, sum = (1 - 3^4)/(1-3) = (1-81)/( -2 ) \equiv (1-1)/(-2) = 0 \pmod{5} ); similarly for j=2,3j=2,3. Thus, the IDFT recovers (1,0,0,0)(1, 0, 0, 0), demonstrating the round-trip.

Formulations

Matrix formulation

The matrix formulation of the (DFT) over a RR expresses the transform as a given by multiplication with an n×nn \times n matrix FF whose entries are defined using a primitive nnth ωR\omega \in R, assuming such an element exists (e.g., when gcd(n,R)=1\gcd(n, |R|)=1 for finite RR). The matrix FF has entries Fk,j=ωjkF_{k,j} = \omega^{jk} for indices k,j=0,1,,n1k,j = 0, 1, \dots, n-1. For a column vector x=(x0,x1,,xn1)TRnx = (x_0, x_1, \dots, x_{n-1})^T \in R^n, the DFT is then given by the matrix-vector product x^=Fx\hat{x} = F x, where x^k=j=0n1xjωjk\hat{x}_k = \sum_{j=0}^{n-1} x_j \omega^{jk}. This setup highlights the of the DFT, treating it as evaluation of a at the powers of ω\omega. Over a ring RR, the matrix FF generalizes the classical , whose columns (or rows) are formed by the powers 1,ωj,ω2j,,ω(n1)j1, \omega^j, \omega^{2j}, \dots, \omega^{(n-1)j} for distinct ωj\omega^j, ensuring the structure's utility in and coding applications when ω\omega generates a cyclic of order nn. Invertibility of FF holds under conditions where nn is invertible in RR and the powers of ω\omega are distinct. Direct computation of x^=Fx\hat{x} = F x via this matrix multiplication requires O(n2)O(n^2) arithmetic operations in the ring RR, as each of the nn output components involves nn multiplications and additions. This quadratic complexity underscores the need for faster algorithms in practical implementations, though the matrix view remains foundational for theoretical analysis. For intuition, consider the case over the complex numbers C\mathbb{C} (a ring) with n=2n=2, where ω=1\omega = -1 is a primitive 2nd root of unity. The DFT matrix is F=(1111),F = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, and for x=(x0x1)x = \begin{pmatrix} x_0 \\ x_1 \end{pmatrix}, x^=(x0+x1x0x1)\hat{x} = \begin{pmatrix} x_0 + x_1 \\ x_0 - x_1 \end{pmatrix}. This simple example illustrates the transform's role in decomposing signals into even and odd components.

Polynomial formulation

In the polynomial formulation of the (DFT) over a ring RR, a finite sequence x=(x0,x1,,xn1)x = (x_0, x_1, \dots, x_{n-1}) with entries in RR is represented as a P(t)=j=0n1xjtjRP(t) = \sum_{j=0}^{n-1} x_j t^j \in R. This associates the sequence to the coefficients of a degree-at-most-(n1)(n-1) , providing an algebraic structure that facilitates manipulations within the ring R/(tn1)R/(t^n - 1). Assuming RR contains a primitive nnth root of unity ω\omega, meaning ωn=1\omega^n = 1 and ωk1\omega^k \neq 1 for 0<k<n0 < k < n, the DFT x^=(x^0,x^1,,x^n1)\hat{x} = (\hat{x}_0, \hat{x}_1, \dots, \hat{x}_{n-1}) is obtained by evaluating PP at the powers of ω\omega: x^k=P(ωk)\hat{x}_k = P(\omega^k) for k=0,1,,n1k = 0, 1, \dots, n-1. This evaluation interprets the DFT as multipoint interpolation at the nnth roots of unity {1,ω,ω2,,ωn1}\{1, \omega, \omega^2, \dots, \omega^{n-1}\}, which are the roots of the nnth cyclotomic polynomial Φn(t)\Phi_n(t) or factors thereof in RR. The presence of such roots in RR ensures the transform is well-defined, with the cyclotomic structure enabling decomposition via the Chinese Remainder Theorem when RR is a product of local rings. This formulation highlights advantages in algebraic computations, particularly for convolution: the circular convolution of two sequences corresponds to the coefficient-wise product of their DFTs, equivalent to multiplying the associated polynomials in R/(tn1)R/(t^n - 1) and recovering coefficients via the inverse transform. Such operations are efficient in rings supporting roots of unity, as they reduce convolution to pointwise multiplication in the spectral domain. For example, consider a quadratic over the finite ring Z/7Z\mathbb{Z}/7\mathbb{Z}, where n=3n=3 and ω=2\omega = 2 serves as a primitive cube of unity since 231(mod7)2^3 \equiv 1 \pmod{7} and the minimal is t2+t+1=0t^2 + t + 1 = 0. Let P(t)=1+3t+5t2P(t) = 1 + 3t + 5t^2. Then the DFT is x^0=P(1)=1+3+51=92(mod7)\hat{x}_0 = P(1) = 1 + 3 + 5 \cdot 1 = 9 \equiv 2 \pmod{7}, x^1=P(2)=1+32+54=1+6+20=276(mod7)\hat{x}_1 = P(2) = 1 + 3 \cdot 2 + 5 \cdot 4 = 1 + 6 + 20 = 27 \equiv 6 \pmod{7}, and x^2=P(4)=1+34+516=1+12+80=932(mod7)\hat{x}_2 = P(4) = 1 + 3 \cdot 4 + 5 \cdot 16 = 1 + 12 + 80 = 93 \equiv 2 \pmod{7}.

Properties

General properties

The (DFT) over a ring RR is a . Specifically, for scalars a,bRa, b \in R and vectors x,yRnx, y \in R^n, the DFT satisfies ax+by^=ax^+by^\widehat{a x + b y} = a \hat{x} + b \hat{y}
Add your contribution
Related Hubs
User Avatar
No comments yet.