\documentclass[a4paper,11pt]{amsart} \usepackage[T1]{fontenc} \usepackage{lmodern,amsmath,amssymb,microtype} \usepackage[a4paper,textwidth=154mm,textheight=230mm,centering]{geometry} \usepackage{xcolor} \usepackage[colorlinks=true,linkcolor=black,citecolor=magenta,urlcolor=black]{hyperref} \hypersetup{pdftitle={Analytic aspects of rectangular Butson matrices},pdfauthor={GPT 6.2 and Teo 2.0}} \raggedbottom \setcounter{tocdepth}{1} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{question}[theorem]{Question} \newtheorem{introtheorem}{Theorem} \renewcommand{\theintrotheorem}{\Alph{introtheorem}} \title[Rectangular Butson matrices]{Analytic aspects of rectangular Butson matrices} \author{GPT 6.2 and Teo 2.0} \date{} \begin{document} \begin{abstract} We study counting, row extensions and regularity for rectangular Butson matrices at fixed height and level. A cyclotomic lattice calculation gives counting asymptotics and concentration of the number of possible next rows along widths admitting an extension. The proportion with an irregular row quotient decays exponentially. At level $30$ we give a criterion involving $4$ multiplicities at a time and express the decay exponent by a finite entropy minimization, with numerical value $I_{30}\simeq0.0524443959$. We also discuss moment identities and some examples of square completions. \end{abstract} \maketitle {\hypersetup{linkcolor=magenta}\color{magenta}\tableofcontents} \section*{Introduction} Butson matrices have entries among roots of unity and mutually orthogonal rows. The square case was introduced by Butson \cite{Butson}. Here we study rectangular matrices at fixed height and level, asking how many there are, how many rows can be added, and how their orthogonality relations decompose into elementary vanishing sums. Write $\mathbb Z_q$ for the group of $q$-th roots of unity. An $M\times N$ partial Butson matrix satisfies $HH^*=NI_M$. We denote the set of these matrices, with rows and columns in order, by $B_M(N,q)$, and write $B(N,q)=B_N(N,q)$ for the square case. There are $q^{MN}$ arrays before imposing orthogonality. Giving every array the same weight, the fraction we keep is \[ P_M(N,q)=\frac{|B_M(N,q)|}{q^{MN}} \] at level $q$. We call a width \emph{admissible} when at least one array is kept. Choosing a uniform partial matrix means choosing uniformly from this smaller list. We often divide each column by its $1$st entry. This makes the $1$st row all $1$, and every resulting array has exactly $q^N$ preimages. Adjoining a row $v\in\mathbb Z_q^N$ gives the Gram matrix \[ \begin{pmatrix}NI_M&Hv^*\\vH^*&N\end{pmatrix} \] in which the last column records all $M$ tests on $v$. The number of rows passing these tests can depend on $H$. We study its average and ask how well that average describes an individual matrix. De Launey and Levin \cite{DLL} counted sign matrices by recording what each column adds to the row inner products. Davis \cite{Davis} developed this Fourier approach for growing height, obtaining a counting expansion at the cubic scale. Lin \cite{Lin} obtained asymptotic counts in the larger range $N/(M^2\log(2\pi N))\to\infty$, with $4\mid N$. His estimates for row extensions also imply concentration in that range. These results already include the fixed-height real counting and concentration statements considered here. Our aim here is to explore such questions for the Butson matrices, as a continuation of \cite{Banica}. We keep the height and level fixed. At prime levels the counting problem was treated by Montgomery \cite{Montgomery}; we examine the cyclotomic lattice calculation at general level. There are $d=\binom M2$ tests, one for each pair of rows. Each succeeds with probability $P_2(N,q)$. We compare their joint probability with the product. \begin{introtheorem}\label{intro-count} Fix $M,q\ge2$ and put $d=\binom M2$, $h=\Phi_q(1)$, where $\Phi_q$ is the $q$-th cyclotomic polynomial. We have \[ P_M(N,q)\sim h^{\binom{M-1}{2}}P_2(N,q)^d \] as $N$ tends to infinity through admissible widths. \end{introtheorem} Here and below $f\sim g$ means that $f/g$ tends to $1$. The correction factor counts congruences between the tests. It is $1$ if $q$ has at least $2$ distinct prime divisors. Write $R(H)$ for the number of possible next rows. Its mean is already determined by these counts. Each $(M+1)$-row matrix occurs exactly once if we take every $M$-row matrix and list all its extensions. Thus \[ E(R(H))=\frac{|B_{M+1}(N,q)|}{|B_M(N,q)|} \] for the uniform choice of $H$. Here $E$ and $P$ denote expectation and probability. Counting $2$ candidates for the same place tells us how much their number varies from matrix to matrix. At fixed height and level this count of candidates gives concentration of $R(H)$ around its mean, along widths admitting one more row. The argument uses graphs to specify which pairs of rows must be orthogonal, and applies to every level $q$. The rows already present pose a different question. For $i\ne j$, the quotients $H_{ik}\bar H_{jk}$ sum to zero. One way to get zero is to take all $p$-th roots for a prime $p\mid q$ and multiply them by a common $q$-th root. Can we partition the $N$ quotients into such \emph{prime cycles}? A matrix is regular if this can be done for every pair of rows. Let $r_M(N,q)$ be the proportion of irregular matrices. \begin{introtheorem}\label{intro-regularity} At fixed $M,q\ge2$ we have $r_M(N,q)=O_{M,q}(e^{-c_qN})$ along admissible widths, for some $c_q>0$ depending only on $q$. At level $30$ there is a constant $I_{30}>0$ such that \[ \lim_{N\to\infty}-\frac1N\log r_M(N,30)=I_{30} \] for every fixed $M\ge2$. \end{introtheorem} The regularity discussion starts with the $6$-term example in \cite{Banica,BBS}, which admits no partition into cycles. At level $30$ we use inequalities involving $4$ multiplicities at a time to recognize such failures. The usual word counts with prescribed multiplicities then give the exponential rate. We also recall determinant moment identities and discuss some completion examples. These fixed-height estimates do not settle regularity or completion for general squares. The paper is organized as follows. Section~\ref{sec:count} counts thin Butson matrices, and Section~\ref{sec:extensions} studies the number of possible next rows. Section~\ref{sec:regular} proves exponential rarity of irregular quotients. Sections~\ref{sec:four} and~\ref{sec:rate} give the regularity criterion and exponential rate at level $30$. Section~\ref{sec:moments} studies moments of the Gram determinant, and Section~\ref{sec:square} discusses square completions. We would like to thank Claude for useful discussions. \section{Counting thin Butson matrices}\label{sec:count} Hadamard matrices are square sign matrices with mutually orthogonal rows. Butson matrices allow entries among roots of unity, and their rectangular versions retain the same orthogonality condition. We study how many such matrices exist when the number of rows and the level are fixed and the width grows. The smallest Fourier matrices illustrate the $2$ settings: \[ F_2=\begin{pmatrix}1&1\\1&-1\end{pmatrix},\qquad F_3=\begin{pmatrix}1&1&1\\1&w&w^2\\1&w^2&w\end{pmatrix} \] with $w=e^{2\pi i/3}$. Keeping any selection of rows preserves orthogonality. Repeating every column the same number of times also preserves it, while multiplying the squared row length by that number. Our counts include these examples and all other ordered arrays, without identifying matrices under row or column symmetries. We start with $2$ rows. At prime level $p$, let $a_j$ be the number of columns in which their quotient is $w^j$, with $w=e^{2\pi i/p}$. Orthogonality says that $\sum_j a_j w^j=0$. The minimal polynomial of $w$ is $1+x+\cdots+x^{p-1}$, so all $p$ counts must equal $N/p$. Writing the entries as exponents identifies the general prime-level problem with counting difference matrices over $\mathbb Z_p$. Montgomery \cite{Montgomery} settled the question of \cite{Banica} at prime level for $M\ge3$ and even allowed slow growth of $M$. For $2$ rows see \cite{Banica,Labelle,RS}. At composite level many different lists of counts can give zero. We use the same return-walk formulation, assigning a step to each column and adding the steps. The lattice calculation gives the following formula, which includes the known real and prime cases. \begin{theorem}\label{count} Fix $M,q\ge2$. With $d=\binom M2$ and $h=\Phi_q(1)$ we have \[ P_M(N,q)\sim h^{\binom{M-1}{2}}P_2(N,q)^d \] along admissible widths as $N\to\infty$. \end{theorem} \begin{proof} Set $w=e^{2\pi i/q}$ and $R=\mathbb Z[w]$. In the integral basis $1,w,\ldots,w^{\varphi(q)-1}$ each root is a vector of integers. A column with entries $w^{x_i}$ gives the step $X=(w^{x_i-x_j})_{i2$, then $h=p$ and reduction modulo $I$ forces $p\mid N$. Conversely $p=\prod_{(t,q)=1}(1-w^t)$ belongs to $I^{\varphi(q)}\subset I^2$, so $p\mid N$ suffices for the return coset. At level $q=2$, $2$ rows require even width. With $3$ or more rows the constant edge label given by $N/2$ modulo $2$ has to be a vertex difference. Its sum around any triangle is zero precisely when $4\mid N$, which gives all sufficiently large admissible widths. For explicit constants put $s=\varphi(q)$. Labelle and Lacasse \cite[Theorem 3.2]{Labelle} give \[ P_2(N,q)\sim\frac{h}{(2\pi N)^{\frac{s}{2}}} \left(\frac{q^s}{\prod_{p\mid q}p^{\frac{s}{p-1}}}\right)^{\frac{1}{2}} \] with the product over the prime divisors of $q$. Substitution in Theorem~\ref{count} yields \[ P_M(N,p)\sim \frac{p^{\binom{M-1}{2}+\frac{pd}{2}}}{(2\pi N)^{\frac{(p-1)d}{2}}} \] at prime level $p$. For signs this recovers the factor $2^{(M-1)^2}$ of \cite{DLL}. $3$ examples give \[ P_3(N,3)\sim\frac{243\sqrt3}{(2\pi N)^3},\quad P_3(N,4)\sim\frac{16}{\pi^3N^3},\quad P_M(N,30)\sim\left(\frac{1125}{(2\pi N)^4}\right)^d \] along the admissible widths. The $1$st agrees with \cite{Banica}. At level $4$ the $3$-edge probability is asymptotically twice the product of the $3$ $1$-edge probabilities. At level $30$ the product itself is asymptotically exact for every fixed height. The script \texttt{ptwocheck.py} counts returning walks by integer dynamic programming at levels $4,6,8,9,12$. At level $4$, the ratios of $P_2$ to its asymptotic equivalent are approximately $0.9876,0.9938,0.9969$ at widths $40,80,160$. The script \texttt{pthreecheck.py} performs the joint calculation for $3$ rows. At level $4$ it gives \[ \frac{P_3(N,4)}{P_2(N,4)^3}\simeq1.8193,\ 1.8403,\ 1.8760 \] at widths $8,12,16$, illustrating the limiting factor $2$. The walk counts are exact integers; the displayed ratios are rounded. \section{Adding one row}\label{sec:extensions} For a partial matrix $H$, let $R(H)$ count the rows $v\in\mathbb Z_q^N$ with $Hv^*=0$, including all $q$ scalar multiples of each solution. Counting extensions once by their initial block and once by their full array gives \[ E(R(H))=q^N\frac{P_{M+1}(N,q)}{P_M(N,q)} \] under the uniform distribution on $M$-row partial matrices. In what follows, $\mathbb I$ denotes the all-$1$ matrix whose size fits. For $2$ sign rows one can already see the answer for each $H$. Change column signs and reorder the columns to give the array \[ \begin{pmatrix}\mathbb I&\mathbb I\\ \mathbb I&-\mathbb I\\ x&y\end{pmatrix} \] with $x,y$ the $2$ halves of the candidate. Its inner products with the old rows are the sum and the difference of the $2$ block sums. Both vanish precisely when each block is balanced. Thus $R(H)=\binom{N/2}{N/4}^2$ for $4\mid N$, whereas $R(H)=0$ when $N/2$ is odd. To test whether a small fraction of matrices accounts for most extensions, choose $2$ candidates for the \emph{same} next row. There are $R(H)^2$ ordered choices for a given $H$, allowing repetitions. The Gram matrix of the enlarged array is \[ \begin{pmatrix} NI_M&0&0\\ 0&N&v_1v_2^*\\ 0&v_2v_1^*&N \end{pmatrix} \] when $v_1,v_2$ each extend $H$. Their mutual inner product is unrestricted. A graph records exactly which pairs we test. Its vertices carry independent uniform rows, and an edge asks that its endpoints be orthogonal. Write $P_G(N,q)$ for the probability that all tests succeed. For the complete graph $K_M$ this is $P_M(N,q)$. For a tree, its edge quotients and one vertex entry determine a column uniquely. The edge quotients are therefore independent, giving \[ P_G(N,q)=P_2(N,q)^e \] at every width. For a general connected graph, the $e-v+1$ edges outside a spanning tree account for the correction in the next formula. \begin{lemma}\label{graph} Let $G$ be a fixed connected simple graph on $v\ge2$ vertices with $e$ edges. For fixed $q$ we have \[ P_G(N,q)\sim h^{e-v+1}P_2(N,q)^e \] along widths admitting the prescribed orthogonalities. \end{lemma} \begin{proof} Retain just the edge coordinates of $G$ in the proof of Theorem~\ref{count}. The covariance has one block per edge, and the $4$-corner difference still isolates $I^2$ in any chosen coordinate. Modulo $(I^2)^e$ the difference lists come from vertex labels modulo $h$. On a connected graph the differences on a spanning tree determine every label once the $1$st is fixed. Thus the image has $h^{v-1}$ elements in an ambient group of order $h^e$. Admissibility puts zero in the return coset and the local limit formula gives the result. \end{proof} The graph estimate gives the following fixed-height moment formula. At level $2$, its concentration conclusion is already contained in Lin's extension estimates \cite{Lin}. \begin{theorem}\label{extension} Fix $M,q\ge2$ and put $b=q^N h^{M-1}P_2(N,q)^M$. Along widths admissible for $M+1$ rows we have \[ E\left(\left(\frac{R(H)}{b}\right)^s\right)\longrightarrow1 \] for every fixed positive integer $s$. In particular $R(H)/b\to1$ in mean square and $P(R(H)>0)\to1$. \end{theorem} \begin{proof} Form $G_s$ by joining each of $s$ candidate vertices to every vertex of $K_M$, leaving the candidates mutually unjoined. For each partial matrix $H$ there are $R(H)^s$ ordered lists of candidates, and there are $q^{sN}$ unrestricted lists. Summing over $H$ gives \[ E(R(H)^s)=q^{sN}\frac{P_{G_s}(N,q)}{P_M(N,q)} \] at every admissible width for $M$ rows. If one more row is possible, repeating it realizes $G_s$. Relative to $K_M$ we have added $s$ vertices and $sM$ edges. In Lemma~\ref{graph} the extra factors are therefore $P_2^{sM}$ and $h^{s(M-1)}$, giving $b^s$ after multiplication by $q^{sN}$. To read the $1$st $2$ moments, put $Z=R(H)/b$. Then $E((Z-1)^2)=E(Z^2)-2E(Z)+1\to0$. On the event $R(H)=0$ the squared deviation is $1$, so that event has probability tending to zero. \end{proof} \section{Exponential rarity of irregular quotients}\label{sec:regular} Let us return to a fixed height $M$ and a fixed level $q$. For each pair of rows, list their $N$ entrywise quotients with repetitions. Orthogonality says that their sum vanishes. Regularity asks for a partition into cosets of prime-order subgroups, with one copy of each member in each coset. The partition may depend on the pair of rows \cite{BBS,BOP}. The $1$st level at which these $2$ conditions differ is $30$. We recall the example from \cite{Banica,BBS}: \[ \begin{pmatrix} 1&1&1&1&1&1\\ w^5&w^6&w^{12}&w^{18}&w^{24}&w^{25} \end{pmatrix} \] with $w=e^{2\pi i/30}$. In exponent notation take the pentagon $P=\{0,6,12,18,24\}$, the triangle $T=\{5,15,25\}$ and the antipodal pair $L=\{0,15\}$. Reading the $2$nd row against the $1$st gives the multiplicity vector \[ 1_P+1_T-1_L \] because the deleted terms are $0$ in $P$ and $15$ in $T$. All $3$ cycles sum to zero, so the rows are orthogonal. The $6$ surviving exponents contain no full cycle of step $15$, $10$ or $6$. Repeating each term leaves this obstruction in place \cite{Banica,BBS}. Instead add one copy of \emph{every} root. The missing pair $L$ can now be taken from that copy, leaving $14$ antipodal pairs. Along with $P$ and $T$ they partition the enlarged sum. The next $2$ lemmas put a bound on the number of full copies needed for this operation. Let $a_j$ count the occurrences of $w^j$ at general level $q$, with $w=e^{2\pi i/q}$. Write $u=(1,\ldots,1)$ for one copy of all roots. A cycle $C$ will also denote its indicator vector. The cosets of its prime subgroup partition $\mathbb Z_q$, so both $u$ and $u-C$ are regular. \begin{lemma}\label{signed} For some $K_q\ge1$, each integral relation $\sum_j a_j w^j=0$ is a signed sum of at most $K_q\|a\|_\infty$ prime cycles, counted with repetitions. \end{lemma} \begin{proof} The integral assertion of R\'edei, de Bruijn and Schoenberg \cite{LL,Schoenberg} gives the identity \[ \ker(ev)=\sum_C\mathbb Z C \] for $ev(a)=\sum_j a_jw^j$. Here is the elimination behind it. Factor $q=\prod_h p_h^{b_h}$ and express a root as the product of its prime-power coordinates. In coordinate $h$ put $m_h=p_h^{b_h-1}$. The exponents $r+s m_h$ with fixed $0\le r0$ such that a vanishing multiset of $N$ roots is regular whenever each multiplicity lies within $\delta_qN$ of $N/q$. \end{lemma} \begin{proof} Set $m=\min_j a_j$. Remove $m$ full copies and apply Lemma~\ref{signed} to $a-mu$. Denote the positive cycles by $C_i$ and the $t$ negative ones by $-C'_j$. We have \[ a=(m-t)u+\sum_i C_i+\sum_{j=1}^t(u-C'_j) \] and all summands on the right are regular when $m\ge t$. Now $t\le K_q(\max_j a_j-m)$. Take $\delta_q=1/[q(2K_q+1)]$. The spread of the counts is at most $2\delta_q N$, while their minimum is at least $N(1/q-\delta_q)=2K_q\delta_q N$. This gives $m\ge t$. \end{proof} Before we impose orthogonality, each quotient count is a sum of $N$ independent $0$-or-$1$ choices. After imposing it, the columns become dependent. Let $B$ be the event that some multiplicity is outside the interval of Lemma~\ref{near}, and $O$ the event of orthogonality. The fraction of orthogonal arrays exhibiting this imbalance is $P(B\cap O)/P(O)$, at most $P(B)/P_M(N,q)$. A polynomial lower bound for this denominator will suffice. \begin{lemma}\label{denom} For fixed $M,q$ there is $b_{M,q}>0$ such that \[ P_M(N,q)\ge b_{M,q}(N+1)^{-q^M} \] at every admissible width. \end{lemma} \begin{proof} There are $L=q^M$ different columns. If $L\mid t$, use each column $t/L$ times. Each quotient then takes each root equally often, giving orthogonal rows in any column order. A count vector $v$ for independent uniform columns has probability $t!/(L^t\prod_j v_j!)$. Moving one unit from a larger count to a smaller one increases this probability whenever the counts differ by at least $2$. Thus the balanced vector has maximum probability. At most $(t+1)^L$ vectors share total probability $1$, so \[ P(\text{balanced counts})\ge(t+1)^{-L} \] for each multiple of $L$, including zero. For each occurring residue modulo $L$, take one partial matrix of its smallest admissible width $s$. Prescribe its columns at the start, at cost $L^{-s}$, and use balanced counts in the remaining $N-s$ columns. The $2$ blocks together are orthogonal. Take the smallest $L^{-s}$ over these finitely many residues. \end{proof} \begin{theorem}\label{main} For fixed $M,q\ge2$ the proportion of irregular ordered partial Butson matrices satisfies \[ r_M(N,q)=O_{M,q}(e^{-c_qN}) \] along admissible widths, with $c_q>0$ depending only on $q$. \end{theorem} \begin{proof} For independent uniform entries, the count $a_j$ of a specified root in a given row quotient has the binomial law with parameters $N,1/q$. Hoeffding's inequality \cite{Hoeffding} gives \[ P(|a_j-\frac{N}{q}|\ge Nt)\le2e^{-2Nt^2} \] for $t>0$. One can get the bound directly by weighting a word by $e^{s a_j}$. For a single indicator $X$ put $F(s)=\log E\left(e^{s(X-E(X))}\right)$. Then $F(0)=F'(0)=0$ and $F''(s)=p_s(1-p_s)\le1/4$, where $p_s$ is the success probability after the weights of the $2$ outcomes are multiplied by $e^{sX}$ and renormalized. Hence $F(s)\le s^2/8$. Independence multiplies the weights across columns, and on the upper-tail event the centered weight is at least $e^{sNt}$. This gives $\exp(-sNt+Ns^2/8)$. Choose $s=4t$ and use the same argument for the lower tail. By Lemma~\ref{near}, an irregular orthogonal array must violate one of these bounds on multiplicities with $t=\delta_q$. Summing the tail probabilities and dividing by the denominator of Lemma~\ref{denom} gives \[ r_M(N,q)\le\frac{2q\binom M2}{b_{M,q}}(N+1)^{q^M}e^{-2\delta_q^2N} \] for the $q$ roots and $\binom M2$ pairs. At fixed $M,q$ the polynomial is absorbed by $e^{\delta_q^2N}$, so $c_q=\delta_q^2$ works. \end{proof} The order of the quantifiers matters here. The exponential rate can be chosen using $q$ alone, but the constant in the estimate and the width from which it applies may depend on $M$. In particular the polynomial in the proof has degree $q^M$. The fixed-height conclusion therefore gives no estimate on the diagonal $M=N$. Square matrices require separate control of how often an irregular pair can be completed. \section{4 multiplicities at level 30}\label{sec:four} The $6$-term example used a pair, a triangle and a pentagon. At level $30$ these exhaust the prime cycles. Lay out $2$ $3\times5$ arrays, one for each sign. With $w=e^{2\pi i/30}$, $\omega=w^{10}$ and $\eta=w^6$, fill them according to the rule \[ \begin{array}{c|c} \text{root}&\text{multiplicity}\\ \hline \omega^i\eta^j&A_{ij}\\ -\omega^i\eta^j&B_{ij} \end{array} \] for $i$ modulo $3$ and $j$ modulo $5$. A pair uses the same cell in both arrays. A pentagon uses a whole row in one array, and a triangle uses a whole column. Our task is to cover these $2$ arrays with the available cycles, using every entry the prescribed number of times. For example, the earlier $6$-term sum is $-\omega-\omega^2+\eta+\eta^2+\eta^3+\eta^4$. Its arrays are \[ A=\begin{pmatrix}0&1&1&1&1\\0&0&0&0&0\\0&0&0&0&0\end{pmatrix},\qquad B=\begin{pmatrix}0&0&0&0&0\\1&0&0&0&0\\1&0&0&0&0\end{pmatrix} \] with rows and columns indexed from $0$. Their supports are disjoint, and neither array contains a full row or column. Thus no prime cycle can be removed, although the corresponding sum vanishes. The differences $D_{ij}=A_{ij}-B_{ij}$ eliminate the pairs. Vanishing of the original sum amounts to the condition \[ D_{ij}=u_i+v_j \] with integers $u_i,v_j$. Indeed the map $\mathbb Q^{15}\to\mathbb Q(\omega,\eta)$ sending a cell to $\omega^i\eta^j$ has image of dimension $\varphi(15)=8$. Arrays of the indicated form lie in its kernel because every row and column sums to zero. Their dimension is $3+5-1=7$, so they fill the kernel. For integral $D$ take $u_i=D_{i0}$ and $v_j=D_{0j}-D_{00}$. Every other choice is obtained by adding $t$ to all $u_i$ and subtracting it from all $v_j$. \begin{theorem}\label{four} A vanishing multiset of $30$th roots is regular if and only if \[ A_{ij}\le B_{ij}+A_{ik}+A_{l j} \] for every choice of $i,j,k,l$. It suffices to test $k\ne j$ and $l\ne i$. \end{theorem} \begin{proof} In any covering let $x_i$ be the number of positive pentagons along row $i$ minus the number of negative ones. Define $y_j$ in the same way for the triangles along column $j$. The pairs contribute equally to $A$ and $B$, so $D_{ij}=x_i+y_j$. Thus $x_i=u_i+t$, $y_j=v_j-t$ for a single integer $t$. If a whole row is used in both signs, its $2$ pentagons can be replaced by $5$ pairs. The same holds for $2$ opposite triangles. It suffices, then, to use $|x_i|$ pentagons and $|y_j|$ triangles in their indicated signs. At cell $ij$ they demand $x_i^++y_j^+$ positive entries, where $x^+=\max(x,0)$. This demand is the largest of $0,x_i,y_j,x_i+y_j$. The last quantity is $A_{ij}-B_{ij}$. Consequently the cycles fit on the positive side exactly when $x_i,y_j\le A_{ij}$. Their positive and negative demands differ by $D_{ij}$, so the $2$ leftovers agree cell by cell and can all be paired. The choice of $t$ must therefore satisfy \[ v_j-\min_l A_{l j}\le t\le\min_k A_{ik}-u_i \] for each row $i$ and column $j$. The endpoints are integers. A common choice exists precisely when each lower bound is at most each upper bound. Substituting $u_i+v_j=A_{ij}-B_{ij}$ gives the assertion. When $k=j$ or $l=i$ the inequality is automatic. \end{proof} The criterion also gives a convenient test which uses only the smallest and largest multiplicities. \begin{corollary}\label{three} If all $30$ multiplicities of a vanishing sum lie between $m$ and $3m$, the sum is regular. The factor $3$ is best possible. \end{corollary} \begin{proof} The largest possible left side in Theorem~\ref{four} is $3m$, and the smallest right side is $3m$. To see sharpness, write the earlier $6$ terms as $S=\{-\omega,-\omega^2,\eta,\eta^2,\eta^3,\eta^4\}$. At cell $01$ we have $A_{01}=1$ and $B_{01}=A_{00}=A_{11}=0$. For $m\ge1$, add $2m+1$ copies of $S$ to $m$ full copies of all roots. This gives \[ A_{01}>B_{01}+A_{00}+A_{11} \] with left side $3m+1$ and right side $3m$. The ratio of the largest to the smallest count is $(3m+1)/m$, tending to $3$. \end{proof} In particular $\delta_{30}=1/60$ works in Lemma~\ref{near}, since the counts then lie between $N/60$ and $N/20$. Lascabettes, Ali, Popoff and Andreatta \cite{Music} study minimal vanishing sets at orders $2pr$ for distinct odd primes $p,r$. For our ordered columns, arbitrary multiplicities are allowed. A strict violation of the $4$-count test describes exactly which lists of multiplicities we have to count. The script \texttt{fourcheck.py} compares this criterion with an exhaustive cycle-decomposition search on each of $18402$ randomly generated vanishing multisets, of which $16493$ are irregular. There are no disagreements on this sample. It also checks the sharpness examples for $m=1,2,3$, using integer multiplicities and a fixed seed. \section{The exponential rate}\label{sec:rate} Suppose we are given the $30$ multiplicities of a quotient. The criterion tests inequalities involving $4$ of them at a time, and the multinomial formula counts the words with this list. The most frequent lists which fail the test determine the exponent in $r_M(N,30)$. We first identify which frequency vectors can be approached by vanishing sums. Divide all counts by $N$. The resulting vector $f=(f_x)_{x\in\mathbb Z_{30}}$ has coordinates $f_x\ge0$ of sum $1$. Again write $A,B$ for its $2$ arrays. Let $V$ be the set of such real vectors for which $A-B$ has the additive form $A_{ij}-B_{ij}=u_i+v_j$. Equivalently, the alternating sum of $A-B$ on each rectangle vanishes. These integer linear equations make $V$ a rational polytope. In the coordinates of the roots we have \[ \sum_{x\in\mathbb Z_{30}}f_x x^s=0 \] for each reduced residue $s$ modulo $30$. Indeed each row or column cycle vanishes at all $8$ conjugates. These $8$ characters are linearly independent, and, pairing conjugates, impose $8$ real conditions. This is exactly the codimension of the additive condition on the arrays. For rational frequencies the single equation at $s=1$ already implies the others by conjugation. Passing to real frequencies requires keeping all the integer linear relations. Fix the test at the corner $00$, with other cells $01$ and $10$, and put $T(f)=A_{00}-B_{00}-A_{01}-A_{10}$. Strict positivity means that this test fails. Permuting rows and columns in both sign layers carries any nontrivial test to this $1$ and preserves $V$. For the cost of a vector write $J(f)=\sum_x f_x\log(30f_x)$, with $0\log0=0$. This is its entropy relative to the uniform distribution. For instance the $6$-term example uses $6$ distinct roots in equal proportions. It has $J=\log5$. Indeed, restricting each letter of a uniform word to this $6$-letter alphabet already costs a factor $1/5$ per column. Requiring all $6$ counts to be equal costs only a polynomial factor, as the multinomial formula below will show. Consider the number \[ I_{30}=\min_{\substack{f\in V\\T(f)\ge0}}J(f) \] for this $1$ corner. The minimum allows equality, while an actual irregular quotient requires a strict violation. We check that their costs agree. \begin{lemma}\label{domain} We have $00$. \end{lemma} \begin{proof} Normalize the $6$-term example of Corollary~\ref{three} by its length. Swapping columns $0$ and $1$ moves its violation to $00$. Mix it with a small rational fraction of the uniform law to obtain a rational vector $g$ with positive coordinates and $T(g)>0$. Thus the feasible set is nonempty. It is compact. Convexity of $x\log x$ gives $J\ge0$ with equality only at the uniform law, where $T=-2/30$. This proves strict positivity and finiteness of the minimum. For any minimizer $f_*$ consider \[ f_t=(1-t)f_*+tg \] with $00$. The defining affine equations have rational coefficients and a rational solution. Gaussian elimination therefore gives rational points dense in their solution space. Sufficiently close approximations to $f_t$ preserve the strict inequalities. Taking $t\downarrow0$ and using continuity of $J$ gives the assertion. \end{proof} \begin{theorem}\label{sharp} At level $30$ all sufficiently large widths are admissible, and \[ \lim_{N\to\infty}-\frac1N\log r_M(N,30)=I_{30} \] for every fixed $M\ge2$. \end{theorem} \begin{proof} On an alphabet of size $s$, a frequency vector $f$ with integral counts $Nf_j$ represents $N!/\prod_j(Nf_j)!$ distinct words. Dividing by $s^N$ gives its probability for independent uniform letters. The factorial estimate $\log a!=a\log a-a+O(\log(a+1))$ now gives \[ \log P(f)=-N\sum_j f_j\log(sf_j)+O_s(\log(N+1)) \] uniformly over the possible lists. There are at most $(N+1)^s$ lists. Thus, when summing over a collection of lists, even taking the largest probability and multiplying it by their total number changes its logarithm by only $O_s(\log(N+1))$. This is the method of types \cite{Csiszar}. At $s=30$ the cost in the formula is exactly $J(f)$. For one pair of independently chosen rows, its quotients are uniform independent letters. If the quotient vanishes and is irregular, $f\in V$ and some corner has a strict violation. The cost at any such corner is at least $I_{30}$ by symmetry. Sum over the lists and over the $\binom M2$ pairs, then divide by the conditioning probability in Lemma~\ref{denom}. The result is \[ \liminf_{N\to\infty}-N^{-1}\log r_M(N,30)\ge I_{30} \] since the logarithms of all polynomial factors are $o(N)$. For the converse we must realize a bad pair while making \emph{all} rows orthogonal. Fix rational $f\in V$ with $T(f)>0$. Divide each column by its $1$st entry. A dephased column is a uniform letter in $\mathbb Z_{30}^{M-1}$. Prescribe a list of these columns with frequencies \[ g(z,y_3,\ldots,y_M)=f_z\,30^{-(M-2)} \] where $z$ is the $2$nd entry. For each $z$ this list uses all choices of the remaining $M-2$ entries equally often. Thus the $1$st $2$ rows have quotient frequencies $f$, and every other row pair has mean quotient zero. If $b$ clears the denominators of $g$ and $b\mid N$, every prescribed count is an integer and every ordering of the list gives an orthogonal matrix with an irregular pair. Its entropy cost per column is \[ \sum g\log(30^{M-1}g)=\sum_z f_z\log(30f_z)=J(f) \] because the remaining entries occur in precisely their usual proportions. This explains why the same exponential rate can work at every fixed height. To attain all large widths choose $2^a,3^c\ge M$. Taking $M$ rows from the tensor powers $F_2^{\otimes a}$ and $F_3^{\otimes c}$ of the Fourier matrices gives level-$30$ partial matrices of $2$ coprime widths. Here $F_p=(e^{2\pi i st/p})_{0\le s,t0$ for large $N$. The word count gives \[ r_M(N,30)\ge\exp\{-NJ(f)-O_{M,f}(\log(N+1))\} \] at these widths, since conditioning only increases the probability of an event consisting entirely of orthogonal matrices. Lemma~\ref{domain} allows $J(f)$ to approach $I_{30}$. \end{proof} The theorem determines the exponential rate, but gives no prefactor for $r_M(N,30)$. For a fixed corner the feasible set is convex, and strict convexity of $J$ gives a unique minimizer. It lies on $T=0$ because from a point with $T>0$ a short step towards the uniform law lowers $J$ and stays feasible. The minimizer has positive coordinates: mixing a boundary point with the positive feasible vector of Lemma~\ref{domain} decreases $J$ initially, since the terms at zero coordinates have derivative $-\infty$. We can therefore compute it by a smooth dual problem. For a root $x$, let $c(x)\in\mathbb R^9$ record its coefficients in the $8$ rectangle relations and in $T$. Use the rectangles $D_{ij}-D_{i0}-D_{0j}+D_{00}$, where $D=A-B$, $i=1,2$ and $j=1,\ldots,4$. Define \[ Z(\lambda)=\frac1{30}\sum_x e^{\lambda\cdot c(x)},\qquad f_\lambda(x)=\frac{e^{\lambda\cdot c(x)}}{30Z(\lambda)} \] for $\lambda\in\mathbb R^9$. The gradient of $\log Z$ is $\sum_xf_\lambda(x)c(x)$, and its Hessian is the covariance matrix of $c$ under $f_\lambda$. Solving for zero gradient enforces all rectangle relations and $T=0$. The entropy identity \[ J(f)=\sum_x f_x\log\frac{f_x}{f_\lambda(x)} +\lambda\cdot\sum_xf_xc(x)-\log Z(\lambda) \] shows how to check optimality. If the last multiplier $\lambda_T$ is positive, the right side is at least $-\log Z(\lambda)$ on $V\cap\{T\ge0\}$, with equality at a stationary $f_\lambda$. Newton's method in \texttt{irate.py} gives \[ I_{30}\simeq0.052444395910,\qquad e^{-I_{30}}\simeq0.948907 \] with $\lambda_T\simeq1.66300337536$. The largest constraint residual in this computation is below $10^{-14}$, and the primal and dual values agree within $10^{-14}$. A separate constrained minimization from $20$ random starting points gives the same value. These are floating-point checks, not certified intervals for the displayed digits. The minimizing arrays, rounded to $3$ decimals in units of $1/30$, are \[ 30A\simeq\begin{pmatrix} 1.616&0.394&1.269&1.269&1.269\\ 0.535&0.687&0.875&0.875&0.875\\ 1.355&0.820&1.054&1.054&1.054 \end{pmatrix} \] and \[ 30B\simeq\begin{pmatrix} 0.687&0.535&0.875&0.875&0.875\\ 0.394&1.616&1.269&1.269&1.269\\ 0.820&1.355&1.054&1.054&1.054 \end{pmatrix} \] with the same indexing as the corner test. Swapping rows $0,1$ and columns $0,1$, and exchanging the sign layers, preserves the feasible set and the entropy. Indeed, on $V$ the rectangle relation gives \[ B_{11}-A_{11}-B_{10}-B_{01}=T(f) \] so the transformed corner test agrees with the original one. Uniqueness explains this symmetry of the answer. The last $3$ columns agree for the same reason. For comparison, Theorem~\ref{main} uses the bound $c_{30}=1/3600$. We do not obtain a closed expression for the minimizing vector or a prefactor for $r_M(N,30)$. \section{Moments of the Gram determinant}\label{sec:moments} Go back to all $q^{MN}$ arrays, each with the same weight, and assume $M\le N$. Give an array $X$ the score $D=\det(XX^*/N)$. Its normalized rows have length $1$, so $D$ is their squared volume and $0\le D\le1$. The score is $1$ precisely for an orthogonal array. Raising it to the $k$-th power keeps the weight of every orthogonal array at $1$ and reduces the weight of every other array. The question is how large $k$ must be before this weighted count recovers the ordinary count. For $3$ normalized rows, write their Gram matrix as \[ \frac{XX^*}{N}= \begin{pmatrix}1&a&b\\\bar a&1&c\\\bar b&\bar c&1\end{pmatrix} \] so that direct expansion gives \[ D=1-|a|^2-|b|^2-|c|^2+2Re(ac\bar b) \] in terms of the $3$ normalized inner products. The quadratic terms measure each failure of orthogonality separately, while the last term involves all $3$ pairs. At $a=b=c=0$ the squared volume is exactly $1$. De Launey and Levin \cite{DLLnear} used submatrices of known Hadamard matrices to obtain small row inner products and large determinants. In the square sign case the identity $E(\det(X)^2)=N!$ goes back to Tur\'an \cite{Turan}. Tao and Vu \cite{TV} study the typical determinant by exposing the rows one at a time. If $d_i$ is the distance from row $i$ to the span of its predecessors, starting with the zero subspace, Gram--Schmidt gives \[ \det(XX^*)=\prod_i d_i^2 \] for rectangular matrices as well. A candidate perpendicular to all the old rows contributes the full factor $N$. We record the consequences of Cauchy--Binet and averaging powers of roots of unity that will be used here. \begin{proposition}\label{moments} For fixed $M,N$ we have \[ E(D)=\frac{N!}{(N-M)!\,N^M},\quad \lim_{k\to\infty}E(D^k)=P_M(N,q) \] at every level $q\ge2$. For each positive integer $k$ the $k$-th moment is the same at all levels $q>k$ and for uniform independent entries on the unit circle. \end{proposition} \begin{proof} Cauchy--Binet gives \[ \det(XX^*)=\sum_J|\det X_J|^2 \] over the $\binom NM$ choices of $M$ columns. In each squared determinant a pair of different permutations leaves some centered entry occurring only once, so its expectation is zero. Each of the $M!$ identical pairs contributes $1$. Summing and dividing by $N^M$ proves the $1$st formula. For the $2$nd, $D^k$ tends to the indicator of $D=1$ on a finite set. In a monomial contributing to $D^k$, count an entry with sign $+1$ and its conjugate with sign $-1$. Its net exponent is between $-k$ and $k$, because each determinant uses an entry at most once. Averaging a power over $\mathbb Z_q$ keeps precisely the multiples of $q$. For $q>k$ only net exponent zero survives, just as for circle averaging. \end{proof} The $1$st order at which the level can be seen already distinguishes $2$ rows. Let $S$ be the sum of their $N$ independent quotients. We have \[ \frac{XX^*}{N}=\begin{pmatrix}1&\frac{S}{N}\\ \frac{\bar S}{N}&1\end{pmatrix} \] and hence $D=1-|S|^2/N^2$. Write $E_\infty$ for circle averaging. At order $q$ we get \[ E_q(D^q)-E_\infty(D^q) =(-1)^q\frac{N(N-1)}{N^{2q}} \] by counting the extra monomials. Only $S^q\bar S^q$ can supply one. A net exponent $q$ puts all $q$ positive factors at one index, then all $q$ negative ones must be at a different index. There are $N(N-1)$ ordered pairs, each of coefficient $1$. Every term with a net exponent $-q$ is already among these pairs. The script \texttt{momentcheck.py} verifies this identity at $(q,N)=(3,4),(4,3),(5,3),(3,5)$, as well as the agreement of the lower moments with circle averaging. It groups the multinomial coefficients by their exponents modulo $q$ and uses exact rational arithmetic throughout. Dembo \cite{Dembo} computed the $2$nd Gram determinant moment for symmetric real entry laws, and Beck \cite{Beck} gives the general real formula. At square size Nu\~nez Ponasso \cite{Nunez} studies maximal determinants over roots of unity. For our counting problem the issue is how closely a nonorthogonal array can approach the maximum and how many arrays do so. For $2$ sign rows at even $N$ the sum $S$ takes the values $2j$. The nearest nonzero value gives $D=1-4/N^2$ and its probability relative to $S=0$ is $\binom N{N/2+1}/\binom N{N/2}=N/(N+2)$. At $k$ comparable to $N^2$ these arrays still carry appreciable weight. \begin{proposition}\label{scale} Fix $M\ge2$ and let $N$ tend to infinity through admissible sign widths. We have \[ E(D^k)\sim P_M(N,2) \quad\Longleftrightarrow\quad \frac{k}{N^2}\longrightarrow\infty \] for positive integers $k=k(N)$. \end{proposition} \begin{proof} Record the row inner products in $x\in\mathbb Z^d$, $d=\binom M2$, and write $p_N(x)$ for its probability. The local limit theorem used in Theorem~\ref{count} gives $p_N(0)\asymp_M N^{-d/2}$. Also $p_N(x)\le C_M N^{-d/2}$ uniformly, because taking absolute values in Fourier inversion removes the unit phase depending on $x$, and only the finitely many Gaussian peak neighborhoods contribute at this order. Choose first a pair of rows attaining $\|x\|_\infty$. Its normalized squared area is $1-\|x\|_\infty^2/N^2$, and all further squared distances contribute factors at most $1$. Thus \[ 0\le\frac{E(D^k)}{P_M(N,2)}-1 \le C_M\sum_{x\in\mathbb Z^d-\{0\}} e^{-\frac{k\|x\|_\infty^2}{N^2}} \] after separating off the orthogonal arrays. If $k/N^2\to\infty$, each summand tends to zero. The number of points with $\|x\|_\infty=j$ is $O_d((1+j)^{d-1})$ and for large $N$ their individual weights are at most $e^{-j^2}$, a summable bound over the shells. Conversely, take $x$ with entry $4$ on the $1$st pair and zero elsewhere. The $4$-corner difference in Theorem~\ref{count} puts this $x$ in the same return coset as zero. At this fixed point the local limit theorem gives $p_N(x)/p_N(0)\to1$. Only a $2\times2$ block differs from the identity, and hence \[ D=\det\begin{pmatrix}1&\frac{4}{N}\\\frac{4}{N}&1\end{pmatrix}=1-\frac{16}{N^2} \] on this event. If $k/N^2\le C$ along a subsequence, these arrays alone contribute at least $e^{-16C}+o(1)$ in excess of the mass at zero after normalization. This proves necessity. \end{proof} \begin{question}\label{momentq} For $4\mid N$ and growing $M$, in what range does $k/N^2\to\infty$ still suffice for $E(D^k)\sim P_M(N,2)$? For fixed $M$ at level $30$, what scale replaces $N^2$? \end{question} At level $2$ every nonzero inner product is separated from zero by the integer spacing. Already for $2$ rows at level $30$ an inner product records only one complex embedding of a walk of integral dimension $8$. Controlling that complex value alone leaves the other conjugates uncontrolled. \section{Square completions}\label{sec:square} There are $2$ ways to choose a pair of orthogonal rows. We can choose uniformly from the $2$-row partial matrices, as in Section~\ref{sec:regular}. Or, when squares exist, we can take the $1$st $2$ rows of a uniform square. To compare these experiments, let $C(H)$ count the ordered square completions of a prescribed pair $H$ at the given level. The $2$nd experiment gives $H$ probability \[ \frac{C(H)}{|B(N,q)|} \] because each of its completions occurs once. Thus even an exact count of the irregular pairs leaves a question about their weights. The square Regularity Conjecture \cite{BBS} asks precisely whether $C(H)=0$ for every irregular pair. At level $30$ a counterexample must have a pair in which some root occurs more than $3$ times as often as another, by Corollary~\ref{three}. Large imbalances themselves do occur in squares. In the Fourier matrix $F_{30}=(w^{ij})_{0\le i,j<30}$ the quotient of rows $15$ and $0$ has $15$ plus signs, $15$ minus signs and no other roots. These terms form $15$ antipodal pairs. \begin{corollary}\label{amplify} An irregular square of order $m$ at level $30$ gives an irregular square at each order $2^km$ at the same level. Thus regularity for all sufficiently large square orders at level $30$ implies regularity at every square order there. \end{corollary} \begin{proof} Fix a pair of rows that violates the test of Theorem~\ref{four}. Repeating every term $2^k$ times multiplies both sides of the strict inequality by $2^k$. In the square matrix \[ H\otimes F_2^{\otimes k} \] take the same Walsh row for both members of the original pair. Its signs cancel in their quotient, giving exactly the repeated multiset. The tensor product has orthogonal rows and entries in $\mathbb Z_{30}$. \end{proof} We can also randomize an explicit class of squares. In this experiment all parameter choices give orthogonal rows, so we can sample the parameters independently. Fix a square level-$30$ Butson matrix $H$ of order $m$ and the Walsh matrix $W=F_2^{\otimes k}$ of order $L=2^k$. For each $b=1,\ldots,L$ choose an $m\times m$ diagonal matrix $D_b$, with all $mL$ diagonal entries independent uniform $30$th roots. The Di\c{t}\u{a} construction \cite{BBS,Dita} gives \[ X=(W_{ab}D_bH)_{a,b=1}^L \] as an array of $m\times m$ blocks. Its order is $N=mL$. For $L=2$ this reads \[ X=\begin{pmatrix}D_1H&D_2H\\D_1H&-D_2H\end{pmatrix} \] and the $2$ blocks in each row have independently chosen row phases. The Walsh signs make the block rows orthogonal for every choice of these phases. The same cancellation works for every $L=2^k$. \begin{theorem}\label{square} Every choice of phases gives a square level-$30$ Butson matrix. The probability of irregularity satisfies \[ P(X\text{ is irregular})\le60\binom N2 e^{-\frac{L}{1800}} \] under the uniform choice of phases. For fixed $H$ this proportion decreases exponentially in the order. \end{theorem} \begin{proof} Index a row by $(a,i)$, with $i$ its index in $H$. For $i\ne i'$ each block quotient is a rotation of the vanishing quotient of rows $i,i'$ of $H$. For $i=i'$ and $a\ne a'$, the quotient is a Walsh row quotient with every sign repeated $m$ times. Its terms already partition into antipodal pairs. This proves orthogonality and settles regularity for the latter pairs. For $i\ne i'$ fix a root $z$ and count its occurrences. Within one block the $m$ entries share a common rotation, so we average over blocks. The fraction $Y_b$ of entries equal to $z$ in block $b$ lies in $[0,1]$. Its mean is $1/30$ because the ratio of the $2$ diagonal phases is uniform. Different blocks use independent phases. Applying Hoeffding's inequality to the $L$ block fractions gives \[ P\!\left(\left|\frac{1}{L}\sum_b Y_b-\frac{1}{30}\right|\ge\frac{1}{60}\right) \le 2e^{-\frac{L}{1800}} \] for this choice of $z$. Unless one of the $30$ bounds fails, every count lies between $N/60$ and $N/20$. Corollary~\ref{three} then gives a regular quotient. Summing over roots and row pairs finishes the proof. \end{proof} For fixed $W,H$ the blocks of $X$ recover its phases, so the parameter count gives the uniform distribution on this class of ordered matrices. The estimate concerns this Di\c{t}\u{a} class only; it gives no bound for a uniform element of $B(N,30)$. Regularity for square Butson matrices in general remains open. Let us now return to prescribed rows. For any partial matrix write $C(H)$ for the number of completions, counting row order and phases, and put $C(H)=1$ at full height. Choosing the next row gives the recursion \[ C(H)=\sum_v C\!\begin{pmatrix}H\\v\end{pmatrix} \] with one summand for each of the $R(H)$ possible next rows. Theorem~\ref{extension} estimates the number of summands at a typical matrix of fixed height and level. To count paths all the way to the square, one needs the number of continuations from each summand. For Walsh matrices an expansion on the missing Fourier rows, as in \cite[Section 3]{Prime}, sometimes evaluates the recursion exactly. Write $\chi_a(x)=(-1)^{a\cdot x}$ for the Walsh rows on $\mathbb F_2^d$, so $N=2^d$. \begin{proposition}\label{walsh} Delete the rows indexed by a nonempty set $S\subset\mathbb F_2^d$ from the Walsh matrix. Suppose that distinct unordered pairs of distinct elements of $S$ have distinct sums. Then \[ R(H)=2|S|,\quad C(H)=2^{|S|}|S|! \] for the remaining matrix $H$ at level $2$. \end{proposition} \begin{proof} An orthogonal candidate lies in the real span of the missing characters, so $v=\sum_{a\in S}c_a\chi_a$. Its entries are signs, hence $v^2=1$ entrywise. Since $\chi_a\chi_b=\chi_{a+b}$, the coefficient at a nonzero pair sum gives \[ 2c_ac_b=0 \] for every $a\ne b$, since the hypothesis excludes any other unordered pair with that sum. Exactly one coefficient survives and it is $\pm1$. We may therefore choose any missing character with either sign. The unused indices still satisfy the same hypothesis, so all orders and independent sign choices are allowed. \end{proof} The script \texttt{walshcheck.py} checks the proposition by testing all $2^{16}$ sign rows against the retained rows of $F_2^{\otimes4}$. For $S=\{1,2,4,8\}$ it gives $R(H)=8$ and $C(H)=384$. It also tests $S=\{1,2,3\}$ and $S=\{0,5,10\}$. For $S=\{1,2,4,7\}$, where pair sums repeat, it finds $R(H)=16$ instead of $2|S|=8$. With just one row missing, the geometry determines its direction. At level $2$ this completion is classical. For $4\mid N$, Hall \cite{Hall} proved completion with up to $4$ missing rows, and Verheiden \cite{Verheiden} extended this to $7$ missing rows. The work in \cite{BS} relates completion to the projections onto row quotients and gives a cofactor criterion. Wang, Li, Fei and Zheng \cite{Wang} proved completion on the circle for every $(N-1)\times N$ partial complex Hadamard matrix. For Butson counts one must also locate the entries of the last row among roots of unity. \begin{proposition}\label{last} For even $q$ and $N\ge2$, every $(N-1)\times N$ partial Butson matrix at level $q$ has exactly $q$ choices for its last row. In particular \[ |B(N,q)|=q |B_{N-1}(N,q)| \] for every such order and level. \end{proposition} \begin{proof} Set $K=NI-H^*H$. Since the rows of $H/\sqrt N$ are orthonormal, $K/N$ projects onto the remaining $1$-dimensional space. Each diagonal entry of $K$ is $N-(N-1)=1$, so \[ K=z^*z \] for a row of unit-modulus entries, unique after imposing $z_1=1$. Now $z_j=K_{1j}$ lies in $\mathbb Z[w]$, with $w=e^{2\pi i/q}$. Every automorphism of $\mathbb Q(w)$ commutes with conjugation and takes $H$ to another partial Butson matrix. Applying the same argument there shows that all conjugates of $z_j$ have modulus $1$. To see that $z_j$ is a root of unity, use Kronecker's argument. The monic polynomials formed from the conjugates of the successive powers have integer coefficients of bounded size and bounded degree, so only finitely many powers are possible. For even $q$ every root of unity in $\mathbb Q(w)$ belongs to $\mathbb Z_q$. Indeed a root of order $t$ in this field gives $\varphi(lcm(q,t))=\varphi(q)$, whereas every proper multiple of an even $q$ has larger totient. The normalized $z$ therefore completes $H$ and its $q$ scalar multiples exhaust the choices at this level. \end{proof} For odd $q$ the same proof puts the normalized last row in $\mathbb Z_{2q}$. For instance the row $(1,1)$ requires the sign change $-1$ to extend, which forces doubling for odd $q$. At width $4$, for example, take \[ H=\begin{pmatrix} 1&1&1&1\\ 1&1&-1&-1\\ 1&-1&1&-1 \end{pmatrix},\qquad z=\begin{pmatrix}1&-1&-1&1\end{pmatrix} \] so that $4I-H^tH=z^tz$. The missing row is $z$ or $-z$ at level $2$. This is the simplest instance of recovering the last direction from the projection, without searching through all sign rows. With $r$ rows missing, $K/N$ projects onto an $r$-dimensional space and has constant diagonal $r/N$. A completion now amounts to finding a factorization \[ NI-H^*H=Z^*Z \] with $Z$ an $r\times N$ matrix over $\mathbb Z_q$. Indeed the $r$ nonzero eigenvalues of $K$ are all $N$, so $ZZ^*=NI_r$. The range of $Z^*$ is the range of $K$, namely $\ker H$, giving $HZ^*=0$. Thus the factorization supplies exactly the missing orthogonal rows. \begin{thebibliography}{99} \bibitem{Banica} T. Banica, Counting results for thin Butson matrices, \emph{Electron. J. Combin.} \textbf{21} (2014), P3.12. \bibitem{BBS} T. Banica, J. Bichon and J.M. Schlenker, Representations of quantum permutation algebras, \emph{J. Funct. Anal.} \textbf{257} (2009), 2864--2910. \bibitem{BOP} T. Banica, D. \"Ozteke and L. Pittau, Isolated partial Hadamard matrices and related topics, \emph{Open Syst. Inf. Dyn.} \textbf{25} (2018), 1850009. \bibitem{BS} T. Banica and A. Skalski, The quantum algebra of partial Hadamard matrices, \emph{Linear Algebra Appl.} \textbf{469} (2015), 364--380. \bibitem{Beck} D. Beck, On the fourth moment of a random determinant, \emph{Random Matrices Theory Appl.} \textbf{12} (2023), 2350010. \bibitem{Butson} A.T. Butson, Generalized Hadamard matrices, \emph{Proc. Amer. Math. Soc.} \textbf{13} (1962), 894--898. \bibitem{Csiszar} I. Csisz\'ar, The method of types, \emph{IEEE Trans. Inform. Theory} \textbf{44} (1998), 2505--2523. \bibitem{Davis} D. Davis, Counting partial Hadamard matrices in the cubic regime, \href{https://arxiv.org/pdf/2603.30013}{arXiv:2603.30013} (2026). \bibitem{DLLnear} W. de Launey and D.A. Levin, $(1,-1)$-matrices with near-extremal properties, \emph{SIAM J. Discrete Math.} \textbf{23} (2009), 1422--1440. \bibitem{DLL} W. de Launey and D.A. Levin, A Fourier-analytic approach to counting partial Hadamard matrices, \emph{Cryptogr. Commun.} \textbf{2} (2010), 307--334. \bibitem{Dembo} A. Dembo, On random determinants, \emph{Quart. Appl. Math.} \textbf{47} (1989), 185--195. \bibitem{Dita} P. Di\c{t}\u{a}, Some results on the parametrization of complex Hadamard matrices, \emph{J. Phys. A} \textbf{37} (2004), 5355--5374. \bibitem{Hall} M. Hall, Integral matrices $A$ for which $AA^T=mI$, in Number Theory and Algebra, Academic Press (1977), 119--134. \bibitem{Hoeffding} W. Hoeffding, Probability inequalities for sums of bounded random variables, \emph{J. Amer. Statist. Assoc.} \textbf{58} (1963), 13--30. \bibitem{Labelle} G. Labelle and A. Lacasse, Closed paths whose steps are roots of unity, \emph{Discrete Math. Theor. Comput. Sci. Proc.} \textbf{AO} (2011), 599--610. \bibitem{LL} T.Y. Lam and K.H. Leung, On vanishing sums of roots of unity, \emph{J. Algebra} \textbf{224} (2000), 91--109. \bibitem{Music} P. Lascabettes, S. Ali, A. Popoff and M. Andreatta, Construction, enumeration and duality of perfectly balanced musical sets of order $2pq$, \href{https://arxiv.org/abs/2611.05441}{arXiv:2611.05441} (2026). \bibitem{Lawler} G.F. Lawler and V. Limic, Random walk: a modern introduction, Cambridge University Press (2010). \bibitem{Lin} H. Lin, Counting partial Hadamard matrices in the near-quadratic regime, \href{https://github.com/Tencent-Hunyuan/Hyra-results/blob/main/AI4Science/partial_hadamard_counting/manuscript.pdf}{github} (2026). \bibitem{Montgomery} A.M. Montgomery, Asymptotic enumeration of difference matrices over cyclic groups, \emph{Combin. Probab. Comput.} \textbf{27} (2018), 84--109. \bibitem{Nunez} G. Nu\~nez Ponasso, Maximal determinants of matrices over the roots of unity, \emph{Linear Algebra Appl.} \textbf{723} (2025), 201--243. \bibitem{RS} L.B. Richmond and J. Shallit, Counting abelian squares, \emph{Electron. J. Combin.} \textbf{16} (2009), R72. \bibitem{Schoenberg} I.J. Schoenberg, A note on the cyclotomic polynomial, \emph{Mathematika} \textbf{11} (1964), 131--136. \bibitem{TV} T. Tao and V. Vu, On random $\pm1$ matrices: singularity and determinant, \emph{Random Structures Algorithms} \textbf{28} (2006), 1--23. \bibitem{Prime} Teo B and Chat GPT, On Fourier and Hadamard matrices of prime order, \href{https://zenodo.org/records/24061004}{zenodo:24061004} (2026). \bibitem{Turan} P. Tur\'an, On extremal problems concerning determinants, \emph{Math. Naturwiss. Anz. Ungar. Akad. Wiss.} \textbf{59} (1940), 95--105. \bibitem{Verheiden} E. Verheiden, Integral and rational completions of combinatorial matrices, \emph{J. Combin. Theory Ser. A} \textbf{25} (1978), 267--276. \bibitem{Wang} Y.L. Wang, M.S. Li, S.M. Fei and Z.J. Zheng, Connecting unextendible maximally entangled base with partial Hadamard matrices, \emph{Quantum Inf. Process.} \textbf{16} (2017), 84. \end{thebibliography} \end{document}