Yamagishi Complexity Torus LabYamagishi Lab

[Paper 1074] The Same Matrix Keeps Mixing on the Continuum and Always Returns the Picture on Pixels

Abstract

Arnold and Avez (1968) drew a map that stretches and folds the picture of a cat on the surface of a doughnut (the torus). Its matrix is the same substitution matrix from which Paper 1053 obtained the ratio of tiles. This paper checks numerically that this one matrix mixes a picture without end on the continuum yet always returns it on pixels, and names what separates the two. No new theorem or law is claimed.

First, on the continuum it mixes: the distance between two nearby points opens by a factor of $\mathbf{2.618034}$ (the square of the golden ratio) at each step, and 100,000 points gathered in a small square enter every one of 100 cells within one tenth of uniform after 8 steps.

Second, and this is the core of the paper: on pixels it always returns. A picture on N×N pixels returns to itself after finitely many steps. The number is set by the period of the Fibonacci sequence modulo N (the Pisano period), and this held for every N from 2 to 300. At most it takes 3N steps, which happens for N = 10, 50 and 250.

Third, pixels numbering a Fibonacci or Lucas number return quickly: a 144-pixel picture returns in 12 steps and a 199-pixel picture in 11. The three fastest per pixel are 199, 144 and 288.

Fourth, the reason for returning is that pixel points are rationals with denominator N: the map becomes a rearrangement of finitely many points, and for 144 pixels the 20736 points split into 1738 cycles whose lengths have least common multiple exactly 12.

Fifth, computation in double precision cannot return: 37/250 has no exact binary form, and the rounding shift grows by the square of the golden ratio each step. A point of 250 pixels should return after 750 steps, but in double precision it leaves the orbit at step 34. With more digits the step of leaving extends in proportion to the number of digits, and with 400 digits the 750 steps are followed to the end and the point returns.

Stated plainly, three expectations failed: that the six fastest N would all be Fibonacci or Lucas numbers, that the step of leaving would agree with the estimate to within 3, and that the 144-pixel picture would turn upside down at step 6.

Keywords: cat map, torus, pixel, Pisano period, Fibonacci sequence, Poincaré recurrence, rounding, separator.

Scope (what is not claimed)

No new theorem or law is claimed: the cat map, its mixing, the period on pixels being set by the Pisano period, and the period never exceeding 3N (Dyson and Falk 1992) are all known. The quantum cat map is not treated; only the classical map on pixels is considered. Mixing is not proved; what is done stops at counting the spread of a swarm of points and the distance between two points. No formula for the period is derived; the relation to the Pisano period is checked for N from 2 to 300. No reason is guessed; why the step of leaving lags the estimate by 4 to 5, and the rule for which N turn upside down halfway, have not been measured. Relation to earlier papers: Paper 1053 used this matrix as a substitution matrix and showed that the ratio of the numbers of tiles approaches the golden ratio. Here the same matrix is taken as a map on the torus, and mixing and returning are counted. Paper 81 wrote that a microscopic state always returns, but only after a time so long that the universe ends first. Here, when the states are finitely many pixels, the return takes at most 3N steps, far fewer than the number of pixels. Paper 213 separated periodic motion, which returns exactly, from quasi-periodic motion, which never returns exactly but comes arbitrarily close. Here, within one and the same map, points with rational coordinates of denominator N return exactly and other points do not. Paper 221 showed that changing the last bit moves an eigenvalue a great deal. Here the rounding of the last bit grows by the square of the golden ratio each step. Paper 300 showed that whether two things share a root is decidable. By that criterion, mixing on the continuum and returning on pixels share a matrix but differ in what is moved (whether the coordinates are rational), so they are not called one root. What is added is: counting side by side that the same matrix mixes and returns, checking the number of steps to return against the Pisano period for N from 2 to 300, counting the lengths of the cycles of the rearrangement of pixels, measuring, for various numbers of digits, the step at which double precision fails to return, and recording the expectations that failed.

1. The question and the shape of the answer

Arnold and Avez (1968) represented the surface of a doughnut (the torus) by a square and applied to the picture of a cat on it the map $(x,y)\mapsto(2x+y,\;x+y)$ (taken modulo 1). At each step the picture is stretched diagonally, the part sticking out of the square comes back from the opposite side, and within a few steps the shape of the cat is mixed beyond recognition. This is Arnold’s cat map.

Yet when the same map is applied to the pixels of a screen, the cat that seemed mixed returns to its original form exactly after a certain number of steps. Why does a map that keeps mixing return? This paper checks numerically that one and the same matrix mixes without end on the continuum and always returns on pixels, and shows that what separates the two is the kind of coordinate.

2. The same matrix

The matrix of the cat map is $\begin{pmatrix}2&1\\1&1\end{pmatrix}$. Its determinant is 1, so it keeps area, and its trace is 3. Its eigenvalues are $2.618033989$ and $0.381966011$, the square of the golden ratio and its reciprocal. The matrix is the square of the Fibonacci matrix $\begin{pmatrix}1&1\\1&0\end{pmatrix}$.

Paper 1053 used this same matrix as a substitution matrix for tiles and showed that the ratio of the numbers of tiles approaches the golden ratio. The larger eigenvalue there is also $2.618033989$. Here the same matrix becomes a map on the torus.

3. On the continuum it mixes

Starting from two nearby points, the factor by which their distance grows at each step was measured. The factor went $2.607724$, $2.617812$, and from the fourth step on settled at $2.618034$. The distance opens by the square of the golden ratio at each step (Lyapunov exponent $0.962424$).

Next, 100,000 points were placed in a small square (side 0.05), the torus was divided into 10×10 cells, and the points in each cell were counted. If uniform, every cell holds 1000.

stepfewest in a cellmost in a cellrelative distance from uniform
0010000099.000
203662735.627
4059944.994
5023661.366
684012300.230
791011060.106
891610840.084

The points, all gathered in one cell at first, entered every cell by step 6 and were within one tenth of uniform by step 8. On the continuum this map keeps mixing.

4. On pixels it always returns

The same map is applied on N×N pixels as $(x,y)\mapsto(2x+y,\;x+y)$ taken modulo N. The number of steps $T(N)$ until every pixel is back in place was counted by actually moving every pixel (N from 2 to 120) and by the number of steps until the matrix power returns to the identity (N from 2 to 300). The two counts agreed.

Since the cat map is the square of the Fibonacci matrix, the number of steps to return is set by the period of the Fibonacci sequence modulo N (the Pisano period; Wall 1960). It is half the Pisano period if that is even, and the Pisano period itself otherwise. This relation held for every N from 2 to 300.

$N$steps to returnPisano periodsteps ÷ $N$
2331.5000
510202.0000
1030603.0000
115100.4545
501503003.0000
1001503001.5000
10125500.2475
1252505002.0000
25075015003.0000
2561923840.7500
3003006001.0000

For every N from 2 to 300 the number of steps does not exceed 3N (Dyson and Falk 1992). It is exactly 3N for N = 10, 50 and 250, each a product of 2 and a power of 5.

5. Pixels numbering a Fibonacci or Lucas number return quickly

When the number of pixels itself is a Fibonacci or Lucas number, the return is quick.

Fibonacci $N$81321345589144233
steps61481810221226
Lucas $N$71118294776123199
steps851271692011

A 144-pixel picture returns in 12 steps and a 199-pixel picture in 11. Ordering N by the number of steps divided by N, the top three are 199 (11 steps), 144 (12 steps) and 288 (24 steps, twice 144).

Here one expectation failed. I expected the top six all to be Fibonacci or Lucas numbers or twice one, but the fourth to sixth, 276, 252 and 205, are none of these. What is claimed stops at the top three.

A picture on 144×144 pixels under the cat map. It starts to mix at step 1, its shape is not visible up to step 11, and at step 12 it returns exactly.
Figure 1. A picture on 144×144 pixels under the cat map. It starts to mix at step 1, its shape is not visible up to step 11, and at step 12 it returns exactly.

6. Why it returns: a rearrangement of pixels

The points of the pixels have rational coordinates with denominator N. The map only rearranges these finitely many points, so repeating it enough times always brings every one back. The rearrangement was split into cycles and counted.

$N$pixelscyclescycle lengthsleast common multiple
1442073617381, 3, 4, 6, 1212
250625002501, 2, 3, 6, 10, 30, 50, 150, 250, 750750

Every cycle length divides the number of steps to return, and the least common multiple of the cycle lengths is exactly that number. Paper 81 wrote that a microscopic state always returns, but only after so long a time that the universe ends first. Here the states are finitely many pixels, so even for 250 pixels the 62500 points return after 750 steps.

7. Computation in double precision cannot return

What happens if the same point is followed with real coordinates instead of pixels? The point $(37/250,\;101/250)$ of 250 pixels returns to its start after 750 steps whether followed with exact integers or with exact fractions. But $37/250$ has no exact binary form, and its double-precision value differs from the true value by $7.327\times10^{-18}$. That shift grows by the square of the golden ratio at each step.

digitsfirst step leaving the orbitestimatedistance from start at step 750
double (53 bits)3431.8$4.879\times10^{-1}$
16 (56 bits)3731.8$4.739\times10^{-1}$
50118113.2$1.124\times10^{-1}$
100237232.8$3.840\times10^{-1}$
200477472.0$3.469\times10^{-1}$
400does not leave950.5$4.778\times10^{-89}$

“Leaving” means moving more than half a pixel from the exact orbit. The estimate is the number of digits times $\ln10$ divided by $2\ln\varphi$ (less the part for the size of a pixel). In double precision the point leaves at step 34 and is $4.879\times10^{-1}$ away from its start at step 750. With more digits the step of leaving extends, and its growth agrees closely with the slope of the estimate (81 against 81.3, 119 against 119.6, 240 against 239.2). With 400 digits the 750 steps are followed to the end, and the point returns to within $4.778\times10^{-89}$ of its start.

Another expectation failed. I expected the step of leaving to agree with the estimate to within 3, but in the four rows with a set number of digits the measurement lagged by 4 to 5 (differences 5.2, 4.8, 4.2, 5.0). Since the growth follows the estimate, the lag is a constant difference. The main reason is that the first shift is smaller than $10$ to the minus number of digits. From $50$ to $200$ digits the actual first shift is about $1/100$ of that, which delays the step of leaving by $\ln100/\ln\varphi^{2}=4.785$ steps. Paper 221 showed that changing the last bit moves an eigenvalue a great deal; here the rounding of the last bit grows at each step and takes the orbit away.

8. The picture turns upside down halfway

If the matrix power at half the number of steps is $-I$, the picture appears turned by 180 degrees. For 250 pixels, step 375 is such a step. Of N from 3 to 300, 94 have the matrix power equal to $-I$ at half the number of steps. All 258 N with an even number of steps give a constant multiple of the identity at the half: $-I$ for 94, another multiple for 164.

At first I expected the 144-pixel picture also to turn upside down at step 6, but the matrix power at step 6 was not $-I$; it was $89$ times the identity ($89^{2}\equiv1\pmod{144}$). The rule for which N turn upside down has not been measured here.

A picture on 250×250 pixels. At step 375 it appears turned by 180 degrees, and at step 750 it returns.
Figure 2. A picture on 250×250 pixels. At step 375 it appears turned by 180 degrees, and at step 750 it returns.

9. The separator: rationals with denominator N, or any other point

The same matrix mixes without end on the continuum and returns on pixels. The properties of the matrix (the stretching factor, keeping area) are the same in both. What differs is the coordinate. Pixel points are rationals with denominator N, and the map becomes a rearrangement of finitely many points, so it always returns. Other points, such as double-precision numbers or irrational points, do not enter the cycles of that rearrangement; their distance grows and they do not return.

The separator is whether the coordinates are rationals with denominator N or any other point. The “returns exactly” and “comes arbitrarily close but does not return” separated by Paper 213 are split here, within one and the same map, by the kind of coordinate.

10. Relation to earlier papers

Paper 1053 used this matrix as a substitution matrix and showed that the ratio of the numbers of tiles approaches the golden ratio. Here the same matrix was taken as a map on the torus, and mixing and returning were counted.

Paper 81 wrote that a microscopic state always returns, but only after so long a time that the universe ends first. Here, when the states are finitely many pixels, the return took at most 3N steps, far fewer than the number of pixels.

Paper 213 separated periodic motion, which returns exactly, from quasi-periodic motion, which never returns exactly but comes arbitrarily close. Here, within one and the same map, points with rational coordinates of denominator N returned exactly and other points did not.

Paper 221 showed that changing the last bit moves an eigenvalue a great deal. Here the rounding of the last bit grew by the square of the golden ratio at each step (Section 7).

Paper 300 showed that whether two things share a root is decidable. By that criterion, mixing on the continuum and returning on pixels share a matrix but differ in what is moved (whether the coordinates are rational), so they are not called one root.

Closing

Closing: the same matrix keeps mixing on the continuum and always returns the picture on pixels. On the continuum the distance opens by $\mathbf{2.618034}$ at each step, and 100,000 points spread uniformly in 8 steps. On pixels the number of steps to return is set by the Pisano period, agreeing for every N from 2 to 300, and never exceeds 3N. A 144-pixel picture returns in 12 steps and a 199-pixel picture in 11. It returns because pixel points are rationals with denominator N and the map rearranges them; the 1738 cycles for 144 pixels have least common multiple exactly 12. In double precision the point leaves the orbit at step 34, and with 400 digits the 750 steps are followed to the end and the point returns. Stated plainly, three expectations failed: the rule for the six fastest, the lag against the estimate, and the step at which 144 pixels turn upside down; the reasons for the lag and the rule have not been measured. The separator: whether the coordinates are rationals with denominator N or any other point. Rational points enter the cycles of the rearrangement and return; other points see their distance grow and do not.

Revision Record

2nd Edition (October 2026): Two numbers were corrected. (1) In Section 8, the count of N with $-I$ at half the number of steps is 94, not 52; the check of the 1st edition computed the matrix power in 64-bit integers before reducing, and the power overflows from step 46 on. (2) The row "16 (double)" of the table in Section 7 was a computation with 56 significant bits; true double precision (53 bits) leaves at step 34 and is $4.879\times10^{-1}$ away at step 750. The "step 37" of the abstract (fifth item), Section 7 and the closing was corrected, and a row was added to the table. The reason for the lag in the step of leaving (Section 7) and the fact that the matrix at step 6 for 144 pixels is $89$ times the identity (Section 8) were added. The core does not change.

References

  1. Arnold, V. I., & Avez, A. (1968). Ergodic Problems of Classical Mechanics. Benjamin.
  2. Dyson, F. J., & Falk, H. (1992). Period of a Discrete Cat Mapping. The American Mathematical Monthly.
  3. Wall, D. D. (1960). Fibonacci Series Modulo m. The American Mathematical Monthly.
  4. Yamagishi, Y. (2026). The Poincaré Recurrence Theorem and the Arrow of Time [Paper 81]. YOI: https://www.yamagishiyuuki.com/yoi/81; DOI: 10.5281/zenodo.21733062
  5. Yamagishi, Y. (2026). Coming Back Has Distinct Roots [Paper 213]. YOI: https://www.yamagishiyuuki.com/yoi/213; DOI: 10.5281/zenodo.22119380
  6. Yamagishi, Y. (2026). Change the Last Bit and an Eigenvalue Moves by 0.16 [Paper 221]. YOI: https://www.yamagishiyuuki.com/yoi/221; DOI: 10.5281/zenodo.22120012
  7. Yamagishi, Y. (2026). The Three Hundredth Census: Whether Two Things Share a Root Is Decidable [Paper 300]. YOI: https://www.yamagishiyuuki.com/yoi/300; DOI: 10.5281/zenodo.22171914
  8. Yamagishi, Y. (2026). Weakening Scale Invariance to a Single Ratio Loses the Uniqueness of the Exponent [Paper 1053]. YOI: https://www.yamagishiyuuki.com/yoi/1053; DOI: 10.5281/zenodo.22904428

Reference

Yamagishi, Y. (2026). The Same Matrix Keeps Mixing on the Continuum and Always Returns the Picture on Pixels [Paper 1074]. YOI: https://www.yamagishiyuuki.com/yoi/1074
ORCID: 0009-0006-8587-3450

PDF (English) · PDF (Japanese) · Date proof of the English PDF (OpenTimestamps .ots) · SHA256SUMS

The record page for this paper (in Japanese, with the PDFs in each language and the date proof): YOI 1074. This paper is a preprint and has not been peer reviewed.