Primality Testing via Circulant Matrix Eigenvalue Structure: A Novel Approach Using Cyclotomic Field Theory
Marius-Constantin Dinu
TL;DR
This work introduces a deterministic primality test based on the eigenvalue structure of circulant matrices derived from roots of unity, showing that for any $n>2$ primality corresponds to the minimal polynomial of $C_n = W_n + W_n^2$ having exactly two irreducible factors over $\mathbb{Q}$. The method hinges on cyclotomic-field and Galois-theoretic analyses: the eigenvalues $\mu_j = \lambda_j + \lambda_j^2$ partition into Galois orbits whose count equals the number of irreducible factors, yielding a prime-specific two-factor pattern. The paper develops both a full, rigorous implementation (explicit orbit computations) and a simplified, divisor-structure-based variant, analyzes complexity relative to classical tests, and presents experimental validation across multiple input ranges, demonstrating clear separation between primes and composites. While offering a deterministic alternative with deep algebraic insights, the approach faces scalability challenges for very large inputs, where probabilistic methods like Miller–Rabin often prevail in practice; nonetheless, the framework provides valuable connections between circulant matrix spectra, cyclotomic fields, and primality testing with educational and theoretical benefits.
Abstract
This paper presents a novel primality test based on the eigenvalue structure of circulant matrices constructed from roots of unity. We prove that an integer $n > 2$ is prime if and only if the minimal polynomial of the circulant matrix $C_n = W_n + W_n^2$ has exactly two irreducible factors over $\mathbb{Q}$. This characterization connects cyclotomic field theory with matrix algebra, providing both theoretical insights and practical applications. We demonstrate that the eigenvalue patterns of these matrices reveal fundamental distinctions between prime and composite numbers, leading to a deterministic primality test. Our approach leverages the relationship between primitive roots of unity, Galois theory, and the factorization of cyclotomic polynomials. We provide comprehensive experimental validation across various ranges of integers, discuss practical implementation considerations, and analyze the computational complexity of our method in comparison with established primality tests. The visual interpretation of our mathematical framework provides intuitive understanding of the algebraic structures that distinguish prime numbers. Our experimental validation demonstrates that our approach offers a deterministic alternative to existing methods, with performance characteristics reflecting its algebraic foundations.
