Petty's Notebook
ArticlesPapersnfieldAbout
Get notified when new posts are published. No spam, just math.
Alexander S. Petty  |  ©2009-2026
← Back
spectral

The Cross-Alignment Matrix

April 11, 202115 min read
Companion paper: The Cross-Alignment Matrix →
The scalars averaged away the geometry. The matrix keeps it.
The scalars averaged away the geometry. The matrix keeps it.

Every number has a face it shows to the world and a geometry it keeps to itself. The alignment scores are the face. Single numbers, easy to compare, easy to rank. They tell us how much agreement there is. They leave out who agrees with whom.

Write the six fractions 1/71/71/7 through 6/76/76/7. Compare every row to every other row, digit by digit, and record the proportion of positions that match. Put the fractions on both axes of a grid.

Every diagonal entry is one. A row agrees with itself. Every other entry is zero.

Now do the same thing at thirteen.

Three fields, three shapes

Two of the rows are

1/13  = 0.|076923|
11/13 = 0.|846153|

The third digits are both 6. The sixth digits are both 3. These two rows agree in two of their six positions, so their grid entry is 1/31/31/3.

The twelve fractions fall into two cycles of six. Within either cycle, distinct rows never match. Each row instead has one partner in the other cycle, with agreement 1/31/31/3. Reorder the grid by these cycles and the partial matches sit in the two blocks between them.

At twelve, a different arrangement appears. Compare all eleven rows after two decimal places, far enough for every terminating row to have stopped. Three rows terminate, four repeat 3, and four repeat 6. Each group agrees completely with itself.

For this pairwise comparison, terminating rows share one terminal state. A terminating row and a repeating row score zero. This is the convention used in The Coherence Decomposition.

Seven has only self-matches. Thirteen adds six matching pairs between its two cycles. Twelve groups the rows into three complete blocks of sizes 3, 4, and 4.
Seven has only self-matches. Thirteen adds six matching pairs between its two cycles. Twelve groups the rows into three complete blocks of sizes 3, 4, and 4.

That grid is the cross-alignment matrix, Ab(n)\mathbf A_b(n)Ab​(n). The subscript records the base. Here it is ten.

Its entry AijA_{ij}Aij​ is the synchronized agreement of i/ni/ni/n and j/nj/nj/n. For repeating rows, count the matches across a common period and divide by its length. All rows start from the same long-division depth. Shifting each fraction to a separately chosen starting point would answer a different question.

The shapes have exact descriptions. At seven, A10(7)=I6\mathbf A_{10}(7)=I_6A10​(7)=I6​. At twelve, the reordered matrix is

A10(12)=J3⊕J4⊕J4,\mathbf A_{10}(12)=J_3\oplus J_4\oplus J_4,A10​(12)=J3​⊕J4​⊕J4​,

where JmJ_mJm​ is an mmm by mmm square filled with ones. Thirteen lies between these two examples in a useful sense. Agreement reaches beyond the diagonal, but it is still partial.

A vector for each row

There is a simple way to turn these comparisons into geometry.

Give each digit position ten slots, one for each possible digit. A row puts a mark in the slot it uses at that position. The two rows of thirteen above share exactly two marked slots, the 6 in position three and the 3 in position six.

Regard those marks as coordinates of a vector, scaled so that each row has length one. Their inner product is 2/62/62/6. This is precisely their matrix entry. Terminating rows receive a separate unit vector, perpendicular to all the repeating-row vectors.

So the cross-alignment matrix is a Gram matrix, a table of inner products. It is symmetric, has ones on the diagonal, and is positive semidefinite. In particular, all its eigenvalues are nonnegative.

This also puts the digit-partitioning boundary into a new form. For a prime ppp not dividing the base,

Ab(p)=I⟺δ(r)=⌊brp⌋ is injective⟺p≤b+1.\mathbf A_b(p)=I \quad\Longleftrightarrow\quad \delta(r)=\left\lfloor\frac{br}{p}\right\rfloor \text{ is injective} \quad\Longleftrightarrow\quad p\le b+1.Ab​(p)=I⟺δ(r)=⌊pbr​⌋ is injective⟺p≤b+1.

Distinct remainders stay distinct as long division advances. If they always emit distinct digits, every off-diagonal entry stays zero. Once two remainder states share a digit, their entry becomes positive.

The boundary from Digit-Partitioning Primes and the Alignment Formula is exactly the boundary of the identity matrix.

Slide the six digits

Take the repeating block of 1/71/71/7 and shift it by hand.

Shift Digits Matches with 142857
0 142857 6
1 428571 0
2 285714 0
3 857142 0
4 571428 0
5 714285 0

Every nonzero shift misses completely. Divide the counts by six and the equality autocorrelation is

(1,0,0,0,0,0).(1,0,0,0,0,0).(1,0,0,0,0,0).

Its discrete Fourier transform is (1,1,1,1,1,1)(1,1,1,1,1,1)(1,1,1,1,1,1). These are the six eigenvalues of A10(7)\mathbf A_{10}(7)A10​(7).

The calculation has a flat spectrum, the spectral shape associated with white noise. Here it comes from six distinct digits in a deterministic repeating block. We are counting exact digit equality. Multiplying the numerical digit values would give a different autocorrelation. There is no randomness in the construction.

Thirteen makes the distinction between a cycle and the whole field particularly clear. Its two cycle representatives have blocks

076923,153846.076923,\qquad 153846.076923,153846.

Each block also has six distinct digits. Each has the same single-spike equality autocorrelation as 142857. Looking at either one alone would miss the partial matches in the full matrix.

Compare the two different blocks instead. Shift the second by three positions and it becomes 846153. The two shared digits line up. This cross-correlation is where the entries of 1/31/31/3 come from.

Each cycle at thirteen has zero self-agreement at every nonzero shift. The extra agreement appears only when the two different cycles are compared, at shift three.
Each cycle at thirteen has zero self-agreement at every nonzero shift. The extra agreement appears only when the two different cycles are compared, at shift three.

Two cycles, six small matrices

Put the rows of thirteen in their long-division order within each cycle. The first cycle visits the numerators

1, 10, 9, 12, 3, 4,1,\ 10,\ 9,\ 12,\ 3,\ 4,1, 10, 9, 12, 3, 4,

and the second visits

2, 7, 5, 11, 6, 8.2,\ 7,\ 5,\ 11,\ 6,\ 8.2, 7, 5, 11, 6, 8.

Moving one place along either list shifts its digit block by one position. Each block of the comparison matrix therefore depends only on the relative shift of its row and column. Such a block is called a circulant.

At thirteen the full matrix is

A10(13)=(I613P313P3I6),\mathbf A_{10}(13)= \begin{pmatrix} I_6 & \frac13 P^3\\ \frac13 P^3 & I_6 \end{pmatrix},A10​(13)=(I6​31​P3​31​P3I6​​),

where PPP shifts six positions cyclically. The exponent three records the half-turn that brings the two shared digits together.

A Fourier transform separates the shift coordinates. Instead of one twelve-dimensional matrix, we obtain six two-dimensional matrices,

Mj=(1(−1)j/3(−1)j/31),j=0,…,5.M_j= \begin{pmatrix} 1 & (-1)^j/3\\ (-1)^j/3 & 1 \end{pmatrix}, \qquad j=0,\ldots,5.Mj​=(1(−1)j/3​(−1)j/31​),j=0,…,5.

Each has eigenvalues 4/34/34/3 and 2/32/32/3. Across the six Fourier coordinates, each value occurs six times.

The reduction works for every prime not dividing the base. If long division has hhh cycles of length LLL, reorder by those cycles and Fourier-transform the position within each one. The original matrix separates into LLL matrices of size hhh by hhh. These smaller matrices retain the comparisons between cycles.

When the base is a primitive root, there is just one cycle. Each smaller matrix is a single number, and the eigenvalues are the Fourier transform of the normalized equality autocorrelation.

The general result keeps the other cycles in view. At thirteen, they are the entire source of agreement between distinct rows.

Six directions, one level

An eigenvector is a direction that the matrix scales without turning. Its eigenvalue is the scale factor.

The identity matrix at seven has six independent directions, all with eigenvalue one. One eigenvalue level does not mean one direction.

At thirteen, pair each row with the partner it matches in the other cycle. Each pair contributes the small matrix

(11/31/31).\begin{pmatrix} 1 & 1/3\\ 1/3 & 1 \end{pmatrix}.(11/3​1/31​).

Adding the two row coordinates gives an eigenvector with eigenvalue 4/34/34/3. Taking their difference gives one with eigenvalue 2/32/32/3. Six pairs supply six of each. The two levels express how that particular pattern of agreement acts on sums and differences.

At seventeen, the repeating block is 0588235294117647. Some digits occur twice. It has two matches at shifts ±1,±3,±5\pm1,\pm3,\pm5±1,±3,±5 and none at the other nonzero shifts. The normalized autocorrelation 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).λj​=1+41​(cos8πj​+cos83πj​+cos85πj​).

There are sixteen eigenvalues counting multiplicity, occupying nine distinct levels between 1/41/41/4 and 7/47/47/4.

Six directions share the level 1 at seven. At thirteen, six matched pairs produce the levels 2/3 and 4/3. At seventeen, the sixteen directions occupy nine levels.
Six directions share the level 1 at seven. At thirteen, six matched pairs produce the levels 2/3 and 4/3. At seventeen, the sixteen directions occupy nine levels.

The Fourier calculation uses one indicator sequence for each digit. For example, the 6-channel is one wherever a 6 occurs and zero elsewhere. Transform these channels, take their squared magnitudes, add over the digits, and divide by the period length. In the one-cycle case, the result is the matrix spectrum.

This is the finite correlation identity behind the calculation. It explains why a digit-equality matrix has a power-spectrum description, with nonnegative eigenvalues.

The distance between long division and spectral analysis turns out to be one matrix.

The averages inside the grid

The three statistics in The Coherence Decomposition can now be read from this larger object.

Pairwise alignment σ\sigmaσ averages the entries above the diagonal. Reference alignment α\alphaα uses the row marked 1/n1/n1/n, with one adjustment. The reference convention counts terminating fractions as fully aligned, while the matrix assigns zero to a terminating-repeating pair.

At twelve, the reference row has four entries equal to one. Add the three terminating rows and divide by eleven,

α(12)=4+311=711.\alpha(12)=\frac{4+3}{11}=\frac7{11}.α(12)=114+3​=117​.

For the pairwise average, the blocks contain 3+6+6=153+6+6=153+6+6=15 agreeing unordered pairs out of 55. Thus

σ(12)=311,F(12)=α(12)−σ(12)=411.\sigma(12)=\frac3{11}, \qquad F(12)=\alpha(12)-\sigma(12)=\frac4{11}.σ(12)=113​,F(12)=α(12)−σ(12)=114​.

The matrix, the marked reference, and the termination rule recover all three statistics. Those statistics are what you see when you squint. The matrix is what you see when you open your eyes.

The matrix is the object

The tools have a history. Lempel and Greenberger studied cyclic Hamming correlation. Kak and Chatterjee applied such comparisons to reciprocal digit sequences. The orbit structure of repetends is established arithmetic, discussed by Armstrong and Armstrong. Gram matrices and Fourier diagonalization of circulants are standard linear algebra, treated by Horn and Johnson and Davis.

The construction here puts every synchronized pair from the denominator ensemble into one matrix. The prime case reduces through all its multiplicative cycles, without requiring a primitive root. The identity criterion and the supported-denominator blocks give exact forms on one side of the digit-partitioning boundary. Beyond it, the smaller Fourier matrices retain the partial agreements.

Thirteen is the example I keep returning to. Each of its two cycles looks completely separated when inspected alone. Their interaction appears only after both are on the page. A reference score compresses that interaction into a number. The full grid locates the six pairs. The spectrum records their sum and difference directions.

Keeping the table preserves the arrangement that an average leaves out. At thirteen, the six matched pairs remain visible, along with the two cycles they connect.

Companion paper: The Cross-Alignment Matrix →
Share

Discussion

Sign in to join the discussion.

← All articlesRead the paper →
← Previous: The Coherence Decomposition
Next: The Spectral Structure of Fractional Fields →