We extend the notion of cointegration for time series taking values in a potentially infinite dimensional Banach space. Examples of such time series include stochastic processes in
$C[0,1]$
equipped with the supremum distance and those in a finite dimensional vector space equipped with a non-Euclidean distance. We then develop versions of the Granger–Johansen representation theorems for I(1) and I(2) autoregressive (AR) processes taking values in such a space. To achieve this goal, we first note that an AR(p) law of motion can be characterized by a linear operator pencil (an operator-valued map with certain properties) via the companion form representation, and then study the spectral properties of a linear operator pencil to obtain a necessary and sufficient condition for a given AR(p) law of motion to admit I(1) or I(2) solutions. These operator-theoretic results form a fundamental basis for our representation theorems. Furthermore, it is shown that our operator-theoretic approach is in fact a closely related extension of the conventional approach taken in a Euclidean space setting. Our theoretical results may be especially relevant in a recently growing literature on functional time series analysis in Banach spaces.