Linear recurrences indexed by $\mathbb{Z}$

Abstract: This note considers linear recurrences (also called linear difference equations) in unknowns indexed by the integers. We characterize a unique \emph{reduced} linear recurrence with the same solutions as a given linear recurrence, and construct a \emph{solution matrix} which parametrizes the space of solutions. Several properties of solution matrices are shown, including a combinatorial characterization of bases and dimension of the space of solutions.

\section{The problem}

We consider the following version of a \textbf{linear recurrence}\footnote{Sometimes called a `system of linear recurrence relations' or a `{system of linear difference equations}'.}: a system of linear equations
in the sequence of variables $...,x_{-1},x_0,x_1,x_2,...$ which equate each variable to a linear combination of the preceding variables.
This includes the (bi-infinite) Fibonacci recurrence:
\begin{equation}
\label{eq: fib}
x_i = x_{i-1}+x_{i-2},\;\;\; \forall i\in \mathbb{Z}
\end{equation}
but it also includes linear recurrences where the equations (and their length) may vary:
\begin{equation}
\label{eq: linrec}
\begin{array}{ll}
x_i = x_{i-1} - x_{i-2}  &  \forall i\in 2 \mathbb{Z} \\
x_i = 2x_{i-1} - x_{i-2} + x_{i-4} &  \forall i\in 2 \mathbb{Z}+1
\end{array}
\end{equation}
The coefficients of the equations are taken from an arbitrary field $\mathsf{k}$, which we fix throughout.

A \textbf{solution} of a linear recurrence is a sequence of numbers in $\mathsf{k}$ satisfying the equations.
For example, the linear recurrences \eqref{eq: fib} and \eqref{eq: linrec} are respectively solved by the sequences:
\begin{align*}
 ...,-21,13,-8,5,-3, 2, -1, 1, &0, 1, 1, 2,3,5,8,13,21,... \\
..., 1, 0, -1, 0, 1, 2, 1, 0, -1, 0, &1, 2, 1, 0, -1, 0, 1, 2,...
\end{align*}
The motivating problem of this note is to construct all solutions to a given linear recurrence.

\begin{rem}
We also consider \textbf{affine recurrences}, in which the equations may have a constant term. The solutions to these systems are constructed in Section \ref{section: affine}.
\end{rem}

\newpage

{\centering
\it Sections 2\--4 summarize the results, and Sections 5\--8 contain the proofs and details.
\\}

\section{Simplifying the problem}

We first reformulate the problem using ideas from finite dimensional linear algebra.

\subsection{Recurrence matrices}

Like finite systems of linear equations, linear recurrences can be reformulated as matrix equations.
By moving the variables to the left-hand side of each equation and collecting the coefficients into a $\mathbb{Z}\times \mathbb{Z}$-matrix $\mathsf{C}$, we may rewrite the system of linear equations as
\[ \mathsf{C}\mathsf{x} =\mathsf{0} \]
where $\mathsf{x}$
is a $\mathbb{Z}$-vector of variables.

For example, the Fibonacci recurrence may be rewritten as:
\[
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center},
		column sep={.65cm,between origins},
		row sep={.65cm,between origins},
		left delimiter={[},
		right delimiter={]},
	] (M) at (0,0) {
		\rotatebox{-45}{$\cdots$} \& \& \&  \& \& \&  \\
		 \& 1 \& 0 \& 0 \& 0 \& 0 \& \\
		 \& -1 \& 1 \& 0 \& 0 \& 0 \& \\
		 \& -1 \& -1 \& 1 \& 0 \& 0 \& \\
		 \& 0 \& -1 \& -1 \& 1 \& 0 \& \\
		 \& 0 \& 0 \& -1 \& -1 \& 1 \& \\
		 \& \& \& \& \& \& \rotatebox{-45}{$\cdots$} \\
	};
\end{tikzpicture}
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center},
		column sep={.65cm,between origins},
		row sep={.65cm,between origins},
		left delimiter={[},
		right delimiter={]},
	] (M) at (0,0) {
		\rotatebox{90}{$\cdots$} \\
		x_{-2} \\
		x_{-1} \\
		x_0 \\
		x_1 \\
		x_2 \\
		\rotatebox{90}{$\cdots$} \\
	};
\end{tikzpicture}
=\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center},
		column sep={.65cm,between origins},
		row sep={.65cm,between origins},
		left delimiter={[},
		right delimiter={]},
	] (M) at (0,0) {
		\rotatebox{90}{$\cdots$} \\
		0 \\
		0 \\
		0 \\
		0 \\
		0 \\
		\rotatebox{90}{$\cdots$} \\
	};
\end{tikzpicture}
\]

The $\mathbb{Z}\times \mathbb{Z}$-matrices $\mathsf{C}$ which arise this way are precisely those which are:
\begin{itemize}
	\item \textbf{lower unitriangular}; that is, $\mathsf{C}_{a,b}=0$ if $a<b$ and $\mathsf{C}_{a,a}=1$ for all $a$, an
	\item \textbf{horizontally bounded}; that is, $\mathsf{C}_{a,b}=0$ if $b\ll a$ or $b \gg a$ for all $a$.\footnote{The bounds need not be uniform; i.e. they may depend on $a$. These are also called \emph{row finite matrices}.}
\end{itemize}
We define a \textbf{recurrence matrix} to be a $\mathbb{Z}\times \mathbb{Z}$-matrix with these two properties. Hence, the original problem is equivalent to describing the kernel of a given recurrence matrix.

\begin{conv}
As can be seen above, recurrence matrices make inefficient use of space: their non-zero coefficients are concentrated below and sufficiently near the main diagonal. To remedy this, we adopt the atypical convention of \textbf{rotating $\mathbb{Z}\times\mathbb{Z}$-matrices $45^\circ$ counterclockwise}.\footnote{This alignment is also chosen to match the existing literature on \emph{friezes}; see Section \ref{section: frieze}.}
So, a lower unitriangular matrix $\mathsf{C}$ would be formatted as follows:
\[
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\path[use as bounding box] (-5.25-.5,.5) rectangle (6+.5,-4);
	\begin{scope}
	\clip (-5.25-.5,.5) rectangle (6+.5,-3-.5);
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		throw/.style={},
		origin/.style={dark green,draw,circle,inner sep=0.25mm,minimum size=2mm},
		pivot/.style={draw,circle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,rotate=45},
		column sep={.75cm,between origins},
		row sep={.75cm,between origins},
	] (M) at (0,0) {
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& \mathsf{C}_{1,0} \& \& \mathsf{C}_{2,1} \& \& \mathsf{C}_{3,2} \& \&\mathsf{C}_{4,3} \& \&\mathsf{C}_{5,4} \& \&\mathsf{C}_{6,5} \& \&\mathsf{C}_{7,6} \&  \\
	 \&\mathsf{C}_{1,-1} \& \&\mathsf{C}_{2,0} \& \&\mathsf{C}_{3,1} \& \&\mathsf{C}_{4,2} \& \&\mathsf{C}_{5,3} \& \&\mathsf{C}_{6,4} \& \&\mathsf{C}_{7,5} \& \& \cdots \\
	\cdots \& \&\mathsf{C}_{2,-1} \& \&\mathsf{C}_{3,0} \& \&\mathsf{C}_{4,1} \& \&\mathsf{C}_{5,2} \& \&\mathsf{C}_{6,3} \& \&\mathsf{C}_{7,4} \& \&\mathsf{C}_{8,5} \&  \\
	 \& \rotatebox{90}{$\cdots$} \& \& \rotatebox{90}{$\cdots$} \& \& \rotatebox{90}{$\cdots$} \& \& \rotatebox{90}{$\cdots$} \& \& \rotatebox{90}{$\cdots$} \& \& \rotatebox{90}{$\cdots$} \& \& \rotatebox{90}{$\cdots$} \& \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	};

	\draw[dark red, fill= dark red!50,opacity=.25,rounded corners] (M-1-2.center) -- (M-9-10.center) -- (M-9-12.center) -- (M-1-4.center) -- cycle;
	\draw[dark blue, fill= dark blue!50,opacity=.25,rounded corners] (M-1-14.center) -- (M-9-6.center) -- (M-9-4.center) -- (M-1-12.center) -- cycle;
	\draw[dark green, fill= dark green!50,opacity=.25,rounded corners] (-8,.35) rectangle (8.75,-.35);
	\end{scope}
	\node[dark red] at (M-9-11) {\scriptsize $2$nd column};
	\node[dark blue] at (M-9-5) {\scriptsize $4$th row};
	\node[dark green,right] at (6.5,0) {\scriptsize Main diagonal};

\end{tikzpicture}
\]
Any omitted entries (including those above the main diagonal) are interpreted as $0$.
\end{conv}

\begin{ex}\label{ex: fib}
The Fibonacci recurrence \eqref{eq: fib} corresponds to the recurrence matrix:
\[
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		throw/.style={},
		origin/.style={},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	};
\end{tikzpicture}
\]
The linear recurrence \eqref{eq: linrec} corresponds to the recurrence matrix:
\[
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		throw/.style={},
		origin/.style={},
		faded/.style={black!25},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& -1 \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \& \& -1 \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	\cdots \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \&  \\
	 \& -1 \& \& |[faded]| 0 \& \& -1 \& \& |[faded]| 0 \& \& -1 \& \& |[faded]| 0 \& \& -1 \& \& \cdots \\
	};
\end{tikzpicture}
\]
The zeroes in grey could have been suppressed.
\end{ex}

\begin{warn}{\marginnote{\dbend}[.05cm]}
The reader should keep the following two pathologies in mind when working with infinite matrices and vectors.
\begin{itemize}
	\item The product of an arbitrary $\mathbb{Z}\times \mathbb{Z}$-matrix with a $\mathbb{Z}$-vector or another $\mathbb{Z}\times\mathbb{Z}$-matrix may involve summing an infinite number of non-zero terms in $\mathsf{k}$. When this occurs, we simply say \bad{the product does not exist}.\footnote{While one might allow infinite sums that absolutely converge in some topology on $\mathsf{k}$, we won't consider this.}
	\item Even when all constituent products exist, \bad{multiplication may not be associative}. The corresponding entries of $(\mathsf{AB})\mathsf{C}$ and $\mathsf{A}(\mathsf{BC})$ are defined by double infinite sums which coincide except for the order of summation, which cannot be exchanged in general.
\end{itemize}

Mercifully, the product $\mathsf{AC}$ exists and the equality $(\mathsf{AB})\mathsf{C}=\mathsf{A}(\mathsf{BC})$ holds whenever (a) $\mathsf{A}$, $\mathsf{B}$, and $\mathsf{C}$ are lower unitriangular, or (b) $\mathsf{A}$ and $\mathsf{B}$ are horizontally bounded and $\mathsf{C}$ is any matrix or vector. We will make extensive use of both of these cases.
\end{warn}

\subsection{Reduced recurrence matrices}

As we are primarily interested in the kernel of a recurrence matrix, let us say...
\begin{itemize}
	\item ...a recurrence matrix is \textbf{trivial} if its kernel is trivial (i.e.~only the zero vector), and...
	\item ...two recurrence matrices are \textbf{equivalent} if their kernels are equal.
\end{itemize}
For example, a recurrence matrix is trivial if and only if it is equivalent to the $\mathbb{Z}\times \mathbb{Z}$ identity matrix, whose kernel is clearly $\{0\}$. This example can be extended to the following theorem.\footnote{All theorems stated in Sections 2\--4 are proven in a later section; e.g. Theorem \ref{thm: triv-equiv} is proven in Section 5.}

\begin{prethm}{\ref{thm: triv-equiv}}
Two recurrence matrices $\mathsf{C}$ and $\mathsf{C}'$ are equivalent if and only $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for some trivial recurrence matrix $\mathsf{D}$.
\end{prethm}

We would like to characterize a representative of each equivalence class which is `minimal' in some sense. In finite linear algebra, this is accomplished by \emph{row reducing} a matrix, but translating row reduction into our current setting runs into several issues.
\begin{itemize}
	\item Only one type of row operation can send recurrence matrices to recurrence matrices; specifically, adding a multiple of one row to a lower row.
	\item There is no `upper left corner' in which to start a deterministic algorithm.
	\item Sequences of row operations need not terminate, and two infinite sequences of row operations may have different limits (in an appropriate topology, see Section \ref{section: limits}).
\end{itemize}

Nevertheless, we may characterize those recurrence matrices which cannot be row reduced any further. A recurrence matrix is \textbf{reduced} if the first non-zero entry in each row (called the \textbf{pivot} entry in that row) is the last non-zero entry in its column.

\begin{ex}\label{ex: pivots}
The following recurrence matrix is reduced.
\[
\begin{tikzpicture}[
	nodes={anchor=center},
	ascending/.style={blue,opacity=.5},
	descending/.style={red,opacity=.5},
	]
	\clip[use as bounding box] (-6.30,-1.8) rectangle (5.80,.35);
	\matrix[matrix of math nodes,
		throw/.style={},
		pivot/.style={blue,draw,circle,inner sep=0mm,minimum size=5mm},
		matrix anchor = M-1-9.west,
		nodes in empty cells,
		nodes={anchor=center,rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	 & |[throw]| 1 & & |[throw]| 1 & & |[throw]| 1 & & |[pivot]| 1 & &|[throw]| 1 & & |[throw]| 1 & & |[throw]| 1 & & \cdots \\
	\cdots & & 1 & & 1 & &  & &  & & |[pivot]| 1 & & |[pivot]| 1 & & |[pivot]| 1 &  \\
	 & |[pivot]| 1 & & |[pivot]| 1 & &  & & |[pivot]| 1 & &  & &  & &  & & \cdots \\
	\cdots & &  & &  & &  & &  & &  & &  & &  &  \\
	};
	\draw[blue,dashed,->] (M-3-2) to (M-4-3.center);
	\draw[blue,dashed,->] (M-3-4) to (M-4-5.center);
	\draw[blue,dashed,->] (M-3-8) to (M-4-9.center);
	\draw[blue,dashed,->] (M-1-8) to (M-4-11.center);
	\draw[blue,dashed,->] (M-2-11) to (M-4-13.center);
	\draw[blue,dashed,->] (M-2-13) to (M-4-15.center);
\end{tikzpicture}
\]
Below each pivot (in \textcolor{blue}{blue circles}) there are only zeroes (along the dashed arrows).
\end{ex}

Out first fundamental result is the following.

\begin{prethm}{\ref{thm: reduced1}}
Every recurrence matrix is equivalent to a unique reduced recurrence matrix.
\end{prethm}

We provide two independent proofs of this fact. The proof in Section \ref{section: GZ} uses Zorn's Lemma to show that the the reduced matrix the limit of all `generalized row reductions'. The proof in Section \ref{section: rank} (Theorem \ref{thm: reduced2}) constructs the reduced matrix directly from the space of solutions.

\section{Constructing the solutions}

In this section, we construct all elements of the kernel of a reduced recurrence matrix, and thus all solutions to a reduced linear recurrence.

\begin{nota}
For $a\leq b\in \mathbb{Z}$, let $[a,b]\coloneqq\{a,a+1,...,b\}\subset \mathbb{Z}$. For a $\mathbb{Z}\times\mathbb{Z}$-matrix $\mathsf{C}$ and two sets $I,J\subset \mathbb{Z}$, let $\mathsf{C}_{I,J}$ denote the submatrix on row set $I$ and column set $J$.
\end{nota}

\subsection{Adjugates}
Given a lower unitriangular $\mathbb{Z} \times \mathbb{Z}$-matrix $\mathsf{C}$, define the \textbf{adjugate} $\mathsf{Adj}(\mathsf{C})$ of $\mathsf{C}$ to be
the lower unitriangular $\mathbb{Z}\times\mathbb{Z}$-matrix whose subdiagonal entries are defined by
\[ \mathsf{Adj}(\mathsf{C})_{a,b} \coloneqq (-1)^{a+b}\mathrm{det}(\mathsf{C}_{[a+1,b],[a,b-1]}) \]
Three examples of adjugates are given in Figure \ref{fig: adjsol}.
\begin{rem}
The determinant of the finite matrix $\mathsf{C}_{[a+1,b],[a,b-1]}$ coincides with the determinant\footnote{While general $\mathbb{Z}\times \mathbb{Z}$-matrices may not have well-defined determinants, the cofactor matrices of lower unitriangular matrices are lower unitriangular outside of a finite square, and thus have a well-defined determinant.} of the infinite cofactor matrix $\mathsf{C}_{\mathbb{Z}\smallsetminus \{a\},\mathbb{Z}\smallsetminus \{b\}}$, justifying the name `adjugate'.
\end{rem}

Like its finite matrix counterpart, the adjugate matrix has many useful properties.
\begin{prop}\label{prop: adjprops}
Let $\mathsf{C}$ and $\mathsf{D}$ be lower unitriangular $\mathbb{Z}\times \mathbb{Z}$-matrices.
\begin{enumerate}
	\item $\mathsf{Adj}(\mathsf{C})\mathsf{C} =\mathsf{C}\mathsf{Adj}(\mathsf{C}) = \mathrm{Id}$
	\item $\mathsf{Adj}(\mathsf{Adj}(\mathsf{C}))=\mathsf{C}$.
	\item $\mathsf{Adj}(\mathsf{C}\mathsf{D}) = \mathsf{Adj}(\mathsf{D})\mathsf{Adj}(\mathsf{C})$.
	\item For $I,J\subset [a,b]$ with $|I|=|J|$,  $\det(\mathsf{Adj}(\mathsf{C})_{I,J}) = (-1)^{\sum I+\sum J}\det({\mathsf{C}}_{[a,b]\smallsetminus J,[a,b]\smallsetminus I}) $.
\end{enumerate}
\end{prop}
\begin{proof}
Since each entry of $\mathsf{Adj}(\mathsf{C})$ only depends on a finite submatrix of $\mathsf{C}$, these follow from their finite matrix counterparts. E.g. (4) follows by considering the submatrix $\mathsf{C}_{[a,b],[a,b]}$.
\end{proof}

The first three parts of the prior proposition can be rephrased as follows.

\begin{prop}
The lower unitriangular $\mathbb{Z} \times \mathbb{Z}$-matrices form a group with inverse $\mathsf{Adj}$.
\end{prop}

\begin{warn}
{\marginnote{\dbend}[.05cm]}
Since multiplication is not always associative, \bad{inverses may not be unique} in the larger set of $\mathbb{Z}\times \mathbb{Z}$-matrices (see Remark \ref{rem: threeinverses}), and so we write $\mathsf{Adj}(\mathsf{C})$ instead of $\mathsf{C}^{-1}$.
\end{warn}

The recurrence matrices do not form a subgroup of the lower unitriangular matrices, as they are not closed under $\mathsf{Adj}$. In fact, the recurrence matrices whose adjugate is also a recurrence matrix are precisely the trivial ones.
\begin{prethm}{\ref{thm: triv-inv}}
A recurrence matrix $\mathsf{C}$ is trivial if and only if $\mathsf{Adj}(\mathsf{C})$ is a recurrence matrix.
\end{prethm}

\noindent Since $\mathsf{Adj}(\mathsf{C})$ is lower unitriangular by construction, $\mathsf{C}$ is trivial if and only if $\mathsf{Adj}(\mathsf{C})$ is horizontally bounded.

\begin{rem}
The recurrence matrices form a semigroup whose subgroup of invertible elements is the set of trivial recurrence matrices (by Theorem \ref{thm: triv-inv}). The left orbits of this subgroup on the set of recurrence matrices are the equivalence classes (by Theorem \ref{thm: triv-equiv}), and the reduced recurrence matrices are a transverse of these orbits (by Theorem \ref{thm: reduced1}).
\end{rem}

\begin{figure}[h!!]
\begin{tabular}{|c||c||c|}
\hline
\multicolumn{3}{|c|}{Reduced recurrence matrices} \\
\hline
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,.3) rectangle (2.55,-.9);
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		origin/.style={},
		throw/.style={},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	};

\end{tikzpicture}
&
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,.3) rectangle (2.55,-.9);
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		origin/.style={},
		throw/.style={},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	};
\end{tikzpicture}
&
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,.3) rectangle (2.55,-.9);
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[pivot]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& -1 \& \&  \& \&  \& \& |[pivot]|  -1 \& \& |[pivot]| -1 \& \\
	 \& |[pivot]| -1 \&  \& |[pivot]| -1 \& \& |[pivot]| -1 \& \&  \& \& |[pivot]| -1 \& \& \& \&  \& \& \cdots \\
	 \& \&  \& \&  \& \&  \& \& \&  \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	 \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \& \&  \&  \\
	};
\end{tikzpicture}
\\
\hline
\multicolumn{3}{|c|}{Adjugate matrices} \\
\hline
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,.3) rectangle (2.55,-2.4);
	\matrix[matrix of math nodes,
		matrix anchor = M-1-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={draw,circle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \&  \\
	 \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& \cdots \\
	\cdots \& \& 3 \& \& 3 \& \& 3 \& \& 3 \& \& 3 \& \& 3 \& \& 3 \&  \\
	 \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& \cdots \\
	\cdots \& \& 8 \& \& 8 \& \& 8 \& \& 8 \& \& 8 \& \& 8 \& \& 8 \&  \\
	 \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	};
\end{tikzpicture}
&
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,.3) rectangle (2.55,-2.4);
	\matrix[matrix of math nodes,
		matrix anchor = M-1-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={draw,circle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \& |[throw]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& 2 \& \& 1 \& \& 2 \& \& 1 \& \& 2 \& \& 1 \& \& 2 \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	\cdots \& \& 0 \& \& 0 \& \&0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	\cdots \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \\
	};
\end{tikzpicture}
&
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,.3) rectangle (2.55,-2.4);
	\matrix[matrix of math nodes,
		matrix anchor = M-1-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={draw,circle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \& |[throw,double]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& 1 \& \& 1 \& \& 1 \& \& 0 \& \& 0 \& \& 1 \& \& 1 \& \\
	\& 2 \& \& 2 \& \& 2 \& \& 0 \& \& 1 \& \& 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& 3 \& \& 3 \& \& 0 \& \& 1 \& \& 1 \& \& 0 \& \& 1 \&   \\
	  \& 5 \& \& 5 \& \& 0 \& \& 2 \& \& 1 \& \& 1 \& \& 0 \& \&  \cdots \\
	\cdots \& \& 8 \& \& 0 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \& 0 \& \\
	  \& 13 \& \& 0 \& \& 5 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \&  \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \\
	};
\end{tikzpicture}
\\
\hline
\multicolumn{3}{|c|}{Solution matrices} \\
\hline
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,2.4) rectangle (2.55,-2.4);
	\matrix[matrix of math nodes,
		matrix anchor = M-8-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={dark blue,draw,rounded rectangle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	 \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& \cdots \\
	\cdots \& \& -3 \& \& -3 \& \& -3 \& \& -3 \& \& -3 \& \& -3 \& \& -3 \&  \\
	 \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	\cdots \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \&  \\
	 \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \& \& \cdots \\
	\cdots \& \& 3 \& \& 3 \& \& 3 \& \& 3 \& \& 3 \& \& 3 \& \& 3 \&  \\
	 \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& 5 \& \& \cdots \\
	\cdots \& \& 8 \& \& 8 \& \& 8 \& \& 8 \& \& 8 \& \& 8 \& \& 8 \&  \\
	 \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& 13 \& \& \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	};

\end{tikzpicture}
&
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,2.4) rectangle (2.55,-2.4);
	\matrix[matrix of math nodes,
		matrix anchor = M-8-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={dark blue,draw,rounded rectangle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	\cdots \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	\cdots \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	\cdots \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& 2 \& \& 1 \& \& 2 \& \& 1 \& \& 2 \& \& 1 \& \& 2 \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	\cdots \& \& 0 \& \& 0 \& \&0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	\cdots \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \& \& -1 \& \& -2 \&  \\
	 \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& -1 \& \& \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	};

\end{tikzpicture}
&
\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-2.25,2.4) rectangle (2.55,-2.4);
	\matrix[matrix of math nodes,
		matrix anchor = M-8-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={dark blue,draw,rounded rectangle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={.3cm,between origins},
		row sep={.3cm,between origins},
	] (M) at (0,0) {
	 \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	 \& 5 \&  \& 0 \& \& 2 \& \& -1 \& \& 1 \& \& 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& -3 \& \& 0 \& \& -1 \& \& 1 \& \& 0 \& \& 1 \& \& 0 \&  \\
	 \& 2 \&  \& 2 \& \& 0 \& \& 1 \& \& 0 \& \& 1 \& \& 0 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& 0 \& \& 0 \& \& 1 \& \& 0 \& \& 1 \&  \\
	 \& 1 \&  \& 1 \& \& 1 \& \& 0 \& \& 1 \& \& 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 0 \& \& 1 \& \& 1 \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[origin]| 1 \& \& |[throw,double]| 0 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	\cdots \& \& 1 \& \& 1 \& \& 1 \& \& 0 \& \& 0 \& \& 1 \& \& 1 \& \\
	\& 2 \& \& 2 \& \& 2 \& \& 0 \& \& 1 \& \& 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& 3 \& \& 3 \& \& 0 \& \& 1 \& \& 1 \& \& 0 \& \& 1 \&   \\
	  \& 5 \& \& 5 \& \& 0 \& \& 2 \& \& 1 \& \& 1 \& \& 0 \& \&  \cdots \\
	\cdots \& \& 8 \& \& 0 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \& 0 \& \\
	  \& 13 \& \& 0 \& \& 5 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \&  \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \\
	};

\end{tikzpicture} \\
\hline
\end{tabular}
\caption{Examples of adjugate and solution matrices}
\label{fig: adjsol}
\end{figure}

\subsection{The solution matrix}\label{section: sol}

In this section, we construct a matrix $\mathsf{Sol}(\mathsf{C})$ whose image is the kernel of a given reduced recurrence matrix $\mathsf{C}$.

The \textbf{shape} of a recurrence matrix $\mathsf{C}$ is the non-increasing function $S:\mathbb{Z}\rightarrow\mathbb{Z}$ defined by
\[ S(a) := \min\{ b \in \mathbb{Z} \mid \mathsf{C}_{a,b}\neq 0\} \]
The pivot entry in the $a$th row is then $\mathsf{C}_{a,S(a)}$, and so $\mathsf{C}$ is reduced if and only if $\mathsf{C}_{b,S(a)}=0$ for all $b>a$. In particular, the shape of a reduced recurrence matrix must be injective.

\begin{ex}
The shape of the Fibonacci recurrence matrix is $S(a)=a-2$.
The shape of the recurrence matrix depicted in Example \ref{ex: pivots} is
\[ S(a) = \left\{ \begin{array}{cc}
a-2 & \text{if $a<0$} \\
a & \text{if $a=0$} \\
a-2 & \text{if $a=1$} \\
a-1 & \text{if $a>1$}
\end{array}\right\}\qedhere\]
\end{ex}

Given a recurrence matrix $\mathsf{C}$ with shape $S$, define a $\mathbb{Z}\times \mathbb{Z}$-matrix $\mathsf{P}$ by
\[ \mathsf{P}_{a,b} \coloneqq \left\{ \begin{array}{cc}
(\mathsf{C}_{b,S(b)})^{-1} & \text{if }a=S(b) \\
0 & \text{otherwise}
\end{array}\right\}\]
This is the generalized permutation matrix such that $\mathsf{CP}$ moves the pivots to the main diagonal and rescales them to $1$.
Thus, $\mathsf{C}$ is reduced if and only if $\mathsf{C}\mathsf{P}$ is upper unitriangular.\footnote{A $\mathbb{Z}\times \mathbb{Z}$-matrix $\mathsf{C}$ is \textbf{upper unitriangular} if its transpose $\mathsf{C}^\top$ is lower unitriangular. Such matrices also have an adjugate, which may be defined as $\mathsf{Adj}(\mathsf{C}^\top)^\top$, for which the analog of Proposition \ref{prop: adjprops} holds.}

Given a reduced linear recurrence $\mathsf{C}$, define the \textbf{solution matrix} $\mathsf{Sol}(\mathsf{C})$ of $\mathsf{C}$ by
\[ \mathsf{Sol}(\mathsf{C}) \coloneqq \mathsf{Adj}(\mathsf{C}) - \mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P}) \]
Examples are given in Figure \ref{fig: adjsol}.
The solution matrix is named for the following property.
\begin{prop}\label{prop: sol}
Each column of $\mathsf{Sol}(\mathsf{C})$ is a solution to $\mathsf{C}\mathsf{x}=\mathsf{0}$.
\end{prop}
\begin{proof}
$\displaystyle \mathsf{C} \mathsf{Sol}(\mathsf{C}) = \mathsf{C}[\mathsf{Adj}(\mathsf{C}) - \mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P})]
= \mathsf{C}\mathsf{Adj}(\mathsf{C}) - (\mathsf{C}\mathsf{P})\mathsf{Adj}(\mathsf{C}\mathsf{P}) = \mathrm{Id} - \mathrm{Id} = \mathsf{0}$.
\end{proof}

\begin{ex}
If $\mathsf{C}$ is the Fibonacci recurrence matrix, the $a$th column of $\mathsf{Sol}(\mathsf{C})$ is given by
\begin{equation}\label{eq: fibsol}
 x_b = \left\{ \begin{array}{cc}
F_{b-a+1} & \text{if $b-a+1\geq 0$} \\
(-1)^{a-b}F_{-b+a-1} & \text{if $b-a+1<0$}
\end{array}\right\}
\end{equation}
where $F_i$ is the $i$th Fibonacci number (indexed so that $F_0=0$ and $F_1=1$).
\end{ex}

This proposition can be extended to a complete characterization of solutions to $\mathsf{C}\mathsf{x}=\mathsf{0}$, and thus an answer to our original problem. Given a $\mathbb{Z}\times \mathbb{Z}$ matrix $\mathsf{A}$, define the \textbf{image} of $\mathsf{A}$ to be the set of all sequences $\mathsf{v}\in \mathsf{k}^\mathbb{Z}$ equal to $\mathsf{Aw}$ for some $\mathsf{w\in\mathsf{k}^\mathbb{Z}}$.\footnote{This is the usual definition of `image', with the explicit caveat that $\mathsf{Aw}$ may not exist for all $\mathsf{w}$.}

\begin{prethm}{\ref{thm: sol}}
If $\mathsf{C}$ is reduced, the kernel of $\mathsf{C}$ equals the image of $\mathsf{Sol}(\mathsf{C})$.
\end{prethm}

\begin{ex}
Any solution to the Fibonacci linear recurrence can be written as a linear combination of the solutions of the form \eqref{eq: fibsol}.\footnote{In fact, it suffices to only use two adjacent columns of the solution matrix here; see Example \ref{ex: fibbasis}.}
\end{ex}

\begin{rem}
If $\mathsf{C}$ is not reduced, the adjugate $\mathsf{Adj}(\mathsf{C} \mathsf{P})$ may not be defined, and so $\mathsf{Sol}(\mathsf{C})$ may not be constructed.
\end{rem}

\subsection{Balls and juggling}\label{section: balls}

We now connect the shape of a reduced recurrence matrix to the geometry of its kernel.

Fix a reduced recurrence matrix $\mathsf{C}$ of shape $S$ for the remainder of the section.
An \textbf{$S$-ball} is an equivalence class of integers under the equivalence relation $a\sim S(a)$, which does not contain a single element.
The significance of this notion is the following.

\begin{prethm}{\ref{thm: balls}}
The dimension of $\mathrm{ker}(\mathsf{C})$ is equal to the number of $S$-balls.
\end{prethm}

\begin{ex}
For the Fibonacci recurrence matrix, the shape $S$ is given by $S(a)=a-2$. There are two $S$-balls: the set of even numbers, and the set of odd numbers; and the space of solutions to the Fibonacci recurrence is two dimensional (see Example \ref{ex: fibbasis}).
\end{ex}

\begin{ex}
The recurrence matrix in Example \ref{ex: pivots} has two $S$-balls:
\[ \{ ...,-6,-4,-2\} \text{ and } \{ ...,-5,-3,-1,1,2,3,...\} \]
Since $S(0)=0$, the singleton set $\{0\}$ is also an equivalence class, but it is not an $S$-ball.
\end{ex}

\begin{rem}
As a non-increasing injection from $\mathbb{Z}\rightarrow \mathbb{Z}$, the shape $S$ can be thought of as a \emph{juggling pattern}: instructions for how a juggler catches and throws balls over time. At each moment $a$, the juggler catches the ball they threw at moment $S(a)$ and immediately throws it again...unless $S(a)=a$, in which case they neither catch nor throw a ball.\footnote{At any moment $a$ which is not in the image of $S$, the juggler throws the ball so high it never returns. The ability to throw at escape velocity is a small stretch of the imagination for a juggler who is also immortal.}

Each $S$-ball lists those moments when a given ball is caught and thrown, and so the number of $S$-balls equals the number of physical balls the juggler needs for the pattern.
\end{rem}

\begin{rem}\label{rem: balljugs}
The $S$-balls of $\mathsf{C}$ can be visualized as follows. Circle each pivot entry and each entry on the main diagonal, and connect pairs of circles in the same column or in the same row. Excluding any unconnected circles, the connected components of the resulting graph are the $S$-balls. There are four $S$-balls below, each drawn in a different color.
\[\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-9.5,-2.7) rectangle (6.3,0.3);
	\matrix[matrix of math nodes,
		matrix anchor = M-2-24.center,
		nodes in empty cells,
		inner sep=0pt,
		gthrow/.style={dark green,draw,circle,inner sep=0mm,minimum size=5mm},
		rthrow/.style={dark red,draw,circle,inner sep=0mm,minimum size=5mm},
		bthrow/.style={dark blue,draw,circle,inner sep=0mm,minimum size=5mm},
		pthrow/.style={dark purple,draw,circle,inner sep=0mm,minimum size=5mm},
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={0.4cm,between origins},
		row sep={0.4cm,between origins},
	] (M) at (0,0) {
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \& |[gthrow]| 1 \&  \& |[rthrow]| 1 \&  \& |[bthrow]| 1 \&  \& |[bthrow]| 1 \&  \& |[pthrow]| 1 \&  \& |[gthrow]| 1 \&  \& |[rthrow]| 1 \&  \& |[bthrow]| 1 \&  \& |[gthrow]| 1 \&  \& |[pthrow]| 1 \&  \& |[bthrow]| 1 \&  \& |[bthrow]| 1 \&  \& |[rthrow]| 1 \&  \& |[gthrow]| 1 \&  \& |[pthrow]| 1 \&  \& |[bthrow]| 1 \&  \& |[gthrow]| 1 \&  \& |[rthrow]| 1 \&  \& |[bthrow]| 1 \&  \\
\cdots \&  \& 5 \&  \& 1 \&  \& |[bthrow]| 1 \&  \& 3 \&  \& 2 \&  \& 1 \&  \& 5 \&  \& 1 \&  \& 5 \&  \& 1 \&  \& |[bthrow]| 1 \&  \& 3 \&  \& 2 \&  \& 1 \&  \& 5 \&  \& 1 \&  \& 5 \&  \& 1 \&  \& \cdots \\
 \& 3 \&  \& 2 \&  \&  \&  \&  \&  \& 5 \&  \& 1 \&  \& 3 \&  \& 2 \&  \& 3 \&  \& 2 \&  \&  \&  \&  \&  \& 5 \&  \& 1 \&  \& 3 \&  \& 2 \&  \& 3 \&  \& 2 \&  \&  \&  \\
\cdots \&  \& |[bthrow]| 1 \&  \&  \&  \& -2 \&  \&  \&  \& 2 \&  \& 1 \&  \& |[gthrow]| 1 \&  \& 1 \&  \& |[bthrow]| 1 \&  \&  \&  \& -2 \&  \&  \&  \& 2 \&  \& 1 \&  \& |[gthrow]| 1 \&  \& 1 \&  \& |[bthrow]| 1 \&  \&  \&  \& \cdots \\
 \&  \&  \&  \&  \& -1 \&  \& -3 \&  \&  \&  \& |[bthrow]| 1 \&  \&  \&  \&  \&  \&  \&  \&  \&  \& -1 \&  \& -3 \&  \&  \&  \& |[bthrow]| 1 \&  \&  \&  \&  \&  \&  \&  \&  \&  \& -1 \&  \\
 \&  \&  \&  \&  \&  \& |[gthrow]| -1 \&  \& |[rthrow]| -1 \&  \&  \&  \&  \&  \& |[pthrow]| -1 \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]| -1 \&  \& |[pthrow]| -1 \&  \&  \&  \&  \&  \& |[rthrow]| -1 \&  \&  \&  \&  \&  \&  \&  \& \cdots \\
 \&  \&  \& |[pthrow]| 1 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[rthrow]| 1 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[pthrow]| 1 \&  \&  \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \\
	};

	\draw[dark green] (M-3-1) to (M-2-2) to (M-7-7) to (M-2-12) to (M-5-15) to (M-2-18) to (M-7-23) to (M-2-28) to (M-5-31) to (M-2-34) to (M-7-39);
	\draw[dark red] (M-5-1) to (M-2-4) to (M-7-9) to (M-2-14) to (M-8-20) to (M-2-26) to (M-7-31) to (M-2-36) to (M-5-39);
	\draw[dark blue] (M-3-1) to (M-5-3) to (M-2-6) to (M-3-7) to (M-2-8) to (M-6-12) to (M-2-16) to (M-5-19) to (M-2-22) to (M-3-23) to (M-2-24) to (M-6-28) to (M-2-32) to (M-5-35) to (M-2-38) to (M-3-39);
	\draw[dark purple] (M-5-1) to (M-8-4) to (M-2-10) to (M-7-15) to (M-2-20) to (M-7-25) to (M-2-30) to (M-8-36) to (M-5-39);
\end{tikzpicture}\]
Note that reducedness implies that non-zero entries of $\mathsf{C}$ only occur in circles and where two lines cross (See Remark \ref{rem: soljugs} for a contrasting property of the solution matrix $\mathsf{Sol}(\mathsf{C})$).

The connection to juggling is justified by considering the transpose of the above picture.
\[\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-9.5,2.7) rectangle (6.3,-0.3);
	\matrix[matrix of math nodes,
		matrix anchor = M-2-24.center,
		nodes in empty cells,
		inner sep=0pt,
		gthrow/.style={dark green,draw,circle,inner sep=0mm,minimum size=5mm},
		rthrow/.style={dark red,draw,circle,inner sep=0mm,minimum size=5mm},
		bthrow/.style={dark blue,draw,circle,inner sep=0mm,minimum size=5mm},
		pthrow/.style={dark purple,draw,circle,inner sep=0mm,minimum size=5mm},
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={0.4cm,between origins},
		row sep={-0.4cm,between origins},
	] (M) at (0,0) {
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \& |[gthrow]|  \&  \& |[rthrow]|  \&  \& |[bthrow]|  \&  \& |[bthrow]|  \&  \& |[pthrow]|  \&  \& |[gthrow]|  \&  \& |[rthrow]|  \&  \& |[bthrow]|  \&  \& |[gthrow]|  \&  \& |[pthrow]|  \&  \& |[bthrow]|  \&  \& |[bthrow]|  \&  \& |[rthrow]|  \&  \& |[gthrow]|  \&  \& |[pthrow]|  \&  \& |[bthrow]|  \&  \& |[gthrow]|  \&  \& |[rthrow]|  \&  \& |[bthrow]|  \&  \\
\cdots \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
\cdots \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \& |[rthrow]|  \&  \&  \&  \&  \&  \& |[pthrow]|  \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \& |[pthrow]|  \&  \&  \&  \&  \&  \& |[rthrow]|  \&  \&  \&  \&  \&  \&  \&  \& \cdots \\
 \&  \&  \& |[pthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[rthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[pthrow]|  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \\
	};

	\draw[dark green] (M-3-1) to (M-2-2) to (M-7-7) to (M-2-12) to (M-5-15) to (M-2-18) to (M-7-23) to (M-2-28) to (M-5-31) to (M-2-34) to (M-7-39);
	\draw[dark red] (M-5-1) to (M-2-4) to (M-7-9) to (M-2-14) to (M-8-20) to (M-2-26) to (M-7-31) to (M-2-36) to (M-5-39);
	\draw[dark blue] (M-3-1) to (M-5-3) to (M-2-6) to (M-3-7) to (M-2-8) to (M-6-12) to (M-2-16) to (M-5-19) to (M-2-22) to (M-3-23) to (M-2-24) to (M-6-28) to (M-2-32) to (M-5-35) to (M-2-38) to (M-3-39);
	\draw[dark purple] (M-5-1) to (M-8-4) to (M-2-10) to (M-7-15) to (M-2-20) to (M-7-25) to (M-2-30) to (M-8-36) to (M-5-39);
\end{tikzpicture}\]
This can be viewed as an idealized plot of the height of the `balls' over time.
\end{rem}

Balls and juggling patterns can also be used to parametrize the space of solutions to a linear recurrence.
Given a shape $S$ and an integer $b$, let $T_b$ consist of the largest element in each $S$-ball less than or equal to $b$; that is,
\[ T_b := \{a \text{ such that $a\leq b$ but there is no $c\leq b$ with $S(c)=a$} \} \]
\begin{rem}
In juggling terms, the set $T_b$ considers the balls in the air just after moment $b$ and records when each ball was thrown.
\end{rem}

\begin{prethm}{\ref{thm: solextend}}
Restricting to the entries indexed by $T_b$ gives an isomorphism $\mathrm{ker}(\mathsf{C})\rightarrow \mathsf{k}^{T_b}$.
\end{prethm}

\noindent That is, any choice of values for the variables $x_a$ for all $a\in T_a$ can be uniquely extended to a solution to $\mathsf{C}\mathsf{x=0}$.

We may also use $T_b$ to parametrize the space of solutions.
Let $\mathsf{Sol}(\mathsf{C})_{\mathbb{Z},T_b}$ denote the $\mathbb{Z}\times T_b$-matrix consisting of the columns of $\mathsf{Sol}(\mathsf{C})$ indexed by $T_b$.

\begin{prethm}{\ref{thm: solbasis}}
Multiplication by $\mathsf{Sol}(\mathsf{C})_{\mathbb{Z}\times T_b}$ gives an isomorphism $\mathsf{k}^{T_b}\rightarrow \mathrm{ker}(\mathsf{C})$.
\end{prethm}

\noindent Equivalently, every solution to $\mathsf{C}\mathsf{x=0}$ can be written uniquely as a (possibly infinite) linear combination of the columns of $\mathsf{Sol}(\mathsf{C})$ indexed by $T_b$, and all such linear combinations exist (i.e. no infinite non-zero sums).\footnote{In the literature on linear recurrences (e.g. \cite{Bat27}), this is called a \emph{a fundamental system of solutions}.} When $T_b$ is finite, this is merely the definition of a basis.

\begin{coro}
If $\dim(\mathrm{ker}(\mathsf{C}))\!<\!\infty$, the columns of $\mathsf{Sol}(\mathsf{C})$ indexed by $T_b$ are a basis for $\mathrm{ker}(\mathsf{C})$.
\end{coro}

\begin{ex}\label{ex: fibbasis}
Let us consider the Fibonacci recurrence matrix $\mathsf{C}$ once more. The two $S$-balls are the sets of even and odd numbers, and so an $S$-schedule is a pair of consecutive integers. Theorems \ref{thm: solextend} and \ref{thm: solbasis} state that
\begin{enumerate}
	\item any pair of adjacent columns of $\mathsf{Sol}(\mathsf{C})$ form a basis of $\mathrm{ker}(\mathsf{C})$, and
	\item any pair of values $x_{a-1},x_a\in \mathsf{k}$ may be extended uniquely to an element of $\mathrm{ker}(\mathsf{C})$.\qedhere
\end{enumerate}
\end{ex}

\begin{rem}
Definition \ref{defn: schedule} generalizes $T_b$ to a broader class of sets, called \emph{schedules}, for which analogs of Theorems \ref{thm: solextend} and \ref{thm: solbasis} hold.
\end{rem}

\begin{warn}
{\marginnote{\dbend}[.05cm]}
The isomorphisms in Theorems \ref{thm: solextend} and \ref{thm: solbasis} are \bad{not mutually inverse}.
\end{warn}

\section{Generalizations and connections}

We consider a few variations of this problem and applications of these ideas.

\subsection{Affine recurrences} \label{section: affine}

Let us briefly consider the affine case.
An \textbf{affine recurrence} is a system of equations
in the sequence of variables $...,x_{-1},x_0,x_1,x_2,...$ which equates each variable to an affine combination of the previous variables (i.e. a degree $1$ polynomial). For example, we could add a constant terms $b_i\in \mathsf{k}$ to each equation in the Fibonacci recurrence:
\begin{equation}
\label{eq: afffib}
x_i = x_{i-1}+x_{i-2}+b_i,\;\;\; \forall i\in \mathbb{Z}
\end{equation}
As before, we may move the variables to the left and factor the coefficients into a matrix $\mathsf{C}$:
\[ \mathsf{C}\mathsf{x} = \mathsf{b}\]
Here, $\mathsf{C}$ is a recurrence matrix, and $\mathsf{b}$ collects the constant terms from each equation.

If $\mathsf{C}$ is reduced, define $\mathsf{P}$ as in Section \ref{section: sol}, and define the \textbf{splitting matrix} $\mathsf{Spl}(\mathsf{C})$ of $\mathsf{C}$ by
\[ \mathsf{Spl}(\mathsf{C})_{a,b}:= \left\{ \begin{array}{cc}
\mathsf{Adj}(\mathsf{C})_{a,b} & \text{if }b\geq 0\\
(\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P}))_{a,b} & \text{if }b<0
\end{array}\right\} \]
The right half of this matrix is lower unitriangular, and the left half of this matrix is upper triangular, resulting in non-zero entries concentrated into two antipodal wedges.
\begin{ex}
The splitting matrix for the Fibonacci recurrence matrix is below.
\[\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\node[right, dark blue] at (3,-1.5) {\scriptsize Entries from $\mathsf{Adj}(\mathsf{C})$};
	\node[left, dark red] at (-3,1.2) {\scriptsize Entries from $\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P})$};
	\clip[use as bounding box] (-2.925,-2.925) rectangle (2.925,2.325);
	\matrix[matrix of math nodes,
		matrix anchor = M-10-10.center,
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={0.3cm,between origins},
		row sep={0.3cm,between origins},
	] (M) at (0,0) {
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
\cdots \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \& -5 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
\cdots \&  \& 3 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \& -2 \&  \& -2 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
\cdots \&  \& 1 \&  \& 1 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \& -1 \&  \& -1 \&  \& -1 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \& 1 \&  \& 1 \&  \& 1 \&  \& 1 \&  \& 1 \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 1 \&  \& 1 \&  \& 1 \&  \& 1 \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 2 \&  \& 2 \&  \& 2 \&  \& 2 \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 3 \&  \& 3 \&  \& 3 \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 5 \&  \& 5 \&  \& 5 \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 8 \&  \& 8 \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 13 \&  \& 13 \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 21 \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& 34 \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \cdots \\
	};

	\draw[dark blue,rounded corners,fill=dark blue, opacity=.1] (M-19-19)+(.2,-.5) to ($(M-10-10)+(-.3,0)$) to ($(M-10-10)+(-.2,.2)$) to ($(M-10-19)+(.2,.2)$);
	\draw[dark red,rounded corners,fill=dark red, opacity=.1] (M-3-1)+(-.2,.5) to ($(M-10-8)+(.3,0)$) to ($(M-10-8)+(.2,-.2)$) to ($(M-10-1)+(-.2,-.2)$);

\end{tikzpicture}\]
The lower/upper triangular conditions imply the non-zero entries coming from $\mathsf{Adj}(\mathsf{C})$ and $\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P})$ must be contained in the blue and red cones, respectively.
\end{ex}

\begin{prop}\label{prop: split}
Let $\mathsf{C}$ be a reduced recurrence matrix.
\begin{enumerate}
	\item $\mathsf{Spl}(\mathsf{C})$ is horizontally bounded.
	\item $\mathsf{C}\mathsf{Spl}(\mathsf{C})=\mathsf{Id}$; that is, $\mathsf{Spl}(\mathsf{C})$ is a right inverse to $\mathsf{C}$.
	\item For all $\mathsf{b}\in \mathsf{k}^\mathbb{Z}$,  the product $\mathsf{x}=\mathsf{Spl}(\mathsf{C})\mathsf{b}$ exists and is a solution to $\mathsf{C}\mathsf{x}=\mathsf{b}$.
\end{enumerate}
\end{prop}
\noindent In particular, $\mathsf{C}\mathsf{x}=\mathsf{b}$ has a solution for all $\mathsf{b}$.

\begin{proof}
(1) If $a\geq 0$, then the $a$th row of $\mathsf{Spl}(\mathsf{C})$ is zero outside the interval $[0,a]$. If $a<0$, then the $a$th row of $\mathsf{Spl}(\mathsf{C})$ is zero outside $[a,0]$.\footnote{This bound can be sharpened, though we won't need a sharp bound. When $a<0$, the $a$th row of $\mathsf{Spl}(\mathsf{C})$ is zero outside the interval $[b,0]$ when $S(b)=a$, and the row is entirely zero if there is no such $b$.} Thus, $\mathsf{Spl}(\mathsf{C})$ is horizontally bounded.

\noindent (2) If $a\geq 0$, then the $a$th column of $\mathsf{C}\mathsf{Spl}(\mathsf{C})$ equals the $a$th column of $\mathsf{C}\mathsf{Adj}(\mathsf{C})=\mathsf{Id}$. If $a<0$, then the $a$th column of $\mathsf{C}\mathsf{Spl}(\mathsf{C})$ equals the $a$th column of $\mathsf{C}(\mathsf{P}(\mathsf{Adj}(\mathsf{C}\mathsf{P})))=\mathsf{Id}$. Therefore, $\mathsf{C}\mathsf{Spl}(\mathsf{C})=\mathsf{Id}$.

\noindent (3) Since $\mathsf{C}$ and $\mathsf{Spl}(\mathsf{C})$ are horizontally bounded, $\mathsf{C} (\mathsf{Spl}(\mathsf{C})\mathsf{b}) = (\mathsf{C}\mathsf{Spl}(\mathsf{C}) ) \mathsf{b} = \mathsf{Idb}= \mathsf{b} $.
\end{proof}

\begin{rem}
The existence of solutions to every affine recurrence is equivalent saying that,
for any recurrence matrix $\mathsf{C}$, the associated multiplication map $\mathsf{k}^\mathbb{Z}\rightarrow \mathsf{k}^\mathbb{Z}$ is surjective.
\end{rem}

Given a solution to $\mathsf{C}\mathsf{x}=\mathsf{b}$, all other solutions are obtained by adding solutions to $\mathsf{C}\mathsf{x}=\mathsf{0}$.

\begin{prop}
If $\mathsf{C}$ is reduced, the solutions to $\mathsf{C}\mathsf{x} = \mathsf{b}$ consist of sequences of the form
\[ \mathsf{Spl}(\mathsf{C}) \mathsf{b} + \mathsf{Sol}(\mathsf{C}) \mathsf{v}, \]
running over all $\mathsf{v}\in \mathsf{k}^\mathbb{Z}$ such that the product $\mathsf{Sol}(\mathsf{C}) \mathsf{v}$ exists.
\end{prop}
\begin{proof}
This follows immediately from Proposition \ref{prop: split} and Theorem \ref{thm: sol}.
\end{proof}

\begin{rem}\label{rem: threeinverses}
We have now constructed three right inverses to a reduced recurrence matrix $\mathsf{C}$, each possessing an additional property: $\mathsf{Adj}(\mathsf{C})$ is lower unitriangular, $\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P})$ is upper unitriangular, and $\mathsf{Spl}(\mathsf{C})$ is horizontally bounded. If $\mathsf{C}\neq \mathsf{Id}$, these are all distinct.
\end{rem}

\subsection{Linear recurrences indexed by $\mathbb{N}$}

Variations of `linear recurrences' have been studied for centuries. Most often, one considers a system with variables indexed by $\mathbb{N}$ (rather than $\mathbb{Z}$) and relations defining each variable except at finitely many `initial variables'.  For example, the \text{one-sided Fibonacci recurrence} has initial variables $x_0$ and $x_1$ and equations
	\begin{equation*}
	x_i = x_{i-1}+x_{i-2},\;\;\; \forall i\geq 2
	\end{equation*}

The study of $\mathbb{N}$-indexed linear recurrences differs fundamentally from $\mathbb{Z}$-indexed linear recurrences.
Solutions to an $\mathbb{N}$-indexed system are determined by the values of the initial variables, which trivializes the kinds of questions we have considered (e.g. existence and parametrization of solutions).
Rather, most work in the $\mathbb{N}$-indexed context has focused on finding simple formulas for the terms in a solution.
We review a few of these approaches.
\begin{itemize}
	\item When the equations in a linear recurrence are the same (a `{constant}' linear recurrence), shifting the indices of a sequence
	\[ x_0,x_1,x_2,... \longmapsto x_1,x_2,x_3,... \]
	defines a linear transformation from the space of solutions to itself. Standard tools from linear algebra (e.g. the characteristic polynomial) can then construct a basis of eigenvectors or generalized eigenvectors for the space of solutions.
	Since the eigenvectors are geometric sequences, an eigenbasis expresses any solution as a linear combination of geometric sequences.
	This is covered in textbooks like \cite{GK94}.
	\item A sequence $x_0, x_1, x_2,...$ can be translated into formal series in several ways, such as
	\[ F_\mathsf{x}(t) := x_0 + x_1 t + x_2 t^2 + x_3t^3 + \cdots  \]
	Some linear recurrences (such as constant ones) translate into functional equations involving these \emph{generating functions}.
	Clever manipulation of these equations can then yield simple formulas for solutions. This is covered in textbooks like \cite{Wil06}.
	\item The asymptotics of solutions, that is, the behavior of $x_i$ for sufficiently large $i$, can be studied analytically. Poincare \cite{Poi85} and others\footnote{A curiosity: \cite{Car11} is the dissertation of Robert Carmichael, of \emph{Carmichael numbers} in number theory.} \cite{Car11,Bir11} construct integrals which coincide with the generating function $F_\mathsf{x}(t)$ in an `infinitesmal neighborhood of infinity'. See \cite[Section I.6]{Bat27} for further details.
\end{itemize}

The techniques of the current work can be adapted to this setting.
We first add equations fixing the initial values and rewrite the system as a matrix equation $\mathsf{C}\mathsf{x}=\mathsf{b}$. For example, the (one-sided) Fibonacci recurrence with initial values $x_0=a$ and $x_1=b$ is rewritten a
\[ \begin{bmatrix}
		1 & 0 & 0 & 0  & \\
		 0 & 1 & 0 & 0 & \\
		-1 & -1 & 1 & 0 & \\
		0 & -1 & -1 & 1 & \\
		 & & & & \rotatebox{-45}{$\cdots$} \\
\end{bmatrix}
\begin{bmatrix}
x_0 \\ x_1 \\ x_2 \\ x_3 \\ \vdots
\end{bmatrix}
=\begin{bmatrix}
a \\ b \\ 0 \\ 0 \\ \vdots
\end{bmatrix}\]
The recurrence matrix $\mathsf{C}$ is $\mathbb{N}\times\mathbb{N}$, lower unitriangular, and horizontally bounded. The adjugate $\mathsf{Adj}(\mathsf{C})$ is defined as before, and the identity $\mathsf{Adj}(\mathsf{C})\mathsf{C}=\mathsf{C}\mathsf{Adj}(\mathsf{C})=\mathsf{Id}$ still holds.

However, there is a crucial difference. In the $\mathbb{N}\times\mathbb{N}$ case, the adjugate matrix $\mathsf{Adj}(\mathsf{C})$ is horizontally bounded, and so $\mathsf{Adj}(\mathsf{C}) (\mathsf{C}\mathsf{x}) = (\mathsf{Adj}(\mathsf{C}) \mathsf{C}) \mathsf{x}$ for all $\mathbb{Z}$-vectors $\mathsf{x}$. If $\mathsf{C}\mathsf{x=b}$, then
\[ \mathsf{Adj}(\mathsf{C}) \mathsf{b} = \mathsf{Adj}(\mathsf{C}) (\mathsf{C}\mathsf{x})= (\mathsf{Adj}(\mathsf{C}) \mathsf{C}) \mathsf{x} =\mathsf{x}\]
Consequently, the unique solution to $\mathsf{C}\mathsf{x=b}$ can be computed as a linear combination of the columns of $\mathsf{Adj}(\mathsf{C})$ indexed by the initial variables. We can restate this as follows.

\begin{prop}\label{prop: Nsol}
If $x_i$ is an initial variable in an $\mathbb{N}$-indexed linear recurrence with recurrence matrix $\mathsf{C}$, then the $i$th column of $\mathsf{Adj}(\mathsf{C})$ is the solution for which $x_i=1$ and all other initial variables are $0$. Columns of this form are a basis for the space of all solutions.
\end{prop}

\begin{rem}
While Proposition \ref{prop: Nsol} gives a basis of solutions, it is unclear how useful this is in general. Computationally,
the entries of $\mathsf{Adj}(\mathsf{C})$ are determinant of submatrices of $\mathsf{C}$, which are (naively) no simpler than recursively computing $x_0,x_1,....,x_j$ directly.
\end{rem}

\subsection{Friezes}\label{section: frieze}

The author's original motivation for the work in this paper is a connection and forthcoming application to the following curious objects.
A \textbf{tame $SL(k)$-frieze} consists of finitely many rows of integers (offset in a diamond pattern) such that:
\begin{itemize}
	\item the top and bottom rows consist entirely of $1$s,
	\item every $k\times k$ diamond has determinant $1$, and
	\item every $(k+1)\times (k+1)$ diamond has determinant $0$.
\end{itemize}

\begin{ex}
An example of an $SL(2)$-frieze
is given below.
\[
\begin{tikzpicture}[baseline=(current bounding box.south),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-1-8.center,
		origin/.style={},
		throw/.style={},
		pivot/.style={draw,circle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\scriptsize},
		column sep={.35cm,between origins},
		row sep={.35cm,between origins},
	] (M) at (0,0) {
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \&  \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	\cdots \& \& 3 \& \& 2 \& \& 2 \& \& 1 \& \& 4 \& \& 3 \& \& 1 \& \& 2 \& \& 3 \& \& 2 \& \& 2 \& \& 1 \& \& 4 \& \& 3 \& \& 1 \& \& 2 \& \& 3 \&  \\
	 \& 5 \& \& 5 \& \& 3 \& \& 1 \& \& 3 \& \& 11 \& \& 2 \& \& 1 \& \& 5 \& \& 5 \& \& 3 \& \& 1 \& \& 3 \& \& 11 \& \& 2 \& \& 1 \& \& 5 \& \& \cdots \\
	\cdots \& \& 8 \& \& 7 \& \& 1 \& \& 2 \& \& 8 \& \& 7 \& \& 1 \& \& 2 \& \& 8 \& \& 7 \& \& 1 \& \& 2 \& \& 8 \& \& 7 \& \& 1 \& \& 2 \& \& 8 \&  \\
	 \& 3 \& \& 11 \& \& 2 \& \& 1 \& \& 5 \& \& 5 \& \& 3\& \& 1 \& \& 3 \& \& 11 \& \& 2 \& \& 1 \& \& 5 \& \& 5 \& \& 3\& \& 1 \& \& 3 \& \& \cdots \\
	\cdots \& \& 4 \& \& 3 \& \& 1 \& \& 2 \& \& 3 \& \& 2 \& \& 2 \& \& 1 \& \& 4 \& \& 3 \& \& 1 \& \& 2 \& \& 3 \& \& 2 \& \& 2 \& \& 1 \& \& 4 \&  \\
	 \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& 1 \& \& \cdots \\
	};
\end{tikzpicture}\qedhere \]
\end{ex}

The study of friezes was initiated in \cite{Cox71,CC73a,CC73b} for $k=2$, and generalized to arbitrary $k$ in \cite{CR72,BR10}.
Friezes enjoy many remarkable properties; for example, the rows of a tame $SL(k)$-frieze must be periodic. An excellent overview is given in \cite{MG15}.

A frieze may be converted into a recurrence matrix, by rotating $45^\circ$ clockwise and using the top row as the main diagonal.\footnote{\cite{MGOST14} and others also use an alternating sign when translating a frieze into a linear recurrence.}
Remarkably, the solutions have a periodicity condition.
\begin{thm}\label{thm: frieze}\cite{MGOST14}
If $\mathsf{C}$ is the recurrence matrix associated to a tame $SL(k)$-frieze, then every solution to $\mathsf{C}\mathsf{x=0}$ is \emph{superperiodic}: $x_{i+n}=(-1)^sx_i$ for some $n$ and $s$ and all $i$.
\end{thm}

\noindent In fact, \cite{MGOST14} proves a stronger result.
For each frieze $\mathsf{C}$, they construct a \emph{Gale dual} frieze $\mathsf{C}^\dagger$ whose diagonals encode distinguished solutions to $\mathsf{C}\mathsf{x=0}$.

In a sequel \cite{DM19} to the current work, we will extend Theorem \ref{thm: frieze} to an equivalence. Specifically, if $\mathsf{C}$ is a reduced recurrence matrix of shape $S$, then the following are equivalent.
\begin{itemize}
	\item $\mathsf{C}$ satisfies a family of determinantal identities generalizing the tame frieze conditions.
	\item Every solution to $\mathsf{C}\mathsf{x=0}$ is \emph{$n$-quasiperiodic}; that is, $x_{i+n}=\lambda x_i$ for some $\lambda$ and all $i$.
	\item The \emph{Gale dual} $\mathsf{C}^\dagger$, a truncation of $\mathsf{Sol}(\mathsf{C})$, has shape $S^\dagger$, where $S^\dagger(i):=S^{-1}(i)+n$.
\end{itemize}
\begin{rem}
The space of such linear recurrences (of fixed shape $S$) is the \emph{cluster $\mathcal{X}$-variety} dual to the \emph{positroid variety} corresponding to $S$; this will be explained in \cite{DM19}.
\end{rem}

\newpage

{\centering\it
The rest of this note proves the promised results.
\\}

\section{Kernel containment and factorization}

In this section, we prove a useful equivalence between containments of kernels and factorizations in the semigroup of recurrence matrices.

\begin{nota}
Let $\mathsf{k}^\mathbb{Z}_b\subset \mathsf{k}^\mathbb{Z}$ denote the subspace of \textbf{bounded sequences} (i.e. non-zero in finitely many terms). If $\mathsf{v}\in \mathsf{k}^\mathbb{Z}_b$ and $\mathsf{w}\in \mathsf{k}^\mathbb{Z}$, then the dot product $\mathsf{v}\cdot \mathsf{w}$ is well-defined.
\end{nota}

\begin{lemma}\label{lemma: lincomb}
Let $\mathsf{C}$ be a recurrence matrix and let $\mathsf{v}\in \mathsf{k}^\mathbb{Z}_b$. If $\mathsf{v}\cdot \mathsf{w}=0$ for all $\mathsf{w}\in \mathrm{ker}(\mathsf{C})$, then $\mathsf{v}$ is in the span of the rows of $\mathsf{C}$.
\end{lemma}
\begin{proof}
Let $V\subset \mathsf{k}^\mathbb{Z}_b$ denote the span of the rows of $\mathsf{C}$, and assume for contradiction that $\mathsf{v}\not\in V$. We may therefore choose a linear map $f:\mathsf{k}^\mathbb{Z}_b\rightarrow \mathsf{k}$ such that $f(V)=0$ and $f(\mathsf{v})=1$.\footnote{The existence of such a map may depend on the Axiom of Choice, which we therefore assume.}

Let $\mathsf{e}_a\in \mathsf{k}^\mathbb{Z}_b$ denote the standard basis vector which is $1$ in the $a$th term and $0$ everywhere else, and set
$\mathsf{w}:= ( f(\mathsf{e}_a)) _{a\in \mathbb{Z}}\in \mathsf{k}^\mathbb{Z}$. By linearity, $f(\mathsf{u})=\mathsf{u}\cdot \mathsf{w}$ for all $\mathsf{u}\in\mathsf{k}^\mathbb{Z}_b$. Since $f$ kills each row of $\mathsf{C}$, $\mathsf{C}\mathsf{w}=0$ and so $\mathsf{w}\in \mathrm{ker}(\mathsf{C})$. However, $\mathsf{v}\cdot \mathsf{w}=1$, contradicting the hypothesis.
\end{proof}

\begin{lemma}\label{lemma: containment}
Let $\mathsf{C}$ and $\mathsf{C}'$ be recurrence matrices.
Then the following are equivalent.
\begin{enumerate}
	\item $\mathrm{ker}(\mathsf{C})\subseteq \mathrm{ker}(\mathsf{C}')$.
	\item $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for some horizontally bounded matrix $\mathsf{D}$.
	\item $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for some recurrence matrix $\mathsf{D}$.
	\item $\mathsf{C}'\mathsf{Adj}(\mathsf{C})$ is a recurrence matrix.
\end{enumerate}
Furthermore, the matrix $\mathsf{D}$ in (2) and (3) must equal $\mathsf{C}'\mathsf{Adj}(\mathsf{C})$ and is therefore unique.
\end{lemma}

\begin{proof}
($1\Rightarrow 2$)
If $\mathrm{ker}(\mathsf{C})\subseteq \mathrm{ker}(\mathsf{C}')$, then each row of $\mathsf{C}'$ kills $\mathrm{ker}(\mathsf{C})$. By Lemma \ref{lemma: lincomb}, the $a$th row of $\mathsf{C}'$ is equal to $\mathsf{D}_a\mathsf{C}$ for some bounded sequence $\mathsf{D}_a\in \mathsf{k}^\mathbb{Z}_b$. The vectors $\mathsf{D}_a$ may be combined into the rows of a matrix $\mathsf{D}$ which is horizontally bounded and satisfies $\mathsf{D}\mathsf{C}=\mathsf{C}'$.

($2\Rightarrow 3+4+$Uniqueness)
Assume that  $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for a horizontally bounded $\mathsf{D}$. Then
\begin{equation*}
\mathsf{C}'\mathsf{Adj}(\mathsf{C}) = (\mathsf{D}\mathsf{C})\mathsf{Adj}(\mathsf{C}) \stackrel{*}{=} \mathsf{D}(\mathsf{C}\mathsf{Adj}(\mathsf{C})) = \mathsf{D}
\end{equation*}
Equality ($*$) holds because $\mathsf{D}$ and $\mathsf{C}$ are horizontally bounded. Since $\mathsf{C}'\mathsf{Adj}(\mathsf{C})$ is lower unitriangular and $\mathsf{D}$ is horizontally bounded, they are the same recurrence matrix

($3\Rightarrow 1$)
Assume $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for some recurrence matrix $\mathsf{D}$. If $\mathsf{v}\in \mathrm{ker}(\mathsf{C})$, then
\[ \mathsf{C}'\mathsf{v} = (\mathsf{D}\mathsf{C})\mathsf{v} \stackrel{*}{=} \mathsf{D}(\mathsf{C}\mathsf{v}) = \mathsf{D}\mathsf{0} = \mathsf{0} \]
Equality ($*$) holds because $\mathsf{D}$ and $\mathsf{C}$ are horizontally bounded. Therefore, $\mathrm{ker}(\mathsf{C})\subseteq \mathrm{ker}(\mathsf{C}')$.

($4\Rightarrow 3$)
Setting $\mathsf{D}\coloneqq \mathsf{C}'\mathsf{Adj}(\mathsf{C})$, we check that
\[ \mathsf{D}\mathsf{C} = (\mathsf{C}'\mathsf{Adj}(\mathsf{C}) ) \mathsf{C} \stackrel{*}{=} \mathsf{C}'(\mathsf{Adj}(\mathsf{C})\mathsf{C}) = \mathsf{C}'\]
Equality ($*$) holds because $\mathsf{C}'$, $\mathsf{Adj}(\mathsf{C})$, and $\mathsf{C}$ are lower unitriangular.
\end{proof}

\begin{thm}\label{thm: triv-inv}
A recurrence matrix $\mathsf{C}$ is trivial if and only if $\mathsf{Adj}(\mathsf{C})$ is a recurrence matrix.
\end{thm}
\begin{proof}
The recurrence matrix $\mathsf{C}$ is trivial when $\mathrm{ker}(\mathsf{C})\subseteq \mathrm{ker}(\mathsf{Id})$. Applying Lemma \ref{lemma: containment} with $\mathsf{C}'=\mathsf{Id}$, this holds if and only if $\mathsf{Adj}(\mathsf{C})$ is a recurrence matrix.
\end{proof}

\begin{thm}\label{thm: triv-equiv}
Two recurrence matrices $\mathsf{C}$ and $\mathsf{C}'$ are equivalent if and only if $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for a trivial recurrence matrix $\mathsf{D}$.
\end{thm}
\begin{proof}
Two recurrence matrices $\mathsf{C}$ and $\mathsf{C}'$ are equivalent if and only if $\mathrm{ker}(\mathsf{C})=\mathrm{ker}(\mathsf{C}')$. By Lemma \ref{lemma: containment}, this holds if and only if $\mathsf{D}=\mathsf{C}'\mathsf{Adj}(\mathsf{C})$ and $\mathsf{Adj}(\mathsf{D})=\mathsf{C}\mathsf{Adj}(\mathsf{C}')$ are recurrence matrices. By Theorem \ref{thm: triv-inv}, this is equivalent to $\mathsf{D}$ being a trivial linear recurrence.
\end{proof}

Lemma \ref{lemma: containment} also allows us to make a connection between kernel containment and shapes.

\begin{lemma}\label{lemma: containshape}
Let $\mathsf{C}$ and $\mathsf{C}'$ be recurrence matrices with shape $S$ and $S'$, respectively.
If $\mathrm{ker}(\mathsf{C})\subseteq  \mathrm{ker}(\mathsf{C}')$ and $S$ is injective (e.g. if $\mathsf{C}$ is reduced), then $S(a)\geq S'(a)$ for all $a$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma: containment}, $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for some recurrence matrix $\mathsf{D}$.
Fix $a\in \mathbb{Z}$, and consider $B:=\{ b \in \mathbb{Z} \mid \mathsf{D}_{a,b} \neq 0\}$. This set is bounded and contains $a$. Let $b_{0}$ be the element of $B$ on which $S$ is minimal; this is unique because $S$ is injective.
\[ (\mathsf{D}\mathsf{C})_{a,S(b_{0})} = \sum_{b\in \mathbb{Z}} \mathsf{D}_{a,b} \mathsf{C}_{b,S(b_{0})} = \mathsf{D}_{a,b_{0}}\mathsf{C}_{b_{0},S(b_{0})} \neq0 \]
Therefore, $S'(a)\leq S(b_0)$.\footnote{In fact, this is equality, but we won't need this stronger statement.} Since $a\in B$, $S(b_0)\leq S(a)$, and so $S'(a)\leq S(a)$.
\end{proof}

\begin{prop}\label{prop: reducedequal}
Reduced recurrence matrices that are equivalent must be equal.
\end{prop}
\begin{proof}
Let $\mathsf{C}$ and $\mathsf{C}'$ be reduced and equivalent. Lemma \ref{lemma: containshape} implies that $\mathsf{C}$ and $\mathsf{C}'$ have the same shape; call it $S$. By Lemma \ref{lemma: containment}, $\mathsf{C}'=\mathsf{D}\mathsf{C}$ for some recurrence matrix $\mathsf{D}$.

Let $T$ denote the shape of $\mathsf{D}$, so that $\mathsf{D}_{a,b}=0$ whenever $b<T(a)$.
Since $\mathsf{C}$ is reduced of shape $S$, $\mathsf{C}_{b,S(T(a))}=0$ whenever $b>T(a)$.
Therefore,
\[ \mathsf{C}'_{a,S(T(a))} = \sum_b \mathsf{D}_{a,b} \mathsf{C}_{b,S(T(a))} = \mathsf{D}_{a,T(a)}\mathsf{C}_{T(a),S(T(a))} \neq 0 \]
Since $\mathsf{C}'$ is also reduced of shape $S$, this is only possible if $a= T(a)$.
Since this holds for all $a$, the only non-zero entries of $\mathsf{D}$ are on the main diagonal. Thus, $\mathsf{D}=\mathsf{Id}$ and $\mathsf{C}'=\mathsf{C}$.
\end{proof}

\section{Gauss-Zordan Elimination}
\label{section: GZ}

Because we are working with $\mathbb{Z}\times\mathbb{Z}$-matrices, we must consider infinite sequences of row reductions that may be chosen in an arbitrary order. We furthermore consider \emph{generalized row reductions}: limits of such row reductions (in an appropriate topology).

\subsection{Row reduction}

Given a recurrence matrix $\mathsf{C}$ of shape $S$, a \textbf{row reduction} of $\mathsf{C}$ is a matrix $\mathsf{C}'$ obtained by adding $\mathsf{C}_{a,S(b)} / \mathsf{C}_{b,S(b)}$ times the $b$th row to the $a$th row, for some $b> a$ with $\mathsf{C}_{a,S(b)}\neq0$. By design, the resulting matrix $\mathsf{C}'$ has a zero in the $(a,S(b))$ entry.

\begin{prop}
A recurrence matrix is reduced if and only if it has no row reductions.
\end{prop}

A row reduction of $\mathsf{C}$ can be reformulated as a factorization $\mathsf{C}=\mathsf{D}\mathsf{C}'$ such that $\mathsf{D}$ differs from the identity matrix in a single entry $\mathsf{D}_{a,b}$, and such that $\mathsf{C}_{a,S(b)}\neq 0$ and $\mathsf{C}'_{a,S(b)}=0$. This perspective leads to the following generalization.

A \textbf{generalized row reduction of $\mathsf{C}$} is a recurrence matrix $\mathsf{C}'$ such that $\mathsf{C}=\mathsf{D}\mathsf{C}'$ for a trivial recurrence matrix $\mathsf{D}$ with the property that, for each $a$ such that $\{b <a \mid \mathsf{D}_{a,b}\neq 0\}$ is non-empty, we have
\[ \mathsf{C}_{a,b_a} \neq 0\text{ and } \mathsf{C}'_{a,b_a} = 0 \]
where $b_a:= \min\{S(b) \mid b< a \text{ s.t. }\mathsf{D}_{a,b}\neq 0\}$.
We write $\mathsf{C}\succeq \mathsf{C}'$ to denote that $\mathsf{C}'$ is a generalized row reduction of $\mathsf{C}$.

\begin{rem}\label{rem: leftmost}
The index $b_a$ may be defined as the leftmost entry of the $a$th row that multiplication by $\mathsf{D}$ is `big enough' to change, and so $(\mathsf{D}\mathsf{C})_{a,b}=\mathsf{C}_{a,b}$ whenever $b<b_a$. Thus, if $\mathsf{C}\succeq \mathsf{C}'$, then $\mathsf{C}'$ must vanish in the leftmost entry in which the $a$th rows of $\mathsf{C}$ and $\mathsf{C}'$ differ.
\end{rem}

\begin{prop}
The relation $\succeq$ defines a partial order on the set of recurrence matrices.
\end{prop}

\noindent As a consequence, an iterated sequence of row reductions is a generalized row reduction.

\begin{proof}
(Antisymmetry) Assume $\mathsf{C}\succeq\mathsf{C}'$ and $\mathsf{C}\preceq \mathsf{C}'$. By Remark \ref{rem: leftmost}, both $\mathsf{C}$ and $\mathsf{C}'$ vanish in the leftmost entry in which the $a$th rows of $\mathsf{C}$ and $\mathsf{C}'$ differ. However, two entries cannot both vanish and be different, so the $a$th rows of $\mathsf{C}$ and $\mathsf{C}'$ coincide for all $a$. Thus, $\mathsf{C}=\mathsf{C}'$.

(Transitivity) Let $\mathsf{C}\preceq \mathsf{D}\mathsf{C} \preceq \mathsf{D}'\mathsf{D}\mathsf{C}$, and let $S$ and $S'$ denote the shapes of $\mathsf{C}$ and $\mathsf{D}\mathsf{C}$, respectively. Fix some $a$. If $\{b< a\mid \mathsf{D}_{a,b}\neq 0\}= \varnothing$ or $\{b< a\mid \mathsf{D}'_{a,b}\neq 0\}= \varnothing$, the generalized row reduction condition is easy to check. Assume neither set is empty and let
\begin{align*}
b_0 &:= \min\{S(b) \mid b<a\text{ s.t. }\mathsf{D}_{a,b}\neq0\} \\
b_0' &:= \min\{S'(b) \mid b<a\text{ s.t. }\mathsf{D}'_{a,b}\neq0\}
\end{align*}
By the definition of generalized row reductions,
\[\mathsf{C}_{a,b_0}=0,\;\;\; (\mathsf{D}\mathsf{C})_{a,b_0}\neq0,\;\;\; (\mathsf{D}\mathsf{C})_{a,b_0'}=0 ,\;\;\; (\mathsf{D}'\mathsf{D}\mathsf{C})_{a,b_0'}\neq 0\]
This ensures that $\mathsf{C}_{a,\min(b_0,b_0')}=0$ and $(\mathsf{D}'\mathsf{D}\mathsf{C})_{a,\min(b_0,b_0')}\neq0$. Since these entries differ,
\[ \min\{S(b) \mid b<a\text{ s.t. }(\mathsf{D}'\mathsf{D})_{a,b}\neq0\} \leq \min(b_0,b_0') \]
To show this is equality, consider some $b<a$ such that $(\mathsf{D}'\mathsf{D})_{a,b}\neq0$. We split into cases.
\begin{itemize}
	\item  Assume $\mathsf{D}'_{a,c}\mathsf{D}_{c,b}\neq0$ for some $c<a$. Since $\mathsf{D}_{c,b}\neq0$ and $\mathsf{C}\preceq \mathsf{D}\mathsf{C}$, $S'(c)\leq S(b)$. Since $\mathsf{D}'_{a,c}\neq 0$ and $\mathsf{D}\mathsf{C}\preceq \mathsf{D}'\mathsf{D}\mathsf{C}$, $S'(c)\geq b_0'$. Therefore, $S(b)\geq b'_0$.
	\item Otherwise, $\mathsf{D}'_{a,c}\mathsf{D}_{c,b}=0$ for all $c<a$, and so $(\mathsf{D}'\mathsf{D})_{a,b}= \mathsf{D}'_{a,a}\mathsf{D}_{a,b}=\mathsf{D}_{a,b}$. Since $\mathsf{D}_{a,b}\neq0$ and $\mathsf{C}\preceq \mathsf{D}\mathsf{C}$, we know that $S(b)\geq b_0$.
\end{itemize}
Therefore, $\mathsf{C}_{a,\min(b_0,b_0')}=0$ and $(\mathsf{D}'\mathsf{D}\mathsf{C})_{a,\min(b_0,b_0')}\neq0$ and
\[ \min\{S(b) \mid b<a\text{ s.t. }(\mathsf{D}'\mathsf{D})_{a,b}\neq0\} = \min(b_0,b_0') \]
Since this holds for all $a$, $\mathsf{C}\preceq \mathsf{D}'\mathsf{D}\mathsf{C}$.
\end{proof}

\subsection{Limits}\label{section: limits}

To define limits of generalized row reductions, we endow the set of recurrence matrices with the topology of \textbf{row-wise stabilization}: a sequence of recurrence matrices converges if each row stabilizes after finitely many steps

We next show that sequences of generalized row reductions must stabilize row-wise to another generalized row reduction, via the following more general result.

\begin{lemma}\label{lemma: Zorn}
Let $\mathcal{C}$ be a set of recurrence matrices in which every pair is comparable in the row reduction partial order.\footnote{Sometimes called a `chain' in the literature on partially ordered sets.}
Then the closure of $\mathcal{C}$ in the space of recurrence matrices contains a lower bound of $\mathcal{C}$.
\end{lemma}
\noindent Equivalently, there is a descending sequence of recurrence matrices in $\mathcal{C}$ (i.e. generalized row reductions of the initial matrix in the sequence) which converges (i.e. stabilizes row-wise) to a lower bound of $\mathcal{C}$ (i.e. a generalized row reduction of every matrix in $\mathcal{C}$).

\begin{proof}
Given a recurrence matrix $\mathsf{C}$ and an integer $a$, define
\[ n_a(\mathsf{C}) := \sum_{b \text{ s.t. } \mathsf{C}_{(a,b)}\neq0} (a-b)^2 \]
If $\mathsf{C}\preceq \mathsf{C}'$, then $n_a(\mathsf{C})\leq n_a(\mathsf{C}')$ and equality implies the $a$th rows of $\mathsf{C}$ and $\mathsf{C}'$ coincide.

For each $a$, let $\mathcal{C}_a:= \{ \mathsf{C}\in \mathcal{C} \mid \forall \mathsf{C}'\in\mathcal{C},\;n_a (\mathsf{C}) \leq n_a(\mathsf{C}')\}$; that is, $\mathcal{C}_a$ is the set of matrices in $\mathcal{C}$ which attain the minimum value of $n_a$. This set is non-empty and the $a$th row of each matrix in $\mathcal{C}_a$ is the same, since $n_a$ has the same value and the matrices are comparable.

Consider $a,a'\in\mathbb{Z}$ and assume, for contradiction, that there exist $\mathsf{C}\in \mathcal{C}_a\smallsetminus \mathcal{C}_{a'}$ and $\mathsf{C}' \in\mathcal{C}_{a'}\smallsetminus \mathcal{C}_a$. If $\mathsf{C}'\preceq \mathsf{C}$, then $n_a(\mathsf{C}')\leq n_a(\mathsf{C})$. By the minimality of $n_a(\mathsf{C})$, this is an equality and so $\mathsf{C}'\in \mathcal{C}_a$; a contradiction. By a symmetric argument, $\mathsf{C}\preceq \mathsf{C}'$ forces a contradiction. Therefore, $\mathcal{C}_a\cap \mathcal{C}_{a'}$ is either equal to $\mathcal{C}_a$ or equal to $\mathcal{C}_{a'}$.

Applying this repeatedly, for any $i\in \mathbb{N}$, there is some $a_i\in [-i,i]$ such that
\[ \bigcap_{a\in [-i,i]} \mathcal{C}_a =\mathcal{C}_{a_i} \neq \varnothing \]
Choose a matrix $\mathsf{C}^i$ in $\mathcal{C}_{a_i}$ for each $i$. The $a$th rows in the sequence $\mathsf{C}^1,\mathsf{C}^2,\mathsf{C}^3,...$, stabilize after the $a$th term, and so this sequence converges to the recurrence matrix $\mathsf{C}$ whose $a$th row coincides with the $a$th row in each matrix in $\mathcal{C}_a$.

Let $S$ be the shape of $\mathsf{C}^1$. Define a sequence $\mathsf{D}^1,\mathsf{D}^2,\mathsf{D}^3,...$ of trivial recurrence matrices by $\mathsf{C}^1 = \mathsf{D}^n\mathsf{C}^n$ for all $n$. Since $\mathsf{C}^1\succeq \mathsf{C}^n$, if $\mathsf{D}^n_{a,b}\neq0$, then $S(a)\leq S(b)\leq b$; that is, the $a$th row $\mathsf{D}$ can be non-zero only on the interval $[S(a),a]$.

When $n>|S(a)|$, the $a$th row of the product $\mathsf{D}^n\mathsf{C}^n$ only depends on rows in $\mathsf{C}^n$ that coincide with rows in $\overline{\mathsf{C}}$. Therefore, the $a$th row of $\mathsf{D}^n\overline{\mathsf{C}}$ is equal to $\mathsf{C}^1$. Therefore, the sequence $\mathsf{D}^1,\mathsf{D}^2,\mathsf{D}^3,...$ stabilizes row-wise to a matrix $\overline{\mathsf{D}}$ such that $\overline{\mathsf{D}}\overline{\mathsf{C}}=\mathsf{C}^1$. As $\overline{\mathsf{D}}_{a,b}=\mathsf{D}^n_{a,b}$ for large enough $n$,
this shows that $\mathsf{C}\preceq \mathsf{C}^1$. Since the sequence $\mathsf{C}^\bullet$ could have started at any matrix in $\mathcal{C}$, this shows $\overline{\mathsf{C}}$ is a lower bound for $\mathcal{C}$.
\end{proof}

\begin{thm}\label{thm: reduced1}
Every recurrence matrix is equivalent to a unique reduced recurrence matrix.
\end{thm}
\begin{proof}
Let $\mathcal{C}$ be an equivalence class of recurrence matrices, with the row reduction partial order. Every non-empty chain in $\mathcal{C}$ has a lower bound (by Lemma \ref{lemma: Zorn}). By Zorn's Lemma, $\mathcal{C}$ contains a minimal element $\overline{\mathsf{C}}$.

If $\overline{C}$ was not reduced, then there would be a row operation which would strictly decrease it in the reduction partial order; contradicting minimality. Therefore, $\overline{\mathsf{C}}$ is reduced. By Proposition \ref{prop: reducedequal}, this reduced recurrence matrix is unique.
\end{proof}

This provides a transfinite, non-deterministic analog of Gauss-Jordan elimination, which we humorously dub \emph{Gauss-Zordan elimination} (both for `{Zorn}' and the integers $\mathbb{Z}$). Given a recurrence matrix $\mathsf{C}$, an arbitrary sequence of row reductions will stabilize row-wise to a matrix equivalent to $\mathsf{C}$. While this limit may not be reduced, further arbitrary row reductions generate another convergent sequence. Zorn's Lemma guarantees that some transfinite iteration of this process will eventually converge to the reduced representative of $\mathsf{C}$.

\section{Constructing recurrences from spaces of solutions}
\label{section: rank}

\def\mathsf{R}{\mathsf{R}}

In this section, we consider the inverse problem to the motivating problem of this note: Given a subspace $V\subset \mathsf{k}^\mathbb{Z}$, how can we construct a linear recurrence $\mathsf{C}\mathsf{x}=\mathsf{0}$ whose solutions are $V$?
We give a characterization of when this is possible in Theorem \ref{thm: reduced2}.

\begin{nota}
For any $I\subset \mathbb{Z}$, let $\pi_{I}:\mathsf{k}^\mathbb{Z}\rightarrow \mathsf{k}^{I}$ restrict a sequence to the indices in $I$, and let $\iota_I:\mathsf{k}^I\rightarrow \mathsf{k}^\mathbb{Z}$ extend a sequence by $0$.
Given a subspace $V\subset \mathsf{k}^\mathbb{Z}$, let $V_{I}\coloneqq \pi_{I}(V)\subset \mathsf{k}^{I}$.
\end{nota}

\subsection{Rank matrices}

The \textbf{rank matrix} of a subspace $V\subset \mathsf{k}^\mathbb{Z}$ is the $\mathbb{Z}\times \mathbb{Z}$-matrix with\footnote{The entries below the diagonal are unimportant; we set them to $b-a+1$ to avoid special cases later.}
\[ \mathsf{R}_{a,b}:= \left\{\begin{array}{cc}
\dim_\mathsf{k}(V_{[a,b]}) & \text{if }a\leq b \\
b-a+1 & \text{otherwise}
\end{array} \right\}\]

\begin{ex}
Let $V$ be the space of sequences such that (a) the $-1$st term is $0$, (b) the $-2$nd and $0$th term are equal, and (c) the $0$th, $1$st, and $2$nd terms sum to $0$. The rank matrix is
\[\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-1-8.center,
		origin/.style={},
		throw/.style={},
		defect/.style={dark red,draw,circle,inner sep=0.25mm,minimum size=2mm},
		pivot/.style={draw,circle,inner sep=0.25mm,minimum size=2mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,

		rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	 \& 5 \& \& 5 \& \& 4 \& \& 4 \& \& 4 \& \& 5 \& \& 6 \& \& \cdots \\
	\cdots \& \& 4 \& \& 4 \& \& 3 \& \& 3 \& \& 4 \& \& 5 \& \& 6 \&  \\
	 \& 4 \& \& 3 \& \& 3 \& \& 2 \& \& 3 \& \& 4 \& \& 5 \& \& \cdots \\
	\cdots \& \& 3 \& \& 2 \& \& 2 \& \& 2 \& \& 3 \& \& 4 \& \& 4 \&  \\
	 \& 3 \& \& 2 \& \& |[defect]| 1 \& \& 2 \& \& |[defect]| 2 \& \& 3 \& \& 3 \& \& \cdots \\
	\cdots \& \& 2 \& \& 1 \& \& 1 \& \& 2 \& \& 2 \& \& 2 \& \& 2 \&  \\
	 \& |[throw]| 1 \& \& |[throw]| 1 \& \& |[defect]| 0 \& \& |[origin]| 1 \& \&|[throw]| 1 \& \& |[throw]| 1 \& \& |[throw]| 1 \& \& \cdots \\
	};
\end{tikzpicture}
\]
The subdiagonal entries have been omitted. The \textcolor{dark red}{red circles} are the \emph{defects} (see below).
\end{ex}

\begin{prop}\label{prop: rank}
If $\mathsf{R}$ is the rank matrix of $V$, then the following hold for any $a,b\in \mathbb{Z}$.
\begin{enumerate}
	\item $\mathsf{R}_{a,b}-\mathsf{R}_{a+1,b}$ must be $0$ or $1$.
	\item $\mathsf{R}_{a,b}-\mathsf{R}_{a,b-1}$ must be $0$ or $1$.
	\item $\mathsf{R}_{a,b}-\mathsf{R}_{a+1,b}-\mathsf{R}_{a,b-1}+\mathsf{R}_{a+1,b-1}$ must be $0$ or $-1$.
\end{enumerate}
\end{prop}

\begin{proof}
The projection $V_{[a,b]}\rightarrow V_{[a+1,b]}$ is surjective with at most 1-dimensional kernel.
This proves the first result; the second is proven similarly.

The first result implies that $-1\leq (\mathsf{R}_{a,b}-\mathsf{R}_{a+1,b})-(\mathsf{R}_{a,b-1} - \mathsf{R}_{a+1,b-1}) \leq 1$. The map $V_{[a+1,b]} \oplus V_{[a,b-1]}\rightarrow V_{[a,b]}$ which sends $(\mathsf{v},\mathsf{w})$ to $\mathsf{v+w}$ is a surjection whose kernel is the image of the map $V_{[a+1,b-1]} \rightarrow V_{[a+1,b]} \oplus V_{[a,b-1]}$ which sends $\mathsf{v}$ to $(\mathsf{v},-\mathsf{v})$. Therefore,
\[ \dim(V_{[a,b]}) \leq \dim(V_{[a+1,b]} \oplus V_{[a,b-1]}) - \dim(V_{[a+1,b-1]}) \]
This proves that $\mathsf{R}_{a,b}-\mathsf{R}_{a+1,b}-\mathsf{R}_{a,b-1} + \mathsf{R}_{a+1,b-1} \leq 0$.
\end{proof}

Let us say the pair $(a,b)\in \mathbb{Z}\times\mathbb{Z}$ is a \textbf{defect} of a rank matrix $\mathsf{R}$ if
\[ \mathsf{R}_{a,b} - \mathsf{R}_{a+1,b}-\mathsf{R}_{a,b-1}+\mathsf{R}_{a+1,b-1} =-1 \]
\begin{prop} \label{prop: defect}
The defects of a rank matrix $\mathsf{R}$ have the following properties.
\begin{enumerate}
	\item $\mathsf{R}_{a,b} = (b-a+1) - \#(\text{defects in the box }[a,b]\times [a,b]) $.
	\item Each row and column of a rank matrix can contain at most one defect.
	\item
	If $[a,b]\times \{b\}$ does not contain any defects,
	then $V_{[a,b]}$ contains the vector $(0,0,...,0,1)$.
	\item
	If $\{a\}\times [a,b]$ does not contain any defects,
	then $V_{[a,b]}$ contains the vector $(1,0,...,0,0)$.
\end{enumerate}
\end{prop}
\begin{proof}
Fix $a$ and consider the sequence $(\mathsf{R}_{a,b}-\mathsf{R}_{a+1,b})$ for all $b$. This sequence starts at $1$ for sufficiently negative $b$, switches from $1$ to $0$ whenever $(a,b)$ is a defect, and must remain $0$ once it does (by Proposition \ref{prop: rank}.3). Since there are no defects when $a<b$, this implies that
\[ \mathsf{R}_{a,b}=\mathsf{R}_{a+1,b}+1-\#(\text{defects in the line }\{a\}\times [a,b])\]
In particular, there can be at most one defect in each row, and inductively implies that
\[ \mathsf{R}_{a,b} = (b-a+1) - \#(\text{defects in the box }[a,b]\times [a,b]) \]
If $\{a\}\times [a,b]$ does not contain any defect, then $\mathsf{R}_{a,b}=\mathsf{R}_{a+1,b}+1$ and the map $V_{[a,b]}\rightarrow V_{[a+1,b]}$ has $1$-dimensional kernel. This kernel must be spanned by the vector $(1,0,...,0,0)$.

The remaining results follow by a dual argument on  the sequence $(\mathsf{R}_{a,b}-\mathsf{R}_{a,b-1})$.
 \end{proof}

Given a rank matrix $\mathsf{R}$ and a consecutive subset $I\subset \mathbb{Z}$, an \textbf{$\mathsf{R}$-schedule for $I$} is a subset $J\subset I$ for which there is a sequence of subintervals
\begin{equation}
\label{eq: Rschedule}
[a_0,b_0] \subset [a_1,b_1] \subset [a_2,b_2] \subset \cdots  \subset I
\end{equation}
such that $b_i-a_i=i$, $\bigcup [a_i,b_i] = I$, and $|J\cap [a_i,b_i]| = \mathsf{R}_{a_i,b_i}$. Note that the sequence of intervals determines the $\mathsf{R}$-schedule, and, for all $i$, $J\cap [a_i,b_i]$ is an $\mathsf{R}$-schedule for $[a_i,b_i]$.

\begin{lemma}\label{lemma: Tset}
Given a subspace $V\subset \mathsf{k}^\mathbb{Z}$ with rank matrix $\mathsf{R}$, and an $\mathsf{R}$-schedule $J$ for a subset $I$, the restriction map $V_{I}\rightarrow \mathsf{k}^J$ is an isomorphism
\end{lemma}

\noindent In particular, if $J$ is an $\mathsf{R}$-schedule for $\mathbb{Z}$, then $V\rightarrow \mathsf{k}^J$ is an isomorphism.

\begin{proof}
We prove the case when $I=[a,b]$ by induction on $n:=b-a$. If $n<0$, the lemma holds vacuously. Assume that the lemma holds for all intervals shorter than $n$. Choose a sequence of subintervals as in \eqref{eq: Rschedule}, and set $[a',b']:=[a_{n-1},b_{n-1}]$.

The restriction maps fit into a commutative diagram.
\begin{equation*
\begin{tikzpicture}[baseline=(current bounding box.center)]
	\node (V2) at (0,0) {$V_{[a,b]}$};
	\node (V3) at (3,0) {$V_{[a',b']}$};
	\node (k2) at (0,-1.5) {$\mathsf{k}^{J}$};
	\node (k3) at (3,-1.5) {$\mathsf{k}^{J\cap [a',b']}$};
	\draw[->>] (V2) to (V3);
	\draw[->] (V2) to node[left] {$\pi_{J}$} (k2);
	\draw[->] (V3) to node[right] {$\pi_{J\cap [a',b']}$} (k3);
	\draw[->>] (k2) to (k3);
\end{tikzpicture}
\end{equation*}
By the inductive hypothesis, $\pi_{J\cap [a',b']}$ is an isomorphism, and so $V_{[a,b]}\rightarrow \mathsf{k}^{T_{[a',b']}}$ is surjective.

Since $b'-a'=n-1$, either $[a',b']=[a+1,b]$ or $[a',b']=[a,b-1]$.
We have three cases.
\begin{itemize}
	\item If $\mathsf{R}_{a',b'}=\mathsf{R}_{a,b}$, then $J\cap [a',b']=J$ and so the bottom arrow is an isomorphism. Therefore, $\pi_J:V_{[a,b]}\rightarrow \mathsf{k}^J$ is surjective.
	\item If $\mathsf{R}_{a',b'}=\mathsf{R}_{a,b}-1$ and $[a',b']=[a+1,b]$, then there are no defects in $\{a\} \times [a,b]$, and so $V_{[a,b]}$ contains $(1,0,...,0,0)$ (by Proposition \ref{prop: defect}.4). Since $|J| =|J\cap [a',b']|+1$, $a\in J$ and so the image of $(1,0,...,0,0)$ under $\pi_{J}$ is non-zero and spans the kernel of $\mathsf{k}^{J}\rightarrow \mathsf{k}^{J\cap[a',b']}$. Thus, $\pi_J:V_{[a,b]}\rightarrow \mathsf{k}^{J}$ is surjective.
	\item If $\mathsf{R}_{a',b'}=\mathsf{R}_{a,b}-1$ and $[a',b']=[a,b-1]$, then there are no defects in $[a,b] \times \{b\}$, and so $V_{[a,b]}$ contains $(0,0,...,0,1)$ (by Proposition \ref{prop: defect}.3). By an analogous argument to the previous case, $\pi_J:V_{[a,b]}\rightarrow \mathsf{k}^{J}$ is surjective.
\end{itemize}
The map $\pi_J:V_{[a,b]}\rightarrow \mathsf{k}^{J}$ is surjective in all cases.
Since
$ \dim(V_{[a,b]}) = \mathsf{R}_{[a,b]}= J = \dim(\mathsf{k}^{J}) $
this map is an isomorphism, completing the induction.

For infinite $I$, the lemma follows since $I=\bigcup [a_i,b_i]$ and the lemma holds on each $[a_i,b_i]$.
\end{proof}

\subsection{Recurrence matrices from rank matrices}

We can now characterize when a subspace of $\mathsf{k}^\mathbb{Z}$ is the kernel of a reduced recurrence matrix.

\begin{thm}\label{thm: reduced2}
Given a subspace $V$ of $\mathsf{k}^\mathbb{Z}$, the following are equivalent.
\begin{enumerate}
	\item $V$ is the space of solutions to a linear recurrence $\mathsf{C}\mathsf{x}=\mathsf{0}$.
	\item The only left-bounded sequence in $V$ is the zero sequence; that is, if $\mathsf{v}\in V$ and $\mathsf{v}_i=0$ for all $i\ll0$, then $\mathsf{v}_i=0$ for all $i$.
	\item Every column of the rank matrix $\mathsf{R}$ of $V$ contains a defect
	\item $V$ is the space of solutions to a reduced linear recurrence $\overline{\mathsf{C}}\mathsf{x} =\mathsf{0}$.
\end{enumerate}
The shape of $\overline{\mathsf{C}}$ is the function $S:\mathbb{Z}\rightarrow\mathbb{Z}$ such that $(S(b),b)$ is a defect of $\mathsf{R}$.
\end{thm}

\begin{proof}
$(4 \Rightarrow 1)$ is automatic.

$(1 \Rightarrow 2)$ If a sequence $\mathsf{v}$ solves a linear recurrence, then every term in $\mathsf{v}$ is equal to a linear combination of previous terms in the sequence. If every term in $\mathsf{v}$ of sufficiently negative index is $0$, then recursively every term must be $0$.

$(\text{not } 3 \Rightarrow \text{not }2)$ Assume that the $b$th column of the rank matrix of $V$ does not contain a defect. By Proposition \ref{prop: defect}.3, $V_{[a,b]}$ contains the vector $(0,0,...,0,1)$ for all $a\leq b$. It follows that $V_{(-\infty,b]}$ contains the vector $(...,0,0,1)$. This implies that $V$ contains a sequence $\mathsf{v}$ with $\mathsf{v}_b=1$ and $\mathsf{v}_a=0$ whenever $a<b$.

$(3 \Rightarrow 4)$ Assume that there is a function $S:\mathbb{Z}\rightarrow \mathbb{Z}$ such that $(S(b),b)$ is a defect of $\mathsf{R}$ for each $b$. For each interval $[a,b]$, define the $\mathsf{R}$-schedule $T_{[a,b]} := [a,b] \smallsetminus S([a,b])$.
We note that $T_{[S(b),b-1]} \cup \{b\} = T_{[S(b)+1,b]}\cup \{S(b) \}$
and consider the following commutative diagram
\[ \begin{tikzpicture}
	\node (V1) at (-3,0) {$V_{[S(b),b-1]}$};
	\node (V2) at (0,0) {$V_{[S(b),b]}$};
	\node (V3) at (3,0) {$V_{[S(b)+1,b]}$};
	\node (k1) at (-3,-1.5) {$\mathsf{k}^{T_{[S(b),b-1]}}$};
	\node (k2) at (0,-1.5) {$\mathsf{k}^{T_{[S(b),b-1]}\cup \{b\} }$};
	\node (k3) at (3,-1.5) {$\mathsf{k}^{T_{[S(b)+1,b]}}$};
	\draw[->] (V2) to (V1);
	\draw[->] (V2) to (V3);
	\draw[->] (V1) to (k1);
	\draw[->] (V2) to (k2);
	\draw[->] (V3) to (k3);
	\draw[->] (k2) to (k1);
	\draw[->] (k2) to (k3);
\end{tikzpicture}\]
Since $(S(b),b)$ is a defect, the maps in the top row are isomorphisms. Since $T_{[S(b),b-1]}$ and $T_{[S(b)+1,b]}$ are $\mathsf{R}$-schedules, the maps on the left and right are isomorphisms (by Lemma \ref{lemma: Tset}).

Therefore, the map $V_{[S(b),b]} \longrightarrow \mathsf{k} ^{J }$ is an embedding of codimension $1$. Its image is defined by a relation (unique up to scaling) of the form
\begin{equation}\label{eq: relation}
 \sum_{a\in T_{[S(b),b-1]}\cup\{b\} } \mathsf{C}_{b,a}x_{a} = 0
\end{equation}
Because the left and right maps are isomorphisms, $\mathsf{C}_{b,b}\neq0$ and $\mathsf{C}_{S(b),b}\neq0$.
Rescaling the relation as necessary, we assume that $\mathsf{C}_{b,b}=1$.

Construct a recurrence matrix $\mathsf{C}$ such that, for each $b$, the $b$th row collects the coefficients of the corresponding equation \eqref{eq: relation}. For any pair $b<a$, $S(b)\not \in T_{[S(a)+1,a]}$ and so $\mathsf{C}_{a,S(b)}=0$. Therefore, $\mathsf{C}$ is a reduced linear recurrence of shape $S$, such that $V\subseteq \mathrm{ker}(\mathsf{C})$.

Consider any interval $[a,b]$.
For each $b'\in [a,b] \smallsetminus T_{[a,b]}$, the corresponding relation \eqref{eq: relation} only involves terms with index in $[a,b]$. Since these relations are linearly independent, the codimension of $\mathrm{ker}(\mathsf{C})_{[a,b]}$ in $\mathsf{k}^{[a,b]}$ is at least the cardinality of $[a,b]\smallsetminus T_{[a,b]}$. Therefore,
\[ \dim(\mathrm{ker}(\mathsf{C})_{[a,b]})\leq |T_{[a,b]}| = \mathsf{R}_{a,b} = \dim(V_{[a,b]}) \]
Since $V_{[a,b]}\subseteq \mathrm{ker}(\mathsf{C})_{[a,b]}$, $V_{[a,b]}=\mathrm{ker}(\mathsf{C})_{[a,b]}$. Since this holds for all intervals, $V=\mathrm{ker}(\mathsf{C})$.
\end{proof}

\subsection{From rank matrices to shapes}

The theorem relates the shape of a reduced recurrence matrix $\mathsf{C}$ to the defects of the rank matrix $\mathsf{R}$ of $\mathrm{ker}(\mathsf{C})$, as follows

\begin{coro}
If $\mathsf{C}$ is a reduced recurrence matrix, then $(a,b)$ is a pivot of $\mathsf{C}$ if and only if $(b,a)$ is a defect of the rank matrix of $\mathrm{ker}(\mathsf{C})$.
\end{coro}

\noindent Therefore, we may translate several earlier results into the language of shapes.

\begin{defn}\label{defn: schedule}
Given a non-increasing injection $S$, an \textbf{$S$-schedule for a subset $I\subset \mathbb{Z}$} is a subset $J\subset I$ for which there is a subsequence of subintervals
\begin{equation*}
[a_0,b_0] \subset [a_1,b_1] \subset [a_2,b_2] \subset \cdots \subset I
\end{equation*}
such that $b_i-a_i=i$, $\bigcup [a_i,b_i] = I$, and $|J\cap [a_i,b_i]|$  equals the number of $S$-balls in $[a_i,b_i]$.
\end{defn}
If $S$ is the shape of a reduced recurrence matrix $\mathsf{C}$ and $\mathsf{R}$ is the rank matrix of $\mathrm{ker}(\mathsf{C})$, then $\mathsf{R}$-schedules and $S$-schedules coincide.
Note that $I$ only admits an $S$-schedule if $I$ consists of consecutive elements. The following is a direct translation of Lemma \ref{lemma: Tset}.

\begin{prop}\label{prop: Tset}
Let $\mathsf{C}$ be a reduced recurrence matrix with shape $S$, and let $J$ be an $S$-schedule for $I$. Then the restriction map $\mathrm{ker}(\mathsf{C})_{I}\rightarrow \mathsf{k}^J$ is an isomorphism
\end{prop}

\noindent In particular, if $J$ is an $S$-schedule for $\mathbb{Z}$, then $\mathrm{ker}(\mathsf{C})\rightarrow \mathsf{k}^J$ is an isomorphism.

As a special case, for any $b\in \mathbb{Z}$, the sequence of intervals $[b,b] \subset [b-1,b] \subset [b-2,b] \subset \cdots $ determines the following $S$-schedule for $\mathbb{Z}$:
\[ T_b := \bigcup_{a\leq b} T_{[a,b]} = \{ a\leq b \mid \forall c\leq b, S(c) \neq a \} = (-\infty,b] \smallsetminus S\left( ( -\infty,b]\right) \]
Therefore, the proposition specializes to the following.
\begin{thm}\label{thm: solextend}
The restriction map $\pi_{T_b}:\mathrm{ker}(\mathsf{C})\rightarrow \mathsf{k}^{T_b}$ is an isomorphism.
\end{thm}

\noindent Since $T_b$ contains a unique representative of each $S$-ball, this implies the following.

\begin{thm}\label{thm: balls}
Then dimension of $\mathrm{ker}(\mathsf{C})$ equals the number of $S$-balls.
\end{thm}

\begin{rem}
Constructing $S$-schedules is easy and intuitive using the juggling pattern of $S$. Consider any zigzagging path in the juggling pattern which starts on the main diagonal, only travels up (northwest) or right (northeast), and ends above the $(a,b)$th entry.
\[\begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\clip[use as bounding box] (-9.5,3.3) rectangle (6.3,-0.3);
	\matrix[matrix of math nodes,
		matrix anchor = M-2-24.center,
		nodes in empty cells,
		inner sep=0pt,
		gthrow/.style={dark green,draw,circle,inner sep=0mm,minimum size=5mm},
		rthrow/.style={dark red,draw,circle,inner sep=0mm,minimum size=5mm},
		bthrow/.style={dark blue,draw,circle,inner sep=0mm,minimum size=5mm},
		pthrow/.style={dark purple,draw,circle,inner sep=0mm,minimum size=5mm},
		nodes={anchor=center,node font=\scriptsize,rotate=45},
		column sep={0.4cm,between origins},
		row sep={-0.4cm,between origins},
	] (M) at (0,0) {
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \& |[gthrow]|  \&  \& |[rthrow]|  \&  \& |[bthrow]|  \&  \& |[bthrow]|  \&  \& |[pthrow]|  \&  \& |[gthrow]|  \&  \& |[rthrow,rotate=-45]| 1 \&  \& |[bthrow,rotate=-45]| 2 \&
 \& |[gthrow,rotate=-45]| 3 \& |[inner sep=8pt]| \& |[pthrow,rotate=-45]| 4 \&  \& |[bthrow,rotate=-45]| 5 \&  \& |[bthrow,rotate=-45]| 6 \&  \& |[rthrow,rotate=-45]| 7 \&  \& |[gthrow,rotate=-45]| 8 \&  \& |[pthrow]|  \&  \& |[bthrow]|  \&
  \& |[gthrow]|  \&  \& |[rthrow]|  \&  \& |[bthrow]|  \&  \\
\cdots \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
\cdots \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \& \cdots \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[bthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \& |[rthrow]|  \&  \&  \&  \&  \&  \& |[pthrow]|  \&  \&  \&  \&  \&  \&  \&  \& |[gthrow]|  \&  \& |[pthrow]|  \&  \&  \&  \&  \&  \& |[rthrow]|  \&  \&  \&  \&  \&  \&  \&  \& \cdots \\
 \&  \&  \& |[pthrow]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[rthrow]|  \&  |[inner sep=8pt]|  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& |[pthrow]|  \&  \&  \&  \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \\
 \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \&  \& \\
	};

	\draw[dark green] (M-3-1) to (M-2-2) to (M-7-7) to (M-2-12) to (M-5-15) to (M-2-18) to (M-7-23) to (M-2-28) to (M-5-31) to (M-2-34) to (M-7-39);
	\draw[dark red] (M-5-1) to (M-2-4) to (M-7-9) to (M-2-14) to (M-8-20) to (M-2-26) to (M-7-31) to (M-2-36) to (M-5-39);
	\draw[dark blue] (M-3-1) to (M-5-3) to (M-2-6) to (M-3-7) to (M-2-8) to (M-6-12) to (M-2-16) to (M-5-19) to (M-2-22) to (M-3-23) to (M-2-24) to (M-6-28) to (M-2-32) to (M-5-35) to (M-2-38) to (M-3-39);
	\draw[dark purple] (M-5-1) to (M-8-4) to (M-2-10) to (M-7-15) to (M-2-20) to (M-7-25) to (M-2-30) to (M-8-36) to (M-5-39);

	\draw[dashed] (M-2-13.center) to (M-10-21.center) to (M-2-29.center);
	\draw[thick] (M-2-19.center) to (M-3-18.center) to (M-4-19.center) to (M-5-18.center) to (M-9-22.center)to (M-10-21.center);
\end{tikzpicture}\]
Each time the path crosses a colored line, record the row (if it is ascending) or the column (if it is descending).
The resulting subset is an $S$-schedule for the interval $[a,b]$, and every $S$-schedule can be constructed this way.
In the picture above, the path in black determines the $S$-schedule $\{3,4,2,7\}$ for the interval $[1,8]$. The set $T_b$ comes from the path which starts to the right of $(b,b)$ and only travels up (northeast).
\end{rem}

\section{Properties of the solution matrix}

Fix a reduced recurrence matrix $\mathsf{C}$ of shape $S$ for the rest of the section.

\subsection{Vanishing}

The unitriangularity of $\mathsf{Adj}(\mathsf{C})$ and $\mathsf{Adj}(\mathsf{C}\mathsf{P})$ mean that the solution matrix
\[ \mathsf{Sol}(\mathsf{C}) := \mathsf{Adj}(\mathsf{C}) - \mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P})\]
has zeroes between the support of $\mathsf{Adj}(\mathsf{C})$ and $\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P})$, which we make precise as follows.

\begin{prop}\label{prop: colvan}
$\mathsf{Sol}(\mathsf{C})_{a,b}=0$ whenever $a<b$ and there is no $c\leq b$ with $S(c)=a$.
\end{prop}
\noindent If $S$ is bijective, this can be restated as $\mathsf{Sol}(\mathsf{C})_{a,b}=0$ whenever $a<b<S^{-1}(a)$.

\begin{proof}
By unitriangularity, $\mathsf{Adj}(\mathsf{C})_{a,b}=0$ whenever $a<b$. Dually, $(\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P}))_{a,b}$ is only non-zero if there is a $c$ with $\mathsf{P}_{a,c}\neq0$ and $\mathsf{Adj}(\mathsf{C}\mathsf{P})_{c,b}\neq0$; that is, if $S(c)=a$ and $c\geq b$.
\end{proof}

For fixed $b$, the proposition determines the value of the $b$th column of $\mathsf{Sol}(\mathsf{C})$ on the set $T_b$. Since this column solves $\mathsf{C}\mathsf{x}=0$, these entries determine the column (Theorem \ref{thm: solbasis}).

\begin{coro}
The $b$th column of $\mathsf{Sol}(\mathsf{C})$ is the unique solution to $\mathsf{C}\mathsf{x}=\mathsf{0}$ for which
\begin{enumerate}
	\item $x_a=0$ whenever $a<b$ but there is no $c\leq b$ with $S(c)=a$, an
	\item $x_b=1$ unless $S(b)=b$, in which case $x_b=0$.
\end{enumerate}
\end{coro}

We also have a vanishing condition which guarantees consecutive zeros in each column.

\begin{prop}\label{prop: rowvan}
$\mathsf{Sol}(\mathsf{C})_{a,b}=0$ whenever $S(b) < a < b$.
\end{prop}
\begin{proof}
We proceed by induction on $b-a>0$. Assume that $\mathsf{Sol}(\mathsf{C})_{a+1,b}=...=\mathsf{Sol}(\mathsf{C})_{b-1,b}=0$ (which is vacuous for the base case $b-a=1$). We split into two cases.
\begin{itemize}
	\item If there is no $c\leq b$ with $S(c)=a$, then $\mathsf{Sol}(\mathsf{C})_{a,b}=0$ by Proposition \ref{prop: colvan}.
	\item Otherwise, there is a $c\leq b$ with $S(c)=a$. Since $S(b)<a$, we know $c\neq b$ and so $c<b$. The $(c,b)$th entry of the equality $\mathsf{C}\mathsf{Sol}(\mathsf{C})=0$ is
	\[ \mathsf{C}_{c,a}\mathsf{Sol}(\mathsf{C})_{a,b} + \mathsf{C}_{c,a+1}\mathsf{Sol}(\mathsf{C})_{a+1,b} + ... + \mathsf{C}_{c,c}\mathsf{Sol}(\mathsf{C})_{c,b} =0 \]
	By assumption, $\mathsf{Sol}(\mathsf{C})_{a+1,b}=...=\mathsf{Sol}(\mathsf{C})_{c,b}=0$, and so $\mathsf{C}_{c,a}\mathsf{Sol}(\mathsf{C})_{a,b}=0$. Since $\mathsf{C}_{c,a}=\mathsf{C}_{c,S(c)}$ is invertible, $\mathsf{Sol}(\mathsf{C})_{a,b}=0$.
\end{itemize}
This completes the induction.
\end{proof}

\newpage

\begin{rem}\label{rem: soljugs}
Propositions \ref{prop: colvan} and \ref{prop: rowvan} can be visualized in terms of juggling patterns. As in Remark \ref{rem: balljugs}, the $S$-balls can be visualized by connecting each pivot entry with a line to the diagonal entries in the same row or column. The dashed circle is not in an $S$-ball.
\[ \begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-4-8.center,
		gthrow/.style={dark green,draw,circle,inner sep=0mm,minimum size=5mm},
		bthrow/.style={dark blue,draw,circle,inner sep=0mm,minimum size=5mm},
		dashedthrow/.style={dashed,draw,circle,inner sep=0mm,minimum size=5mm},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,
			node font=\footnotesize,
			rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	 \& |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[bthrow]| 1 \& \& |[gthrow]| 1 \& \&|[dashedthrow]| 1 \& \& |[gthrow]| 1 \& \& |[gthrow]| 1 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& -1 \& \&  \& \&  \& \& |[gthrow]|  -1 \& \& |[gthrow]| -1 \& \\
	 \& |[gthrow]| -1 \&  \& |[bthrow]| -1 \& \& |[gthrow]| -1 \& \&  \& \& |[gthrow]| -1 \& \& \& \&  \& \& \cdots \\
	 \& \&  \& \&  \& \&  \& \& \&  \&  \& \&  \& \&  \&  \\
	};

	\draw[dark blue,->] (M-2-1) to (M-1-2) to (M-3-4) to (M-1-6) to (M-4-9);
	\draw[dark green] (M-2-1) to (M-3-2) to (M-1-4) to (M-3-6) to (M-1-8) to (M-3-10) to (M-1-12) to (M-2-13) to (M-1-14) to (M-2-15) to (M-1-16);
\end{tikzpicture} \]
If we transpose and superimpose the juggling pattern onto the solution matrix...
\[ \begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-8-8.center,
		gthrow/.style={dark green,draw,circle,inner sep=0mm,minimum size=5mm},
		bthrow/.style={dark blue,draw,circle,inner sep=0mm,minimum size=5mm},
		dashedthrow/.style={dashed,draw,circle,inner sep=0mm,minimum size=5mm},
		faded/.style={black!25},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\footnotesize,rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	 \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	 \& 5 \&  \& |[faded]| 0 \& \& 2 \& \& -1 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& -3 \& \& |[faded]| 0 \& \& -1 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \&  \\
	 \& 2 \&  \& 2 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& 1 \&  \\
	 \& |[gthrow]| 1 \&  \&  |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[faded]| 0 \& \& |[gthrow]| 1 \& \& |[faded]| 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[gthrow]| 1 \& \& |[gthrow]| 1 \&  \\
	 \& |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[dashedthrow,faded]| 0 \& \&|[gthrow]| 1 \& \& |[gthrow]| 1 \& \& \cdots \\
	\cdots \& \& 1 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& 1 \& \& 1 \& \\
	\& 2 \& \& 2 \& \& 2 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& 3 \& \& 3 \& \& |[faded]| 0 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \& 1 \&   \\
	  \& 5 \& \& 5 \& \& |[faded]| 0 \& \& 2 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \&  \cdots \\
	\cdots \& \& 8 \& \& |[faded]| 0 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \\
	  \& 13 \& \& |[faded]| 0 \& \& 5 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \&  \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \\
	};

	\draw[dark blue,->] (M-7-1) to (M-8-2) to (M-6-4) to (M-8-6) to (M-1-13);
	\draw[dark green] (M-7-1) to (M-6-2) to (M-8-4) to (M-6-6) to (M-8-8) to (M-6-10) to (M-8-12) to (M-7-13) to (M-8-14) to (M-7-15) to (M-8-16);
\end{tikzpicture}\]
Propositions \ref{prop: colvan} and \ref{prop: rowvan} state that the lines do not cross any non-zero entries. The circles must be non-zero, except the dashed circle, whose entire row and column must vanish.\footnote{We note that all of these observations will be combined into and generalized by Lemma \ref{lemma: boxballs}.}
\end{rem}

\subsection{Rank conditions}
The prior vanishing results can be generalized to a formula for ranks of certain rectangular submatrices of $\mathsf{Sol}(\mathsf{C})$.

Given integers $a\leq b$ and $c\leq d$, the box $[a,b]\times [c,d]\subset \mathbb{Z}\times \mathbb{Z}$ indexes a rectangular submatrix of $\mathsf{Sol}(\mathsf{C})$.
Define an \textbf{$S$-ball in the box $[a,b]\times [c,d]$} to be an equivalence class in the set
\[ \left(\{ (i,i) \mid S(i) \neq i \} \cup \{ (S(j),j) \mid S(j)\neq j\} \right) \subset [a,b] \times [c,d] \]
under the equivalence relation generated by $(i,i) \sim (S(i),i)\sim (S(i),S(i))$.

\begin{rem}\label{rem: balls}
This is a 2-dimensional analog of $S$-balls as defined in Section \ref{section: balls}. The relation is that $S$-balls in an interval $[a,b]$ are in bijection with $S$-balls in the box $[a,b]\times [a,b]$, and also with the $S$-balls in $[a,b]\times [c,d]$ and in $[c,d]\times [a,b]$ for any $[c,d]\supset [a,b]$.
\end{rem}

\begin{ex}\label{ex: boxballs}
In terms of the juggling pattern, this counts the \emph{number of different colors of circles} inside the rectangular submatrix indexed by $[a,b]\times [c,d]$.
\[ \begin{tikzpicture}[baseline=(current bounding box.center),
	ampersand replacement=\&,
	]
	\matrix[matrix of math nodes,
		matrix anchor = M-8-8.center,
		gthrow/.style={dark green,draw,circle,inner sep=0mm,minimum size=5mm},
		bthrow/.style={dark blue,draw,circle,inner sep=0mm,minimum size=5mm},
		dashedthrow/.style={dashed,draw,circle,inner sep=0mm,minimum size=5mm},
		faded/.style={black!25},
		nodes in empty cells,
		inner sep=0pt,
		nodes={anchor=center,node font=\footnotesize,rotate=45},
		column sep={.5cm,between origins},
		row sep={.5cm,between origins},
	] (M) at (0,0) {
	 \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \&  \\
	 \& 5 \&  \& |[faded]| 0 \& \& 2 \& \& -1 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& -3 \& \& |[faded]| 0 \& \& -1 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \&  \\
	 \& 2 \&  \& 2 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& \cdots \\
	\cdots \& \& -1 \& \& -1 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& 1 \&  \\
	 \& |[gthrow]| 1 \&  \&  |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[faded]| 0 \& \& |[gthrow]| 1 \& \& |[faded]| 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& |[gthrow]| 1 \& \& |[gthrow]| 1 \&  \\
	 \& |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[bthrow]| 1 \& \& |[gthrow]| 1 \& \& |[dashedthrow,faded]| 0 \& \&|[gthrow]| 1 \& \& |[gthrow]| 1 \& \& \cdots \\
	\cdots \& \& 1 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \& |[faded]| 0 \& \& 1 \& \& 1 \& \\
	\& 2 \& \& 2 \& \& 2 \& \& |[faded]| 0 \& \& 1 \& \& |[faded]| 0 \& \& 1 \& \& \cdots \\
	\cdots \& \& 3 \& \& 3 \& \& |[faded]| 0 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \& 1 \&   \\
	  \& 5 \& \& 5 \& \& |[faded]| 0 \& \& 2 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \&  \cdots \\
	\cdots \& \& 8 \& \& |[faded]| 0 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \& |[faded]| 0 \& \\
	  \& 13 \& \& |[faded]| 0 \& \& 5 \& \& 3 \& \& 2 \& \& 1 \& \& 1 \& \&  \cdots \\
	\cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \& \cdots \& \\
	};

	\draw[dark blue,->] (M-7-1) to (M-8-2) to (M-6-4) to (M-8-6) to (M-1-13);
	\draw[dark green] (M-7-1) to (M-6-2) to (M-8-4) to (M-6-6) to (M-8-8) to (M-6-10) to (M-8-12) to (M-7-13) to (M-8-14) to (M-7-15) to (M-8-16);

	\draw[dark red, fill=dark red!50,opacity=.25,rounded corners] (M-3-4.center) -- (M-2-5.center) -- (M-10-13.center) -- (M-11-12.center) -- cycle;
	\draw[dark blue, fill=dark blue!50,opacity=.25,rounded corners] (M-6-9.center) -- (M-3-12.center) -- (M-7-16.center) -- (M-10-13.center) -- cycle;
	\draw[dark purple, fill=dark purple!50,opacity=.25,rounded corners] (M-7-2.center) -- (M-4-5.center) -- (M-7-8.center) -- (M-10-5.center) -- cycle;

\end{tikzpicture}\]
The \textcolor{dark purple}{purple}, \textcolor{dark red}{red}, and \textcolor{dark blue}{blue} boxes above contain $\textcolor{dark purple}{2}$, $\textcolor{dark red}{0}$, and $\textcolor{dark blue}{1}$ $S$-balls, respectively.
\end{ex}

The following lemma relates the rank of a submatrix to the number of $S$-balls in the box.

\begin{lemma}\label{lemma: boxballs}
Let $\mathsf{C}$ be a reduced recurrence matrix of shape $S$. For any integers $a\leq b$ and $c\leq d$, the rank of $\mathsf{Sol}(\mathsf{C})_{[a,b]\times [c,d]}$ is at least the number of $S$-balls in the box $[a,b]\times [c,d]$, with equality when
\begin{equation}
\label{eq: boxcond}
b-c\geq -1 \text{ and }\min(a-c,b-d)\leq 0
\end{equation}
\end{lemma}
Conceptually, Condition \eqref{eq: boxcond} implies the box has at least one corner on or below the first superdiagonal, and at least two corners on or above the main diagonal.

\begin{ex}
Condition \eqref{eq: boxcond} holds for the three boxes in Example \ref{ex: boxballs}, and one may check that their ranks coincide with the number of $S$-balls they contain.
\end{ex}
\begin{proof}
First, we bound the rank below by finding a full-rank submatrix of the appropriate size.
Fix $[a,b]\times [c,d]$.
Index $I:=[c,d]\cap [a,b]\smallsetminus S([c,d])$ by $i_1<i_2<\cdots < i_k$, and index
\[ J:= \{j\in [c,d] \mid j\not\in [a,b] \text{ and }S(j) \in [a,b] \} \]
by $j_1<j_2<\cdots < j_\ell$. Note that $i_k<j_1$ and $S(j_h)<i_1$ for all $h$.

Each $S$-ball in the box $[a,b]\times [c,d]$ contains a unique \emph{final circle}, by which we mean one of the two types of pair:
\begin{itemize}
	\item $(i,i)\in [a,b]\times [c,d]$ such that there is no $j\in [c,d]$ with $S(j)=i$.
	\item $(S(i),i) \in [a,b]\times [c,d]$ such that $(i,i)\not\in[a,b]\times[c,d]$.
\end{itemize}
Furthermore, each column in the box can contain at most one such circle. The columns containing the first kind of final circle are indexed by $I$, and the columns containing the second kind are indexed by $J$. Therefore, the number of $S$-balls in the box is $|I|+|J|$.

Consider the submatrix\footnote{We are stretching the definition of `submatrix' to allow for rearranging the order of the rows and columns.} of $\mathsf{Sol}(\mathsf{C})$ with row set
$ \{i_k,i_{k-1},...,i_1,S(j_1),S(j_2),...,S(J_\ell)\} $
and column set
$ \{i_k,i_{k-1},...,i_1,j_1,j_2,...,j_\ell \} $. This matrix is upper triangular with non-zero entries on the diagonal, and so it has rank $|I|+|J|$. Consequently,
\begin{equation}
\label{eq: lowerbound}
\mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]})\geq  \text{the number of $S$-balls in the box $[a,b]\times [c,d]$}
\end{equation}
Note that this inequality did not assume Conditions \eqref{eq: boxcond}.

Next, assume that $b-c\geq -1$ and that $b-d\leq 0$, and define disjoint sets
\begin{align*}
K&:=\{k \in [a,b] \text{ such that there is an $m\in [a,b]$ with $S(m)=k$} \} \\
L &:= \{ \ell\in [a,c-1]  \text{ such that there is no $m\leq d$ with $S(m)=\ell$} \}
\end{align*}
Construct a $(K \cup L)\times [a,b]$-matrix $\mathsf{M}$, such that for each $k\in K$, the corresponding row of $\mathsf{M}$ is $\mathsf{C}_{S^{-1}(k),[a,b]}$ and for each $\ell\in L$, the corresponding row of $\mathsf{M}$ is $e_\ell$ (the row vector with a $1$ in the $\ell$th place).

Since $\mathsf{C}\mathsf{Sol}(\mathsf{C})=0$ (Proposition \ref{prop: sol}), $\mathsf{M}_{k,[a,b]}\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]} =0$ for all $k\in K$. Since each row of $\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]}$ indexed by $\ell\in L$ vanishes (Proposition \ref{prop: rowvan})\footnote{
Explicitly: Since $\ell\in [a,b]$ but not in $[c,d]$, and $b-d\leq 0$, $\ell <c$. Since $\ell \not\in S( (-\infty,d])$, either $S^{-1}(\ell)>d$ or $S^{-1}(\ell)$ is empty. In either case, $\mathsf{Sol}(\mathsf{C})_{\ell,[c,d]}$ consists of zeroes by Proposition \ref{prop: rowvan}.
}, $\mathsf{M}_{\ell, [a,b]}\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]} =0$ for all $\ell\in L$. Therefore,  the matrix product vanishes:
\[ \mathsf{M}\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]} =0\]
Since the first non-zero entry in the $k$th row of $\mathsf{M}$ is in the $k$th column and the first non-zero entry in the $\ell$th row of $\mathsf{M}$ is in the $\ell$th column, $\mathsf{M}$ is in row-echelon form and has rank $|K \cup L|$.
Therefore,
\[ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]})\leq \dim(\mathrm{ker}(\mathsf{M})) = |[a,b]\smallsetminus (K\cup L) |\]
Next, we note that $K\cup L$ indexes the rows of the box $[a,b]\times [c,d]$ which do not contain the final circle of an $S$-ball in the box.
Combined with the lower bound \eqref{eq: lowerbound},
\[ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]})= \text{the number of $S$-balls in the box $[a,b]\times [c,d]$}\]
This establishes the theorem in the case when $b-d\leq 0$.

For the final case, we need a source of relations among the columns of $\mathsf{Sol}(\mathsf{C})$.

\begin{prop}\label{prop: oppsol}
$\mathsf{Sol}(\mathsf{C})(\mathsf{C}\mathsf{P})=0$.
\end{prop}
\begin{proof}
We compute directly.
\begin{align*}
\mathsf{Sol}(\mathsf{C})(\mathsf{C}\mathsf{P})
&= \mathsf{Adj}(\mathsf{C})(\mathsf{C}\mathsf{P}) - (\mathsf{P}\mathsf{Adj}(\mathsf{C}\mathsf{P}) (\mathsf{C}\mathsf{P}) \\
&\stackrel{*}{=} (\mathsf{Adj}(\mathsf{C})\mathsf{C})\mathsf{P} - \mathsf{P}(\mathsf{Adj}(\mathsf{C}\mathsf{P})(\mathsf{C}\mathsf{P}))
= \mathsf{P} - \mathsf{P} = \mathsf{0}
\end{align*}
Equality ($*$) holds because $\mathsf{P}$ is a generalized permutation matrix.
\end{proof}

Finally, assume that $b-c\geq -1$ and that $a-c\leq 0$, and define disjoint sets
\begin{align*}
K&:=\{k \in [c,d] \text{ such that $S(k)\in [c,d]$} \} \\
L &:= \{ \ell\in [b+1,d]  \text{ such that $S(\ell)<a$} \}
\end{align*}
Construct a $[c,d]\times (K \cup L)$-matrix $\mathsf{M}$, such that for each $k\in K$, the corresponding column of $\mathsf{M}$ is $\mathsf{C}_{[a,b],k}$ and for each $\ell\in L$, the corresponding column of $\mathsf{M}$ is $e_\ell$ (the column vector with a $1$ in the $\ell$th place).

Since $\mathsf{Sol}(\mathsf{C})\mathsf{C}\mathsf{P}=0$ (Proposition \ref{prop: oppsol}), $\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]} \mathsf{M}_{[c,d],k}=0$ for all $k\in K$. Since each column of $\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]}$ indexed by $\ell\in L$ vanishes (Proposition \ref{prop: colvan}), $\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]}\mathsf{M}_{[c,d],\ell} =0$ for all $\ell\in L$. Therefore,  the matrix product vanishes:
\[ \mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]}\mathsf{M}=0\]
The transpose $\mathsf{M}^\top$ is in row echelon form and has rank $|K \cup L|$.
Therefore,
\[ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]})\leq \dim(\mathrm{ker}(\mathsf{M}^\top)) = |[c,d]\smallsetminus (K\cup L) |\]
Next, we note that $K\cup L$ indexes the columns of the box $[a,b]\times [c,d]$ which do not contain the `initial circle' of an $S$-ball in the box.
Combined with the lower bound \eqref{eq: lowerbound},
\[ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[a,b],[c,d]})= \text{the number of $S$-balls in the box $[a,b]\times [c,d]$} \qedhere \]
\end{proof}

Lemma \ref{lemma: boxballs} extends to improper intervals such as $(-\infty, \infty) $ and $ (-\infty, d]$ by considering appropriate limits, as the number of $S$-balls in a box is monotonic in nested intervals. For example, the rank of the entire matrix $\mathsf{Sol}(\mathsf{C})$ equals the number of $S$-balls in the unbounded `box' $(-\infty,\infty)\times ( -\infty,\infty)$; that is, the number of $S$-balls

The lemma allows us to prove the following fundamental result.

\begin{thm}\label{thm: sol}
If $\mathsf{C}$ is reduced, the kernel of $\mathsf{C}$ equals the image of $\mathsf{Sol}(\mathsf{C})$.
\end{thm}
\begin{proof}
By Proposition \ref{prop: sol}, $\mathrm{im}(\mathsf{Sol}(\mathsf{C})) \subseteq \mathrm{ker}(\mathsf{C})$. For any interval $[a,b]$ and any $S$-schedule $J$ of $[a,b]$, Proposition \ref{prop: Tset} implies that
$ \dim(\mathrm{ker}(\mathsf{C})_{[a,b]})=|J|$,
and Lemma \ref{lemma: boxballs} implies that
\[\mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[a,b], \mathbb{Z}}) = \text{\# of $S$-balls in the box $[a,b]\times \mathbb{Z}$} \]
The number of $S$-balls in $[a,b]\times \mathbb{Z}$ equals the number of $S$-balls in $[a,b]$ (Remark \ref{rem: balls}), which in turn equals $|J|$. Thus, $\mathrm{ker}(\mathsf{C})_{[a,b]}=\mathrm{im}(\mathsf{Sol}(\mathsf{C}))_{[a,b]}$ for all intervals $[a,b]$, and so $\mathrm{ker}(\mathsf{C})=\mathrm{im}(\mathsf{Sol}(\mathsf{C}))$.
\end{proof}

\subsection{Bases for solutions}

We can minimally parametrize the kernel using $S$-schedules.\footnote{See Definition \ref{defn: schedule}; note that $I$ only admits an $S$-schedule if $I$ is a set of consecutive elements.}

\begin{prop}
Let $\mathsf{C}$ be a reduced recurrence matrix with shape $S$, and let $J$ be an $S$-schedule for $I$. Then multiplication by $\mathsf{Sol}(\mathsf{C})_{I,J}$ gives an isomorphism $\mathsf{k}^J\rightarrow \mathrm{ker}(\mathsf{C})_I$.
\end{prop}
\noindent If $J$ is an $S$-schedule for $\mathbb{Z}$, then multiplication by $\mathsf{Sol}(\mathsf{C})_{\mathbb{Z},J}$ is an isomorphism $\mathsf{k}^J\rightarrow \mathrm{ker}(\mathsf{C})$.
\begin{proof}
We first consider the the case when $I$ is finite.
Consider any interval $[c,d]$ such that $I\subset [c,d]$. By Remark \ref{rem: balls}, the number of $S$-balls in $[c,d]\times I$ equals the number of $S$-balls in $I$, which is equal to $J$ by Definition \ref{defn: schedule}. By Lemma \ref{lemma: boxballs}, this implies that
$ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],I}) = |J| $.

Since $J\subset I$, this implies that $ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],J}) \leq  |J| $. We will prove that
\begin{equation}
\label{eq: bullshit}
\mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],J}) =  |J|
\end{equation}
by induction on the number of elements in $I$. If $I=\varnothing$, the claim holds vacuously. Assume that the claim holds for all $S$-schedules of intervals shorter than $I$, and choose a sequence of subintervals as in Definition \ref{defn: schedule}. Since $I$ is finite, the sequence terminates at $[a_n,b_n]=I$.

Since $J' := J\cap [a_{n-1},b_{n-1}]$ is an $S$-schedule for $[a_{n-1},b_{n-1}]$, by the inductive hypothesis,
$ \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],J'}) = |J'| $.
If $J'=J$, this immediately implies \eqref{eq: bullshit}. If $J'\neq J$, then $|J| = |J'|+1$, and so
\[\mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],[a_{n},b_{n}]} ) =  \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],[a_{n-1},b_{n-1}]} ) +1 \]
Hence, the column indexed by the unique element of $[a_n,b_n]\smallsetminus [a_{n-1},b_{n-1}]$ is linearly independent from the other columns. Since this is also the unique element in $J\smallsetminus J'$,
\[\mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],J} ) =  \mathrm{rank}(\mathsf{Sol}(\mathsf{C})_{[c,d],J'} ) +1 \]
This proves \eqref{eq: bullshit} and completes the induction.

Since $\mathrm{im}(\mathsf{Sol}(\mathsf{C}))= \mathrm{ker}(\mathsf{C})$, we know that $\mathrm{im}(\mathsf{Sol}(\mathsf{C})_{I,J}) \subseteq \mathrm{ker}(\mathsf{C})_I$. Equation \ref{eq: bullshit} for $I=[c,d]$ and Proposition \ref{prop: Tset} imply these both have dimension $|J|$, so $\mathrm{im}(\mathsf{Sol}(\mathsf{C})_{I,J}) = \mathrm{ker}(\mathsf{C})_I$.

When $I$ is infinite, Definition \ref{defn: schedule} and the preceding argument guarantee it is a union of finite intervals on which the proposition holds, so $\mathrm{im}(\mathsf{Sol}(\mathsf{C})_{I,J}) = \mathrm{ker}(\mathsf{C})_I$.
\end{proof}

The special case of the $S$-schedule $T_b$ for $\mathbb{Z}$ yields the following.

\begin{thm}\label{thm: solbasis}
Multiplication by $\mathsf{Sol}(\mathsf{C})_{\mathbb{Z}\times T_b}$ gives an isomorphism $\mathsf{k}^{T_b}\rightarrow \mathrm{ker}(\mathsf{C})$.
\end{thm}

Combinatorics (math.CO); Rings and Algebras (math.RA)