Petty’s Notebook

The Cross-Alignment Matrix

About this paperRepository PDFZenodo
Cite this paper

A. S. Petty, The Cross-Alignment Matrix, DOI: 10.5281/zenodo.21844820.

Lean proofs

Abstract

An average digit-match score does not record which fractions agree. For a positional base b≥2b\ge2 and denominator n≥2n\ge2, we define the synchronized cross-alignment matrix Ab(n)\mathbf A_b(n) on the fractions {k/n:1≤k<n}\{k/n:1\le k<n\}. Its entries compare every pair at one common long-division depth and across one common periodic window. An explicit one-hot realization makes Ab(n)\mathbf A_b(n) a positive semidefinite Gram matrix.

For n≥3n\ge3, the pairwise alignment is its mean off-diagonal entry. The reference alignment is recovered from the first row after adding the terminating-fraction correction. For a prime p∤bp\nmid b, Ab(p)\mathbf A_b(p) is the identity exactly when pp is digit-partitioning. For such a prime and n=psn=ps with ss bb-supported, the matrix is an exact direct sum of all-ones blocks. Its rank is p−1p-1 when s=1s=1 and pp when s≥2s\ge2.

For an arbitrary prime p∤bp\nmid b, multiplicative-coset ordering turns Ab(p)\mathbf A_b(p) into a matrix of circulant blocks. Fourier transformation along the orbit coordinate reduces the spectrum to small Hermitian Gram matrices. The primitive-root case is one circulant whose eigenvalues are the discrete Fourier transform of the cyclic digit-equality autocorrelation. Exact decimal examples give the two levels 2/3,4/32/3,4/3 at p=13p=13 and nine levels from 1/41/4 to 7/47/4 at p=17p=17.

April 2021 (revised September 2026)
2020 Mathematics Subject Classification: 11A63, 15A18, 42A16

Where the Agreement Lives

At p=13p=13, distinct fractions in the same multiplicative orbit never match at a synchronized decimal position. Partial matches occur between the two orbits. In multiplicative-orbit order, their comparison matrix is A10(13)=(I613P313P3I6),\mathbf A_{10}(13) =\begin{pmatrix}I_6&\frac13P^3\\[2pt] \frac13P^3&I_6\end{pmatrix}, where PP is the unit cyclic shift on six positions. Two six-element orbits meet at one relative shift, and the spectrum has only the two levels 2/32/3 and 4/34/3. A scalar records how much agreement survives. The matrix records where it lives.

The fractional field F(n)={k/n:1≤k≤n−1}\mathcal{F}(n) = \{k/n : 1 \le k \le n{-}1\} carries three scalar summaries. Reference alignment αb(n)\alpha_b(n) compares every member with 1/n1/n. Pairwise alignment σb(n)\sigma_b(n) averages over distinct unordered pairs, and Fb(n)=αb(n)−σb(n)F_b(n)=\alpha_b(n)-\sigma_b(n) is their signed difference. None by itself records which fractions agree, whether agreement gathers into blocks, or which independent modes carry it.

Coordinatewise equality is Hamming similarity. Cyclic Hamming correlation is classical in sequence design [1], and Kak and Chatterjee apply it to full-period reciprocal digit sequences [2]. Repetend multiplication and its multiplicative-orbit organization are likewise established arithmetic [3]. The Gram realization below is standard linear algebra [5], and Fourier diagonalization of circulant blocks is classical [4]. The result here is their exact assembly over the complete denominator ensemble. It recovers the three scalar statistics, characterizes the identity and supported block cases, and reduces every prime matrix to explicit coset Fourier fibers without a primitive-root hypothesis.

The cross-alignment matrix keeps every synchronized pairwise comparison. Pairwise alignment is its mean off-diagonal entry. Reference alignment uses one marked row together with the terminating-fraction convention, and focused alignment is the residual between those two statistics. The matrix therefore restores the geometry compressed by the averages, while a termination marker completes their recovery.

All comparisons begin after one common clearing depth and use one common periodic window. No fraction is restarted at an independently chosen repetend phase. Here “fractional field” is a name for the displayed finite family; no algebraic-field structure is asserted.

The Synchronized Matrix

Fix b≥2b\ge2. For n≥2n\ge2, write n=qs,n=qs, where ss is the largest divisor of nn supported on the primes of bb, and gcd⁡(q,b)=1\gcd(q,b)=1. Thus ss divides a power of bb. If q>1q>1, choose one clearing depth DD with s∣bDs\mid b^D and put L=ordq(b)L=\mathop{\mathrm{ord}}_q(b).

Definition 1. When q>1q>1 and 1≤k<n1\le k<n, let dt(k)d_t(k) be the base-bb digit of k/nk/n at the tt-th position after the common clearing depth DD. The synchronized cross-alignment matrix is the (n−1)×(n−1)(n-1)\times(n-1) matrix Ab(n)=(Aij)\mathbf A_b(n)=(A_{ij}) defined by Aij={1,if both i/n and j/n terminate,0,if exactly one of i/n and j/n terminates,1L∑t=0L−11{dt(i)=dt(j)},if neither fraction terminates.A_{ij}= \begin{cases} 1, & \text{if both $i/n$ and $j/n$ terminate},\\ 0, & \text{if exactly one of $i/n$ and $j/n$ terminates},\\ \displaystyle\frac1L\sum_{t=0}^{L-1} \mathbf 1_{\{d_t(i)=d_t(j)\}}, & \text{if neither fraction terminates}. \end{cases} If q=1q=1, every fraction terminates and Ab(n)=Jn−1\mathbf A_b(n)=J_{n-1}, where JmJ_m denotes the m×mm\times m all-ones matrix. In every case Aii=1A_{ii}=1.

Increasing DD shifts every nonterminating tail by the same number of positions. Because each reduced period divides LL, the length-LL equality pattern is only rotated. The matrix is therefore independent of the chosen clearing depth.

Proposition 2 (Gram realization). For every n≥2n\ge2, the matrix Ab(n)\mathbf A_b(n) is real symmetric, positive semidefinite, and has unit diagonal.

Proof. When q=1q=1, the assertion follows from Ab(n)=Jn−1\mathbf A_b(n)=J_{n-1}. Suppose q>1q>1. In the orthogonal direct sum Reterm⊕R{0,…,L−1}×{0,…,b−1},\mathbb R e_{\mathrm{term}}\oplus \mathbb R^{\{0,\ldots,L-1\}\times\{0,\ldots,b-1\}}, assign the vector eterme_{\mathrm{term}} to every terminating fraction. For a nonterminating k/nk/n, assign vk=1L∑t=0L−1et,dt(k).v_k=\frac1{\sqrt L}\sum_{t=0}^{L-1}e_{t,d_t(k)}. The inner product of two nonterminating vectors is their synchronized digit-match proportion. A terminating vector is orthogonal to every nonterminating vector, while two terminating vectors have inner product one. Thus Aij=⟨vi,vj⟩A_{ij}=\langle v_i,v_j\rangle, with vi=etermv_i=e_{\mathrm{term}} in the terminating case. Hence Ab(n)\mathbf A_b(n) is a Gram matrix. ◻

Recovery of the Scalar Statistics

Let N=n−1N=n-1, and let 1\mathbf 1 denote the NN-component all-ones vector. For n≥3n\ge3, pairwise alignment is the mean off-diagonal entry given by σb(n)=(N2)−1∑1≤i<j≤NAij=1∗Ab(n)1−tr⁡Ab(n)N(N−1).\sigma_b(n) =\binom{N}{2}^{-1}\sum_{1\le i<j\le N}A_{ij} =\frac{\mathbf 1^{*}\mathbf A_b(n)\mathbf 1-\operatorname{tr}\mathbf A_b(n)} {N(N-1)}. The statistic σb(2)\sigma_b(2) is undefined because the field contains no pair of distinct elements.

If q>1q>1, a fraction k/nk/n terminates exactly when q∣kq\mid k, so exactly s−1s-1 fractions terminate. The reference fraction 1/n1/n is nonterminating, so its matrix row assigns zero to those mixed pairs, whereas the reference-alignment convention assigns them score one. Consequently, αb(n)=∑j=1NA1j+s−1N.\alpha_b(n)=\frac{\displaystyle\sum_{j=1}^{N}A_{1j}+s-1}{N}. If q=1q=1, then Ab(n)=JN\mathbf A_b(n)=J_N and αb(n)=σb(n)=1\alpha_b(n)=\sigma_b(n)=1 for n≥3n\ge3. In either case where σb\sigma_b is defined, focused alignment is recovered as Fb(n)=αb(n)−σb(n)F_b(n)=\alpha_b(n)-\sigma_b(n). Thus the matrix together with the termination marker recovers all three scalar statistics; the unmarked matrix alone does not determine the terminating correction.

Prime Matrices and Multiplicative Orbits

For a prime p∤bp\nmid b, define the digit function δp,b(r)=⌊brp⌋,1≤r<p.\delta_{p,b}(r)=\left\lfloor\frac{br}{p}\right\rfloor, \qquad 1\le r<p.

Theorem 3 (Identity characterization). Let p∤bp\nmid b be prime. The following conditions are equivalent.

  1. Ab(p)=Ip−1\mathbf A_b(p)=I_{p-1};

  2. δp,b\delta_{p,b} is injective on {1,…,p−1}\{1,\ldots,p-1\};

  3. p≤b+1p\le b+1.

Proof. If the digit function is injective, two distinct initial residues i,ji,j remain distinct after multiplication by every power of bb. Their synchronized digits therefore differ at every position, so all off-diagonal matrix entries vanish. Conversely, if δp,b(r)=δp,b(s)\delta_{p,b}(r)=\delta_{p,b}(s) for distinct residues r,sr,s, then the fractions r/pr/p and s/ps/p match at the first position and Ars>0A_{rs}>0. Thus the matrix is the identity exactly when the digit function is injective. If p>b+1p>b+1, then p−1p-1 residues enter only bb digit bins, so injectivity fails. Suppose p≤b+1p\le b+1. When b=p−1b=p-1, δp,b(r)=r−1\delta_{p,b}(r)=r-1. Otherwise b≥pb\ge p, and for 1≤r<s<p1\le r<s<p, bsp−brp≥1,\frac{bs}{p}-\frac{br}{p}\ge1, so ⌊bs/p⌋>⌊br/p⌋\lfloor bs/p\rfloor>\lfloor br/p\rfloor. The digit function is injective in both cases. ◻

The next theorem gives the exact meaning of multiplicative-coset structure in the matrix.

Theorem 4 (Coset–Fourier reduction). Let p∤bp\nmid b be prime, put L=ordp(b)L=\mathop{\mathrm{ord}}_p(b) and h=(p−1)/Lh=(p-1)/L, and choose representatives c1,…,chc_1,\ldots,c_h for the cosets of ⟨b⟩\langle b\rangle in (Z/pZ)∗(\mathbb Z/p\mathbb Z)^*. Order the nonzero residues as cabr(modp),1≤a≤h,0≤r<L.c_a b^r\pmod p, \qquad 1\le a\le h,\quad 0\le r<L. In this ordering, Ab(p)\mathbf A_b(p) is an h×hh\times h matrix of L×LL\times L circulant blocks.

More precisely, for 0≤d<b0\le d<b define xa,d(t)=1{δp,b(cabt mod p)=d},Xa,d(j)=∑t=0L−1xa,d(t)e−2πijt/L.x_{a,d}(t)= \mathbf 1_{\{\delta_{p,b}(c_a b^t\bmod p)=d\}}, \qquad X_{a,d}(j)=\sum_{t=0}^{L-1}x_{a,d}(t)e^{-2\pi ijt/L}. Fourier transformation in the exponent coordinate reduces Ab(p)\mathbf A_b(p) to the direct sum of the h×hh\times h Hermitian matrices Mj(a,a′)=1L∑d=0b−1Xa,d(j)‾Xa′,d(j),0≤j<L.M_j(a,a')=\frac1L\sum_{d=0}^{b-1} \overline{X_{a,d}(j)}X_{a',d}(j), \qquad 0\le j<L. Consequently, the spectrum of Ab(p)\mathbf A_b(p) is the union, with multiplicity, of the spectra of M0,…,ML−1M_0,\ldots,M_{L-1}.

Proof. At synchronized position tt, the row indexed by cabrc_ab^r has digit δp,b(cabt+r mod p).\delta_{p,b}(c_ab^{t+r}\bmod p). Consequently, A(a,r),(a′,r′)=1L∑t=0L−1∑d=0b−1xa,d(t+r)xa′,d(t+r′).A_{(a,r),(a',r')} =\frac1L\sum_{t=0}^{L-1}\sum_{d=0}^{b-1} x_{a,d}(t+r)x_{a',d}(t+r'). After replacing t+rt+r by a new index, this expression depends on r′−rr'-r modulo LL. Every coset-to-coset block is therefore circulant. The length-LL Fourier transform diagonalizes all these blocks simultaneously [4]. Taking the Fourier transform of the displayed cross-correlation gives the stated matrix MjM_j. For each jj, MjM_j is the Gram matrix of the hh vectors L−1/2(Xa,0(j),…,Xa,b−1(j)),L^{-1/2}\bigl(X_{a,0}(j),\ldots,X_{a,b-1}(j)\bigr), so it is Hermitian and positive semidefinite. The simultaneous Fourier decomposition proves the spectral union. ◻

Corollary 5 (Primitive-root spectrum). If bb is a primitive root modulo pp, then h=1h=1 and Ab(p)\mathbf A_b(p) is permutation-similar to one circulant matrix. Write Xd=X1,dX_d=X_{1,d}, and let R(ℓ)=#{t:δp,b(bt mod p)=δp,b(bt+ℓ mod p)},ℓ∈Z/LZ.R(\ell)=\#\{t:\delta_{p,b}(b^t\bmod p) =\delta_{p,b}(b^{t+\ell}\bmod p)\}, \qquad \ell\in\mathbb Z/L\mathbb Z. Its eigenvalues are the discrete Fourier transform of the normalized cyclic digit-equality autocorrelation. λj=1L∑ℓ=0L−1R(ℓ)e−2πijℓ/L=1L∑d=0b−1∣Xd(j)∣2.\lambda_j=\frac1L\sum_{\ell=0}^{L-1}R(\ell)e^{-2\pi ij\ell/L} =\frac1L\sum_{d=0}^{b-1}|X_d(j)|^2.

Proof. This is the case h=1h=1 of Theorem 4. Its first row is 1L(R(0),…,R(L−1)).\frac1L\bigl(R(0),\ldots,R(L-1)\bigr). The second identity is the one-vector specialization of the formula for MjM_j. ◻

The digit channels xa,dx_{a,d} record equality, rather than numerical products of digit values. Accordingly, the displayed power sum is the sum of the channel powers, not the power spectrum of the digits read as one numerical signal. For example, the six distinct digits of 1/7=0.142857‾1/7=0.\overline{142857} give normalized equality autocorrelation (1,0,0,0,0,0)(1,0,0,0,0,0) and six eigenvalues equal to 11. This is a flat equality spectrum of a deterministic periodic sequence.

When h=2h=2, the theorem gives two eigenvalue branches at every Fourier frequency. It does not force two global eigenvalue levels; the collapse at p=13p=13 below is special.

Proposition 6 (Two exact decimal spectra). In base 1010, the matrix A10(13)\mathbf A_{10}(13) has eigenvalues 4/34/3 and 2/32/3, each with multiplicity six. The matrix A10(17)\mathbf A_{10}(17) has exactly nine distinct eigenvalues, with minimum 1/41/4 and maximum 7/47/4.

Proof. For p=13p=13, the two multiplicative-coset digit words are 076923,153846.076923,\qquad 153846. Each word has distinct digits. Their only shared digits are 33 and 66, and both align at relative shift three. If PP is the unit cyclic shift on six positions, then A10(13)=(I613P313P3I6).\mathbf A_{10}(13) =\begin{pmatrix}I_6&\frac13P^3\\[2pt] \frac13P^3&I_6\end{pmatrix}. Write A10(13)=I12+K/3\mathbf A_{10}(13)=I_{12}+K/3, where K=(0P3P30).K=\begin{pmatrix}0&P^3\\ P^3&0\end{pmatrix}. Since K2=I12K^2=I_{12} and tr⁡K=0\operatorname{tr}K=0, the eigenvalues of KK are +1+1 and −1-1, each six times. This gives 1±1/31\pm1/3.

For p=17p=17, the primitive-root digit word is 0588235294117647.0588235294117647. Its equality autocorrelation is 1616 at shift zero, 22 at shifts ±1,±3,±5\pm1,\pm3,\pm5, and zero elsewhere. Corollary 5 therefore gives λj=1+14(cos⁡πj8+cos⁡3πj8+cos⁡5πj8).\lambda_j=1+\frac14\left( \cos\frac{\pi j}{8}+ \cos\frac{3\pi j}{8}+ \cos\frac{5\pi j}{8}\right). For 0≤j≤80\le j\le8, the nine values are 14,1±14cos⁡π8,1±28,1±14cos⁡3π8,1,74.\frac14,\quad 1\pm\frac14\cos\frac{\pi}{8},\quad 1\pm\frac{\sqrt2}{8},\quad 1\pm\frac14\cos\frac{3\pi}{8},\quad 1,\quad \frac74. They are distinct because cos⁡(π/8)>cos⁡(π/4)>cos⁡(3π/8)>0\cos(\pi/8)>\cos(\pi/4)>\cos(3\pi/8)>0; conjugate Fourier frequencies supply the remaining multiplicities. ◻

Block Structure

Proposition 7. Let p∤bp\nmid b be prime with p≤b+1p\le b+1, and let s≥1s\ge1 be bb-supported. Then Ab(ps)\mathbf A_b(ps) is permutation-similar to Ab(ps)≅Js−1⊕Js⊕⋯⊕Js⏟p−1,\mathbf A_b(ps) \cong J_{s-1} \oplus \underbrace{J_s \oplus \cdots \oplus J_s}_{p-1}, where J0J_0 denotes an empty block. If s=1s=1, then Ab(p)=Ip−1,rank⁡Ab(p)=p−1.\mathbf A_b(p)=I_{p-1},\qquad \operatorname{rank}\mathbf A_b(p)=p-1. If s≥2s\ge2, then rank⁡Ab(ps)=p,\operatorname{rank}\mathbf A_b(ps)=p, and its spectrum is swith multiplicity p−1,s−1with multiplicity 1,0with multiplicity ps−p−1.\begin{aligned} s &\quad\text{with multiplicity }p-1,\\ s-1 &\quad\text{with multiplicity }1,\\ 0 &\quad\text{with multiplicity }ps-p-1. \end{aligned}

Proof. Choose DD with s∣bDs\mid b^D and put u=bD/su=b^D/s. Since p∤bp\nmid b, uu is invertible modulo pp. The s−1s-1 nonzero multiples of pp terminate and form the block Js−1J_{s-1}. Every other numerator begins after depth DD at a nonzero remainder ku(modp)ku\pmod p. Each of the p−1p-1 nonzero remainders has exactly ss numerator representatives.

Members of one remainder class have identical synchronized digits. Members of different classes remain at distinct remainders at every position, and digit-function injectivity forces distinct digits. This proves the direct-sum formula. A nonempty JmJ_m has one eigenvalue mm and m−1m-1 zero eigenvalues. Reading the ranks and multiplicities from the blocks gives the two cases above. ◻

The prime field s=1s=1 has no terminating block. Once s≥2s\ge2, that block supplies the additional rank-one direction. Further growth of ss enlarges only the null space inside the synchronized classes.

Pairwise Geometry and the Spectral Question

The matrix records the full synchronized pairwise geometry. σb\sigma_b is its global off-diagonal average. The marked reference row and the terminating correction recover αb\alpha_b, after which FbF_b is their signed difference. At prime level, the identity matrix characterizes digit partitioning exactly. For supported lifts psps, the block theorem shows precisely which new directions are created and which merely enlarge the kernel.

Theorem 4 reduces every prime matrix to finite Hermitian Fourier blocks. For composite rough parts, additional orbit and period interactions enter the matrix. How much of the prime spectrum can the digit-bin geometry reveal before the full matrix is constructed?

References

[1]A. Lempel and H. Greenberger, Families of sequences with optimal Hamming-correlation properties, IEEE Trans. Inform. Theory 20 (1974), no. 1, 90–94. https://doi.org/10.1109/TIT.1974.1055169.

[2]S. C. Kak and A. Chatterjee, On decimal sequences, IEEE Trans. Inform. Theory 27 (1981), no. 5, 647–652. https://doi.org/10.1109/TIT.1981.1056394.

[3]N. J. Armstrong and R. J. Armstrong, Some properties of repetends, Math. Gaz. 87 (2003), no. 510, 437–443. https://doi.org/10.1017/S0025557200173619.

[4]P. J. Davis, Circulant Matrices, 2nd ed., Chelsea, 1994.

[5]R. A. Horn and C. R. Johnson, Matrix Analysis, 2nd ed., Cambridge University Press, 2013. https://doi.org/10.1017/CBO9781139020411.