Arnold's Cat Map — Chaotic Area-Preserving Map

Interactive Arnold Cat Map visualization: (x', y') = ((x+y) mod N, (x+2y) mod N). Iterations scramble the image, but after exactly K steps it restores perfectly — chaos with hidden order.

Current Image (Iterated)

Original Image

Difference |Current − Original|

Arnold's Cat Map

The classic Arnold cat map is the area-preserving torus map (x', y') = ((x+y) mod 1, (x+2y) mod 1), with matrix A = [[1,1],[1,2]] and det(A)=1. This page lets you explore the broader integer family A = [[1,a],[b,1+ab]], which also has determinant 1 by construction, so every current setting remains area-preserving. The familiar chaotic behavior appears in hyperbolic cases such as (a,b)=(1,1), while settings with a=0 or b=0 reduce to shear-like, non-hyperbolic maps. On an N×N pixel grid every invertible integer map becomes periodic, so after exactly K iterations the image returns to the original.

KAM Theory & Chaos

The classical cat map is a prototype hyperbolic toral automorphism: nearby points separate exponentially and the image rapidly mixes across the torus. That picture applies to the hyperbolic parameter choices on this page, where the eigenvalues are real and distinct. When a=0 or b=0, however, the map becomes parabolic or even the identity, so it no longer shows the same strong chaotic stretching-and-folding. The discrete pixel grid still makes every invertible case exactly periodic, which is why scrambling and perfect restoration can coexist in one demo.

Applications

Arnold-type torus maps are useful as compact teaching models for image scrambling, reversible mixing, digital watermarking, and finite-state periodicity. In practice, though, the period K and matrix parameters alone are not secure modern encryption; they are best understood as a clean demonstration of deterministic scrambling and exact recovery. The hyperbolic settings are also a classic bridge to Hamiltonian chaos, ergodic theory, and conservative dynamics.

How to Use

Upload your own image or choose a built-in pattern. Click Step → to apply one iteration, or use the slider to jump to any cached step. Press Play to watch the image scramble and later return at the period K; the Go to Period button jumps to K-1, one step before restoration. Adjust a and b to change the matrix A = [[1,a],[b,1+ab]] and watch the regime label switch between identity, parabolic, and hyperbolic behavior. Changing N resamples the current source image at a new grid size, so you can compare how the period changes without losing the chosen pattern.