# Horseshoe map

In the mathematics of chaos theory, a horseshoe map is any member of a class of chaotic maps of the square into itself. It is a core example in the study of dynamical systems. The map was introduced by Stephen Smale while studying the behavior of the orbits of the van der Pol oscillator. The action of the map is defined geometrically by squishing the square, then stretching the result into a long strip, and finally folding the strip into the shape of a horseshoe.
Most points eventually leave the square under the action of the map. They go to the side caps where they will, under iteration, converge to a fixed point in one of the caps. The points that remain in the square under repeated iteration form a fractal set and are part of the invariant set of the map.
The squishing, stretching and folding of the horseshoe map are typical of chaotic systems, but not necessary or even sufficient.
In the horseshoe map, the squeezing and stretching are uniform. They compensate each other so that the area of the square does not change. The folding is done neatly, so that the orbits that remain forever in the square can be simply described.
For a horseshoe map:
* there are an infinite number of periodic orbits;
* periodic orbits of arbitrarily long period exist;
* the number of periodic orbits grows exponentially with the period; and
* close to any point of the fractal invariant set there is a point of a periodic orbit.

## The horseshoe map

The horseshoe map f is a diffeomorphism defined from a region S of the plane into itself. The region S is a square capped by two semi-disks. The codomain of $f$ (the "horseshoe") is a proper subset of its domain $S$. The action of f is defined through the composition of three geometrically defined transformations. First the square is contracted along the vertical direction by a factor a < ⁠1/2⁠. The caps are contracted so as to remain semi-disks attached to the resulting rectangle. Contracting by a factor smaller than one half assures that there will be a gap between the branches of the horseshoe. Next the rectangle is stretched horizontally by a factor of ⁠1/a⁠; the caps remain unchanged. Finally the resulting strip is folded into a horseshoe-shape and placed back into S.
The interesting part of the dynamics is the image of the square into itself. Once that part is defined, the map can be extended to a diffeomorphism by defining its action on the caps. The caps are made to contract and eventually map inside one of the caps (the left one in the figure). The extension of f to the caps adds a fixed point to the non-wandering set of the map. To keep the class of horseshoe maps simple, the curved region of the horseshoe should not map back into the square.
The horseshoe map is one-to-one, which means that an inverse f$^{−1}$ exists when restricted to the image of S under f.
By folding the contracted and stretched square in different ways, other types of horseshoe maps are possible.
To ensure that the map remains one-to-one, the contracted square must not overlap itself. When the action on the square is extended to a diffeomorphism, the extension cannot always be done in the plane. For example, the map on the right needs to be extended to a diffeomorphism of the sphere by using a “cap” that wraps around the equator.
The horseshoe map is an Axiom A diffeomorphism that serves as a model for the general behavior at a transverse homoclinic point, where the stable and unstable manifolds of a periodic point intersect.

## Dynamics of the map

The horseshoe map was designed to reproduce the chaotic dynamics of a flow in the neighborhood of a given periodic orbit. The neighborhood is chosen to be a small disk perpendicular to the orbit. As the system evolves, points in this disk remain close to the given periodic orbit, tracing out orbits that eventually intersect the disk once again. Other orbits diverge.
The behavior of all the orbits in the disk can be determined by considering what happens to the disk. The intersection of the disk with the given periodic orbit comes back to itself every period of the orbit and so do points in its neighborhood. When this neighborhood returns, its shape is transformed. Among the points back inside the disk are some points that will leave the disk neighborhood and others that will continue to return. The set of points that never leaves the neighborhood of the given periodic orbit form a fractal.
A symbolic name can be given to all the orbits that remain in the neighborhood. The initial neighborhood disk can be divided into a small number of regions. Knowing the sequence in which the orbit visits these regions allows the orbit to be pinpointed exactly. The visitation sequence of the orbits provide a symbolic representation of the dynamics, known as symbolic dynamics.

### Orbits

It is possible to describe the behavior of all initial conditions of the horseshoe map. An initial point u$_0$ = (x, y) gets mapped into the point u$_1$ = f(u$_0$). Its iterate is the point u$_2$ = f(u$_1$) = f $^2$(u$_0$), and repeated iteration generates the orbit u$_0$, u$_1$, u$_2$, ...
Under repeated iteration of the horseshoe map, most orbits end up at the fixed point in the left cap. This is because the horseshoe maps the left cap into itself by an affine transformation that has exactly one fixed point. Any orbit that lands on the left cap never leaves it and converges to the fixed point in the left cap under iteration. Points in the right cap get mapped into the left cap on the next iteration, and most points in the square get mapped into the caps. Under iteration, most points will be part of orbits that converge to the fixed point in the left cap, but some points of the square never leave.

### Iterating the square

Under forward iterations of the horseshoe map, the original square gets mapped into a series of horizontal strips. The points in these horizontal strips come from vertical strips in the original square. Let S$_0$ be the original square, map it forward n times, and consider only the points that fall back into the square S$_0$, which is a set of horizontal stripes
    $H_{n}=f^{n}(S_{0})\cap S_{0}.$
The points in the horizontal stripes came from the vertical stripes
    $V_{n}=f^{-n}(H_{n})$,
which are the horizontal strips H$_n$ mapped backwards n times. That is, a point in V$_n$ will, under n iterations of the horseshoe, end up in the set H$_n$ of vertical strips.

### Invariant set

If a point is to remain indefinitely in the square, then it must belong to a set Λ that maps to itself. Whether this set is empty or not has to be determined. The vertical strips V$_1$ map into the horizontal strips H$_1$, but not all points of V$_1$ map back into V$_1$. Only the points in the intersection of V$_1$ and H$_1$ may belong to Λ, as can be checked by following points outside the intersection for one more iteration.
The intersection of the horizontal and vertical stripes, H$_n$ ∩ V$_n$, are squares that in the limit n → ∞ converge to the invariant set Λ (this set is an intersection of a Cantor set of vertical lines with a Cantor set of horizontal lines). The structure of this set can be better understood by introducing a system of labels for all the intersections—a symbolic dynamics.

### Symbolic dynamics

Since H$_n$ ∩ V$_n$ ⊂ V$_1$, any point that is in Λ under iteration must land in the left vertical strip A of V$_1$, or on the right vertical strip B. The lower horizontal strip of H$_1$ is the image of A and the upper horizontal strip is the image of B, so H$_1$ = f(A) ∪ f(B). The strips A and B can be used to label the four squares in the intersection of V$_1$ and H$_1$:
    ${\begin{aligned}\Lambda _{A\bullet A}&=f(A)\cap A\\\Lambda _{A\bullet B}&=f(A)\cap B\\\Lambda _{B\bullet A}&=f(B)\cap A\\\Lambda _{B\bullet B}&=f(B)\cap B\end{aligned}}$
The set Λ$_{B•A}$ consist of points from strip A that were in strip B in the previous iteration. A dot is used to separate the region the point of an orbit is in from the region the point came from.
The notation can be extended to higher iterates of the horseshoe map. The vertical strips can be named according to the sequence of visits to strip A or strip B. For example, the set ABB ⊂ V$_3$ consists of the points from A that will all land in B in one iteration and remain in B in the iteration after that:
    $ABB=\{x\in A\,|\,f(x)\in B\,\,\,\mathrm {and} \,\,\,f_{2}(x)\in B\}.$
Working backwards from that trajectory determines a small region, the set ABB, within V$_3$.
The horizontal strips are named from their vertical strip pre-images. In this notation, the intersection of V$_2$ and H$_2$ consists of 16 squares, one of which is
    $\Lambda _{AB\bullet BB}=f_{2}(AB)\cap BB.$
All the points in Λ$_{AB•BB}$ are in B and will continue to be in B for at least one more iteration. Their previous trajectory before landing in BB was A followed by B.

### Periodic orbits

Any one of the intersections Λ$_{P•F}$ of a horizontal strip with a vertical strip, where P and F are sequences of As and Bs, is an affine transformation of a small region in V$_1$. If P has k symbols in it, and if f $^{−k}$(Λ$_{P•F}$) and Λ$_{P•F}$ intersect, the region Λ$_{P•F}$ will have a fixed point. This happens when the sequence P is the same as F. For example, Λ$_{ABAB•ABAB}$ ⊂ V$_4$ ∩ H$_4$ has at least one fixed point. This point is also the same as the fixed point in Λ$_{AB•AB}$. By including more and more ABs in the P and F part of the label of intersection, the area of the intersection can be made as small as needed. It converges to a point that is part of a periodic orbit of the horseshoe map. The periodic orbit can be labeled by the simplest sequence of As and Bs that labels one of the regions the periodic orbit visits.
For every sequence of As and Bs there is a periodic orbit.