Product Spaces
Sometimes a system of applied interest can be adequately modeled with a single space. When a system is too complicated for any one single space, however, we may be able to model it with multiple spaces at the same time. Product spaces integrate multiple spaces together by first combining their underlying sets and then their associated structures.
1 Product Sets
Product sets combine elements from multiple sets into composite elements. To develop this concept as cleanly as possible, we’ll first investigate how to combine elements from finite sets before considering the general case.
1.1 Finite Product Sets
Consider two finite sets, one with three elements,
One way to combine these two sets together is to collect their individual elements together into larger set,
In order to choose elements from both sets at the same time, we need to account for all of the possible pairs of elements from and . Placing the elements from before those from gives the pairs
The order of the component sets matters for this construction. Reversing the order of the component sets results in the pairs (Figure 1 (b)),

(a)

(b)
Figure 1: (a) The product set consists of all ordered pairs combining one element from and one element from . (b) Reversing the order of the pairs gives the product space .
By definition, each element of a binary product set is uniquely specified by one element of and one element of . Consequently, every variable taking values in the product set can be represented by an ordered pair of component variables,
Again, order is important here. A variable taking values in the product set is instead comprised of the component variables
1.2 General Product Sets
This construction immediately generalizes to any finite number of component sets. Given component sets indexed in a particular order
In theory, we could combine the component sets in any order. In practice, however, it’s easier to combine them in the order of their indices, relabeling the indices if we ever need a different ordering.
Because product elements are specified by multiple component elements, product sets are sometimes referred to as multivariate sets. The component sets themselves are referred to in a variety of different ways, including degrees of freedom and coordinates.
Conveniently, this construction generalizes immediately to a countably infinite number of component sets: every element of a countably-infinite product set is uniquely determined by an element from each of the countably-infinite component sets. Defining product sets from an uncountably infinite number of component sets requires just a little bit more care. To ensure that choosing an uncountably infinite number of elements at the same time is well-defined, we have to invoke the infamous axiom of choice.
1.3 Coordinating Indices
Many applications require working with multiple product variables at the same time. A common strategy for differentiating between these different variables is to label them with integer indices; for example we might write
In applications where indexing distinct product variables is useful, I will use a comma to separate the two types of indices, with the first index always labeling the different variables and the latter always labeling the different components,
1.4 Projection Functions
Conveniently, we can always recover the behavior of each the component elements from a given product element. Consider, for example, the component sets and , the binary product space , and the product variable .
Ignoring the second component variable leaves just , which specifies a unique element of . In other words, each element of defines a unique element of . We can formalize this relationship as a function between the two sets, \begin{alignat*}{6} \varpi_{1} :; & X_{1} \times X_{2} & &\rightarrow& ; & X_{1} & \ & (x_{1}, x_{2}) & &\mapsto& & x_{1} &. \end{alignat*}
At the same time, ignoring the first component variable leaves , which specifies a unique element of . This, in turn, defines a relationship between and which we can encode in another function, \begin{alignat*}{6} \varpi_{2} :; & X_{1} \times X_{2} & &\rightarrow& ; & X_{2} & \ & (x_{1}, x_{2}) & &\mapsto& & x_{2} &. \end{alignat*}
More generally, ignoring all but one of the component variables in
Projection functions are useful for compactly organizing the composite structure of product sets. We will be returning to them often.
2 Thinned Product Sets
The product set is not the only product set that we can construct from the component sets
More formally, any sequence of distinct component indices,
There are many ways of selecting from the available component sets, and hence many thinned product sets that we can construct in addition to the full product set. In order to distinguishing between all of the possibilities, especially when we are working with enough component sets that explicit enumeration is unfeasible, we’ll need to develop some careful notation.
2.1 Index Subsequences
Given an initial sequence, we can construct subsequences by removing some elements while maintaining the order of the remaining elements. Using this terminology, the component indices that define each thinned product set are subsequences of the sequence of all available component indices,
For example, from the initial sequence of component indices
I will denote the relationship between a sequence and a subsequence
Subsequences are basically subsets equipped with a persistent ordering. It should be no surprise, then, that we can generalize all of the usual subset operations to subsequences provided that we respect the ordering.
For example, we can define the intersection of two subsequences as the elements shared by both sequences in the appropriate order. Starting with the initial sequence
Similarly, we can define an ordered union of two subsequences as the appropriately ordered combination of their respective elements,
These operations allow us to define a variety of useful manipulations of a given sequence, such as partitions. Given an initial sequence , a sequence partition is a collection of subsequences
2.2 Multi-Index Notation
Given a collection of component sets, we can construct the full product set as well as a myriad of thinned product sets. Multi-index notation neatly organizes all of these possibilities by labeling each product set with the corresponding sequence of component indices.
Specifically, we denote the thinned product set defined by the sequence of component indices
The full product set built up from all available component indices is used so often that it deserves its own special notation. If we denote the sequence of all component indices by
Consider, for example, the component sets , , , , and . Using multi-index notation we can denote the full product set as
At the same time, if we select only the component indices
Multi-index notation is especially useful when working with multiple product sets at the same time. For instance, let’s return to our previous example and then introduce another subsequence of component indices,
The multi-index notation that I have defined here is a variant of the multi-index notation popular in physics. This notation, however, is not particularly common in probability theory or statistics. That said, I will be using is extensively in this book.
2.3 Generalized Projection Functions
By dropping the unused component elements, any element of the full product set defines an element of any thinned product set. For example, given the product element
The relationship between full product elements and thinned product elements defines generalized projection functions. Specifically, any subsequence of component indices
We can even construct projection functions between compatible thinned product sets. If
3 Product Subsets
Just as an element in each of the component sets defines a unique element from the corresponding product set, a subset in each of the component sets defines a unique subset of the product set. Not every subset of a product set, however, can be constructed in this way.
3.1 Rectangles
Specifying a subset in each of the component sets,
Many of the important subsets of a product set can be constructed in this way. The empty set of a product set, for example, is given by combining the component empty sets,
Not every subset of , however, is a product subset. More formally, the product power set is not the product of the component power sets,
On the product set , the product of finite intervals defines geometric rectangles (Figure 2). In analogy, more general product subsets are often referred to as rectangle subsets, even when the geometric intuition doesn’t quite carry over. Despite the geometric exaggeration, using “rectangle” instead of “product subset” is quite useful for avoiding confusion between product subsets and more general subsets of a product set.

(a)

(b)

(c)
Figure 2: (a) On the product set , geometric rectangles are defined by the product two component interval subsets and . (b) Different component interval subsets result in a diversity of rectangular shapes. (c) Rectangles are exceptional; most subsets of are not given by the product of two component interval subsets.
3.2 Cylinders
Rectangle, however, is by no means the only geometric analogy that we can abuse. Consider the product set . Here, the product of a circle and a linear interval defines a geometric cylinder (Figure 3 (a)).
Analogizing this geometry motivates a class of subsets on any product set. A generalized cylinder subset, or just cylinder subset for short, is defined to be a rectangle subset where all but a finite number of component subsets equals the full component set (Figure 3 (b)).

(a)

(b)
Figure 3: (a) On the product set , geometric rectangles, such as , are defined by products of angular intervals and linear intervals . (b) Geometric cylinders, such as , are a special case where the angular interval covers all of . The term “cylinder subset” is used more generally for any product subset where all but a finite number of component subsets equal the full component set.
Note that, by this definition, there is no strict difference between rectangle subsets and cylinder subsets on a product set with only a finite number of component sets. The distinction, however, becomes critical when considering product sets built up from an infinite number of component sets. Here, cylinder subsets ensure that only a finite number of components are actively contributing to the behavior of the product subset at any given time.
3.3 Cross Sections
When the component subsets are either full or atomic, with at least one component subset atomic, the resulting cylinder subset on the product space is known as a cross section. Cross sections model the behavior of a product set when we bind some, but not all, of the component sets to particular elements.

(a)

(b)
Figure 4: Cross sections are a special type of cylinder subset where each component subset is either full or atomic, and at least one is atomic. (a) On the product set , cross sections trace out vertical and horizontal lines, and (b) on the product set cross sections trace out circles and vertical lines.
For instance, binding doesn’t specify a point in the cross section . It does, however, restrict the possibilities to the cross section
The most awkward aspect of cross sections is compactly denoting which components have been constrained. I will often write cross sections symbolically as
Cross sections can also be written in terms of projection functions. Specifically, each level set of the projection function
Once we bind the component elements
In other words, every element of a cross section is uniquely identified with an element of the corresponding thinned product set. More formally, we have a natural bijection between the two,
The cross sections
While each cross section can be identified with a common thinned product set, the behavior within each cross section at any given time can, in general, be different. Consequentially, we have to be careful to respect the individuality of each cross section.
3.4 Rectangular Subset Operations
Most of the subset operations are not compatible with the composite structure of a rectangle subset.
The complement of a rectangle subset, for example, is not generally given by applying the complement operation to each of the component subsets (Figure 5),

(a)

(b)

(c)
Figure 5: (a) The construction of a rectangle subset from component subsets doesn’t commute with the complement operator. (b) Taking the product first and then applying the complement operator typically doesn’t result in another rectangular subset (c). Applying the complement operator to each component subset and then taking their product, however, does.
Similarly, the union of two rectangle subsets,

(a)

(b)

(c)
Figure 6: The union operator also doesn’t commute with (a) the construction of rectangle subsets. (b) Taking the product first and then applying the union operator usually results in a non-rectangle subset that is smaller (c) than the rectangular subset given by applying the union operator to each component subset and then taking their product.
The lone exception is the intersection of rectangle subsets, which can always be derived from the intersection of the component subsets (Figure 7),

(a)

(b)

(c)
Figure 7: Of the three subset operators, only the intersection operator commutes with (a) the construction of rectangle subsets. (b) Taking the product first and then applying the intersection operator always gives the same rectangle subset as (c) applying the intersection operator to each component subset and then taking their product.
An immediate consequence of these properties is that rectangle subsets are closed under intersections but not unions and complements. While closure is often useful in practice, in this case the lack of closure is actually quite useful. In particular, it allows us to build up non-rectangle subsets by applying set operations to rectangle subsets. We’ll come back to this point in Section 5.4.
4 Decomposing Product Sets
The composite structure of product sets allows us to slice and dice them into smaller pieces. Because the smaller pieces are often easier to directly manipulate, these decompositions can be extremely useful in practical applications.
4.1 Two Component Sets
Let’s start as simply as possibly by considering the two component sets and and their product .
4.1.1 Decomposition
Decomposing into the union of its atomic subsets,

(a)

(b)
Figure 8: (a) When we decompose into atomic subsets, the product set decomposes into a union of cross sections, , each of which behaves like a replication of the component set . (b) The product set can also be sliced in the other direction, resulting in the cross sections .
This procedure can also be applied to the second component set, resulting in the decomposition (Figure 8 (b))
4.1.2 Composition
Cross sections can also be used to construct product sets in the first place. Consider, for instance, starting with only the component set . Introducing a copy of for each defines the cross sections , and the union of these cross sections is exactly the product set . Equivalently, if we start with then we can construct by introducing a copy of for each .
Indeed, this construction is basically how ordered pairs are formally defined in the first place. In abstract set theory, an ordered pair is defined by an element from one of the component sets and a compatible, unordered pair of component elements,
4.1.3 Sequential Specification
These procedures offers some geometric insight into how we sequentially specify elements of a product set. Selecting a component element
Alternatively, we can select an element from the second component set,

(a)

(b)
Figure 9: A product set element can be sequentially constructed in two different ways. (a) Selecting restricts the possible elements to the cross section . (b) Alternatively, we can first select before selecting a point from the corresponding cross section, . Either way, we don’t have to consider the product set in its entirely.
4.2 Three Component Sets
Increasing the number of component sets dramatically increases the ways that we can slice and dice the resulting product set. Before jumping in more generally, let’s see what happens when we consider just one more component set to bring us to , , and .
4.2.1 Decomposition Into Binary Product Sets
Expanding the first component set into its atomic subsets induces the cross section decomposition
At the same time, expanding the other two component sets gives the alternative decompositions (Figure 10)

Figure 10: Isolating any one of its component sets decomposes the product set into replications of binary product sets. Slicing along , for example, decomposes the product set into the cross sections , each of which can be treated as a distinct copy of .
4.2.2 Decomposition Into Component Sets
We can also expanding binary products of component sets into atomic subsets, \begin{align*} X_{1} \times X_{2} &= \bigcup_{ (x_{1}, x_{2}) \in X_{1} \times X_{2} } { x_{1} } \times { x_{2} } \ X_{1} \times X_{3} &= \bigcup_{ (x_{1}, x_{3}) \in X_{1} \times X_{3} } { x_{1} } \times { x_{3} } \ X_{2} \times X_{3} &= \bigcup_{ (x_{2}, x_{3}) \in X_{2} \times X_{3} } { x_{2} } \times { x_{3} }. \end{align*} These yield three more decompositions of the full product set (Figure 11), \begin{align*} X_{1} \times X_{2} \times X_{3} &= \bigcup_{ (x_{1}, x_{2}) \in X_{1} \times X_{2} } { x_{1} } \times { x_{2} } \times X_{3} \ X_{1} \times X_{2} \times X_{3} &= \bigcup_{ (x_{1}, x_{3}) \in X_{1} \times X_{3} } { x_{1} } \times X_{2} \times { x_{3} } \ X_{1} \times X_{2} \times X_{3} &= \bigcup_{ (x_{2}, x_{3}) \in X_{2} \times X_{3} } X_{1} \times { x_{2} } \times { x_{3} }. \end{align*} We can slice three-component product sets into not only binary product sets but also individual component sets!

Figure 11: Isolating two of its component sets at the same time decomposes the product set into replications of the single, remaining component set. Jointly slicing along and , for example, dices the product set into the cross sections , each of which can be treated as a distinct copy of .
4.2.3 Recursive Decomposition
Some of these decompositions can be further refined. Consider, for instance, the decomposition
Equivalently, we can decompose into
4.2.4 Composition
Each of these decompositions motivates a different way to sequentially construct a product set.
For example, we can lift to by introducing a copy of for each element . Alternatively, we can start with and introduce copies of or start with and introduce copies of .
At the same time, if we start with then we can construct by introducing a copy of the third component set for each ordered pair . Starting with or requires replicating or , respectively.
Finally, we can build up the full product set from smaller pieces using more steps. We could, for instance, start with and then introduce a copy of for each initial element to define . At this point, we can replicate for each ordered pair . Each permutation of the component indices defines a unique construction path.
4.2.5 Sequentially Specifying Product Elements
Once again, these decompositions offer geometric insight into what is happening as we sequentially specify elements of the full product set. For example, we might specify an element of the first component set,
Alternatively, we might start by specifying the pair
We might also specify component elements one at a time (Figure 12), starting with

Figure 12: Specifying component elements one by one builds up an element of the product set sequentially. For instance, taking restricts the possible elements to the cross section . At this point, selecting an element restricts this cross section to the more refined cross section . Finally, taking selects a product set element from this cross section.
Across the last three examples, I have maintained the same order of the component sets. More generally, however, we can consider the component sets in any order. For example, \begin{align*} \tilde{x}{2} &\in X{2} \ \tilde{x} &\in X_{1} \times { x_{2} } \times X_{3}, \end{align*} \begin{align*} (\tilde{x}{2}, \tilde{x}{3}) &\in X_{2} \times X_{3} \ \tilde{x} &\in X_{1} \times { x_{2} } \times { x_{3} }, \end{align*} and \begin{align*} \tilde{x}{2} &\in X{2} \ \tilde{x}{3} &\in { \tilde{x}{2} } \times X_{3} \ \tilde{x} &\in X_{1} \times { x_{2} } \times { x_{3} } \end{align*} are all valid, but by no means exhaustive, ways to build up an element of a product set.
4.3 General Case
Once we go beyond a few component sets, the number of ways that we can decompose of the resulting product set is so large that the possibilities can be overwhelming. Fortunately, multi-index notation makes it straightforward to specify any particular decomposition.
4.3.1 Direct Decomposition and Composition
Given a subsequence of component indices,
Decomposing the thinned product set into its atomic elements,
At the same time, replicating for each element of lifts into the full product set . Heuristically, we can write this composition as
For example, if and , then we would first select an element
4.3.2 Recursive Decomposition and Composition
Decomposing into the cross sections
In particular, the subsequence of component indices
There are many ways that this recursive decomposition could proceed. Conveniently, each possibility is completely determined by a partition of the component indices into disjoint subsequences
First, we iteratively remove the component indices in each to define a sequence of thinning product sets, with
Working through this subsequence partition backwards also allows us to construct the full product set in total steps. Starting with , each iteration lifts the thinned product set into the slightly less-thinned product set by replicating .
For a concrete demonstration, consider and the sequence partition This gives \begin{align*}
\mathsf{j}{1}
&=
\mathsf{i}{1} , \vec{\cup} , \mathsf{i}{2} , \vec{\cup} ,
\mathsf{i}{3} , \vec{\cup} , \mathsf{i}_{4}
(1, 2, 3, 4, 5, 6, 7) \ \mathsf{j}{2} &= \mathsf{i}{2} , \vec{\cup} , \mathsf{i}{3} , \vec{\cup} , \mathsf{i}{4}
( 1, 3, 5, 6, 7 ) \ \mathsf{j}{3} &= \mathsf{i}{3} , \vec{\cup} , \mathsf{i}_{4}
( 1, 3, 6, 7 ) \ \mathsf{j}{4} &= \mathsf{i}{4}
( 3 ). \end{align*}
With four subsequences, this partition defines three stages of decomposition. The first stage decomposes \begin{align*} X^{ \mathsf{j}{1} } &= \bigcup{ x_{ \mathsf{j}{k + 1} } \in X^{ \mathsf{j}{k + 1} } } X^{ \mathsf{i}{k} } \times { x{ \mathsf{j}{k + 1} } } \ X^{1:7} &= \bigcup{ x_{ ( 1, 3, 5, 6, 7 ) } \in X^{ ( 1, 3, 5, 6, 7 ) } } X^{ (2, 4) } \times { x_{ ( 1, 3, 5, 6, 7 ) } }. \end{align*} Then, at the second stage, we decompose \begin{align*} X^{ \mathsf{j}{2} } &= \bigcup{ x_{ \mathsf{j}{3} } \in X^{ \mathsf{j}{3} } } X^{ \mathsf{i}{2} } \times { x{ \mathsf{j}{3} } } \ X^{(1, 3, 5, 6, 7)} &= X^{ (5) } \times { x{ (1, 3, 6, 7) } }. \end{align*} Lastly, we decompose \begin{align*} X^{ \mathsf{j}{3} } &= \bigcup{ x_{ \mathsf{j}{4} } \in X^{ \mathsf{j}{4} } } X^{ \mathsf{i}{3} } \times { x{ \mathsf{j}{4} } } \ X^{(1, 3, 5, 6, 7)} &= X^{ (1, 6, 7) } \times { x{3} }. \end{align*}
At the same time, starting with
5 Product Structure
In order to elevate product sets to product spaces, we need to equip products with structure. Conveniently, product structure can often derived from component structures. Moreover, this constructions is often reasonably straightforward.
In this section I will always assume the ambient product set with component sets .
5.1 Product Orderings
If each component set is equipped with a strict ordering, then we can unambiguously define a product variable to be smaller than another product variable if all of the component elements in are smaller than all of the corresponding component elements in (Figure 13 (a)). In other words, if and only if

(a)

(b)
Figure 13: Strict orderings on each component set define only a partial ordering over product sets. (a) The element is unambiguously larger than the element because both and . (b) When the component orderings disagree, here but , we cannot order the two elements and instead have to treat them as equivalent with respect to ordering.
On the other hand, if only some of the component elements in are smaller than the corresponding component elements in , with the other larger, then the comparison between the two product elements will be ambiguous (Figure 13 (b)). Consequently, a strict ordering on the component sets does not fully define a strict ordering on the product set.
That said, we can use strict component orderings to define a partial ordering of the product set, where any two product elements with mixed component orderings are defined to be equivalent. In the same way, we can use partial component orderings to define a partial ordering of the product set. Either way, we are generally limited to partial product orderings.
5.2 Product Algebras
When each component set is equipped with an individual algebraic operation, we can define a corresponding product operation by applying these component-wise operations at the same time. For instance, if each component set is equipped with a binary operation \begin{alignat*}{6} \cdot_{i} :; & X_{i} \times X_{i}& &\rightarrow& ; & X_{i} & \ & x_{i}, x'{i} & &\mapsto& & x{i} \cdot_{i} x'_{i} &, \end{alignat*} then we can construct a product operation as
In general, product operations acquire any properties that are shared by all of the component operations. For example, if all of the component operations are commutative, then the product operation will also be commutative. Similarly, if all of the component operations are unital with identity elements , then the product operation will also be unital with the composite identity element
5.3 Product Metrics
Product metrics can be constructed by summing over the outputs of component metrics. More formally, if each component set is equipped with a metric \begin{alignat*}{6} d_{i} :; & X_{i} \times X_{i}& &\rightarrow& ; & \mathbb{R}^{+} & \ & x_{i}, x'{i} & &\mapsto& & d(x{i}, x'{i}) & \end{alignat*} then we can define a product metric as \begin{alignat*}{6} d :; & X^{1:I} \times X^{1:I}& &\rightarrow& ; & \mathbb{R}^{+} & \ & x, x' & &\mapsto& & \sum{i = 1}^{I} d(x_{i}, x'_{i}). & \end{alignat*}
This construction ensures that the product metric satisfies all of the necessary properties of a metric. For example, the product distance vanishes if and only if all of the individual component distances vanish. This requires all of the component elements to be equal, which implies that the product elements are also equal. In other words, the product metric returns zero if and only if the two input product elements are the same, as required for a metric.
On the other hand, two input product elements are distinct if and only if at least one of the component element is distinct. In this case, at least one of the component distances will be greater than zero. Consequently, the summed component distances will be non-zero whenever the input product elements are distinct.
Symmetry of the product metric follows the commutativity of the component metrics, \begin{align*} d(x, x') &= \sum_{i = 1}^{I} d(x_{i}, x'{i}) \ &= \sum{i = 1}^{I} d(x'{i}, x{i}) \ &= d(x', x). \end{align*} Likewise, for any three product elements we always have a triangle inequality, \begin{align*} d(x, x'') &= \sum_{i = 1}^{I} d(x_{i}, x''{i}) \ &\le \sum{i = 1}^{I} d(x_{i}, x'{i}) + d(x'{i}, x''{i}) \ &\le \sum{i = 1}^{I} d(x_{i}, x'{i}) + \sum{i = 1}^{I} d(x'{i}, x''{i}) \ &\le d(x, x') + d(x', x''). \end{align*}
5.4 Product Topologies
When every component set is equipped with a component topology , we can define open component subsets . The product of any combination of these open component subsets,
By definition, any finite collection of open subsets in ,
Unfortunately, the union of any potentially-open product subsets will not, in general, be another potentially-open product subset. Combining the potentially-open product subsets with all of their unions, however, defines a collection of subsets that satisfies all of the properties of a topology. Because it is generated by rectangle subsets, this topology is known as the box topology.
When working with a finite number of component sets, the box topology inherits the nice features shared by all of the component topologies. Moreover, every projection function that maps into a finite thinned product set is continuous with respect to this topology.
These useful properties of the box topology, however, do not generalize to an infinite number of component sets. Conceptually, the box topology is too large to be productive once we move beyond a finite number of component sets.
Fortunately, we can construct a topology that remains well-behaved on any product set by refining the box topology. Instead of considering arbitrary products of open component subsets, we consider instead cylinder subsets built up from open component subsets. Including all of the finite intersections and arbitrary unions that we can generate from these open cylinder subsets defines what is conventionally referred to as a product topology.
If the number of component sets if finite, the box and product topologies are the same. When the number of component sets reaches infinity, however, the product topology becomes strictly smaller than the box topology. This smaller topology makes the product space more rigid, ensuring that for instance the projection functions remain continuous.
6 Transforming Product Spaces
We can always transform product spaces directly with monolithic maps that ignore any component structure. These functions map an entire input product set to an arbitrary output set, \begin{alignat*}{6} f :; & X^{1:I} & &\rightarrow& ; & Y & \ & (x_{1}, \ldots, x_{i}, \ldots, x_{I}) & &\mapsto& & y = f(x_{1}, \ldots, x_{i}, \ldots, x_{I}) &. \end{alignat*}
For example, algebraic operations can be interpreted as functions from the input product set to the output set , \begin{alignat*}{6} f :; & X \times X & &\rightarrow& ; & X & \ & (x_{1}, x_{2}) & &\mapsto& & x = f(x_{1}, x_{2}) &. \end{alignat*} Metrics can also be interpreted as functions from that same input product set, \begin{alignat*}{6} d :; & X \times X & &\rightarrow& ; & [0, \infty] & \ & (x_{1}, x_{2}) & &\mapsto& & d(x_{1}, x_{2}) &. \end{alignat*}
The classification of these functions, and the construction of pushforward and pullback functions, follows exactly the same as for functions with general input spaces. We can say much more, however, about functions that naturally harmonize with the component structure of an input product space.
6.1 Component Transformations
Transformations between two product spaces can always be decomposed into simpler transformations. Any function between two product spaces \begin{alignat*}{6} f :; & X^{1:I} & &\rightarrow& ; & Y^{1:J} & \ & (x_{1}, \ldots, x_{i}, \ldots, x_{I}) & &\mapsto& & (y_{1}, \ldots, y_{j}, \ldots, y_{J}) = f(x_{1}, \ldots, x_{i}, \ldots, x_{I}) & \end{alignat*} is completely determined by functions that map the input product set into each of the individual output component sets, \begin{alignat*}{6} f_{j} :; & X^{1:I} & &\rightarrow& ; & Y_{j} & \ & (x_{1}, \ldots, x_{i}, \ldots, x_{I}) & &\mapsto& & y_{j} = f_{j}(x_{1}, \ldots, x_{i}, \ldots, x_{I}) &. \end{alignat*} These component functions are given by composing with each of the projection functions on the output space,
In general, these component functions mix the input components together to inform the behavior in each output component space. Some functions, however, allow each of the input component spaces to inform only a single output component space. More formally, if the input product space and output product space are built up from the same number of component spaces , then some functions can be decomposed into component functions that map only one input component space into one output component space at a time, \begin{alignat*}{6} f_{i} :; & X_{i} & &\rightarrow& ; & Y_{i} & \ & x_{i} & &\mapsto& & y_{i} = f_{i}(x_{i}) &. \end{alignat*} In other words, these component-preserving functions transform each component independently of the others.
One nice feature of component-preserving transformations is that they preserve the orientation of grids defined from any component metric structure. For instance, the function \begin{alignat*}{6} f :; & \mathbb{R} \times \mathbb{R} & &\rightarrow& ; & \mathbb{R} \times \mathbb{R} & \ & (x_{1}, x_{2}) & &\mapsto& & (y_{1}, y_{2}) = (x_{1}^{\frac{3}{2}}, x_{2}^{\frac{3}{2}}) & \end{alignat*} transforms into independently of the behavior of , and transforms into independently of the behavior of . While neither of these component transformations are isometries, the rectangular structure of the metric-informed grid is preserved (Figure 14 (a)).
On the other hand, the function \begin{alignat*}{6} f :; & \mathbb{R} \times \mathbb{R} & &\rightarrow& ; & \mathbb{R} \times \mathbb{R} & \ & (x_{1}, x_{2}) & &\mapsto& & (y_{1}, y_{2} = (x_{1} + x_{2}, x_{1} - x_{2}) & \end{alignat*} mixes the input components and together, skewing the product structure in the process. Consequently, grids built up from the component metric structures on the input and output spaces will appear warped relative to each other (Figure 14 (b)).

(a)

(b)
Figure 14: Maps between metric product spaces may or may not preserve the individual components, and this has consequences for how metric-informed grids transform. (a) Maps between metric product spaces that do preserve the product structure transform rectangular grids into rectangular grids. (b) On the other hand, maps that mix the components transform rectangular grids into grids that appear rotated, skewed, or otherwise warped.
The behavior of component-preserving functions is completely determined by the behavior of the component functions. For example, a component-preserving function is injective, surjective, or bijective if and only if all of the component functions are injective, surjective, or bijective.
6.2 Partial Evaluation
Fully evaluating a function on a product space requires specifying a point in every component space. For instance, in order to evaluate the function
Providing only one component point leaves an empty slot in the input product space that we need to fill in order to complete the evaluation. For example, is missing a point in and is missing a point in . That empty slot, however, defines a relationship between the missing inputs and the output space.
Specifically, implicitly defines a function that maps input points in the cross section to output points in . Similarly, implicitly defines a function that maps input points in the cross section to output points in .
More generally, consider the subsequence of component indices
If we identify the cross sections with corresponding thinned product space,
This procedure is generally known as partial evaluation, although in computer science it is often referred to as Currying. Besides the multi-index notation I use here,
Partial evaluation of functions is often taken for granted in practical applications. Explicitly acknowledging it, however, can help us better understand less obvious constructions.
For instance, consider a space equipped with a binary addition operator \begin{alignat*}{6}
- :; & X \times X& &\rightarrow& ; & X & \ & x_{1}, x_{2} & &\mapsto& & x_{1} + x_{2} &. \end{alignat*} Partially evaluating this function on the first input component effectively defines a function \begin{alignat*}{6} t_{\tilde{x}{1}} :; &X& &\rightarrow& ; & X & \ & x{2} & &\mapsto& & \tilde{x}{1} + x{2} &. \end{alignat*} This new function translates each point in by . Unsurprisingly, is referred to as a translation operator.
Similarly, if we have a space equipped with a binary multiplication operator \begin{alignat*}{6} \cdot :; & X \times X& &\rightarrow& ; & X & \ & x_{1}, x_{2} & &\mapsto& & x_{1} \cdot x_{2} &, \end{alignat*} then partial evaluation effectively defines a function \begin{alignat*}{6} s_{\tilde{x}{1}} :; &X& &\rightarrow& ; & X & \ & x{2} & &\mapsto& & \tilde{x}{1} \cdot x{2} &. \end{alignat*} This new function scales each point in by . Fittingly, is often referred to as a scaling operator.
In many applications, translations and scalings appear to be intuitive. Partial evaluation allows us to formalize that intuition, which can then helps us recognize its limitations and consequences. For example, translation isn’t well-defined on a space that isn’t equipped with the right algebraic structure!
7 Prototypical Product Spaces
Most of the spaces that we encounter in practical applications are product spaces built up from the prototypical spaces that we reviewed in Chapter 2, Section 2. In particular, these product spaces combine finite sets, integers, and real lines together. That said, there are a few product spaces worth particular note.
7.1 Power Spaces
Often we are interested not in any single point of a space , but rather multiple points at the same time. The selection of distinct points from the same space can be modeled by replicating the space times and then using those replications as components of a product space,
We have already encountered this construction in a few places. For example, we defined binary algebraic operator over the space as mapping two points in into a single point in . That input space of pairs of points was denoted , which is just a binary power space with a separate copy of for each input.
Similarly, sequences of points from a given space,
One potential difficulty that can arise when working with power spaces is distinguishing between the different copies of the base space that form the components. In particular, any notation that might differentiate between the individual copies a single space, such as ticks or integer indices, can also be confused as defining different spaces entirely. Depending on the context, for instance, might be used to denote both a product space comprised of two different component spaces or power space comprised of two copies of the same base space.
In practice, the most robust approach is typically to label each component space with an integer index and then explicitly communicate which, if any, component spaces are identical.
7.2 Multivariate Real Numbers
Combining real lines together defines the multivariate real numbers,
The multivariate real numbers inherit the identity crisis of the real lines from which they are built. If we take the rigid real line perspective, for instance, then there will be infinitely many multivariate real numbers: different choices of component ordering, algebraic, and metric structures define distinct product spaces.
On the other hand, if we assume the flexible real line perspective, then then multivariate real numbers will correspond to a single, flexible space. In this case, each distinct configuration of the component real lines defines a different configuration of the corresponding product space. Following the real line terminology, I will refer to these as rigid real spaces and flexible real spaces, respectively.
To visually summarize the structure of a real space, we can extend metric grids defined over the component spaces across the other component spaces and then overlay them to form a rectangular mesh (Figure 15).

Figure 15: Extending component grids into the product space defines a rectangular mesh that visually communicate the product metric structure. Here is represented by a two-dimensional mesh.
As we discussed in Section 3.1, the real space is the one space where rectangular subsets actually correspond to Euclidean rectangles.
8 Conclusion
The construction of product spaces defines a systematic way to work with multiple spaces at the same time. Because product spaces define the sophisticated spaces we need for many practical applications, we will need to be comfortable with their structure and manipulation.
Working with more than a few component spaces does require some careful organization. In some cases, we can explicitly enumerate each component set with distinct variable names. In others, we can fall back on more flexible tools like multi-index notation.
Acknowledgements
I thank Alexander Noll, Pietro Monticone, Léo Burgund, and jd for helpful comments.
A very special thanks to everyone supporting me on Patreon: Adam Fleischhacker, Adriano Yoshino, Alan Chang, Alessandro Varacca, Alexander Bartik, Alexander Noll, Alexander Petrov, Alexander Rosteck, Anders Valind, Andrea Serafino, Andrew Mascioli, Andrew Rouillard, Andrew Vigotsky, Angie_Hyunji Moon, Ara Winter, Austin Rochford, Austin Rochford, Avraham Adler, Ben Matthews, Ben Swallow, Benjamin Glemain, Bradley Kolb, Brynjolfur Gauti Jónsson, Cameron Smith, Canaan Breiss, Cat Shark, Charles Naylor, Chase Dwelle, Chris Zawora, Christopher Mehrvarzi, Chuck Carlson, Colin Carroll, Colin McAuliffe, Cruz, Damien Mannion, Damon Bayer, dan mackinlay, Dan Muck, Dan W Joyce, Dan Waxman, Dan Weitzenfeld, Daniel Edward Marthaler, Daniel Rowe, Darshan Pandit, Darthmaluus , David Burdelski, David Galley, David Humeau, David Wurtz, dilsher singh dhillon, Doug Rivers, Dr. Jobo, Dr. Omri Har Shemesh, Ed Cashin, Ed Henry, Edgar Merkle, edith darin, Eric LaMotte, Erik Banek, Ero Carrera, Eugene O’Friel, Felipe González, Fergus Chadwick, Finn Lindgren, Florian Wellmann, Francesco Corona, Geoff Rollins, Greg Sutcliffe, Guido Biele, Hamed Bastan-Hagh, Haonan Zhu, Hector Munoz, Henri Wallen, hs, Hugo Botha, Håkan Johansson, Ian Costley, Ian Koller, idontgetoutmuch, Ignacio Vera, Ilaria Prosdocimi, Isaac Vock, J, J Michael Burgess, Jair Andrade, James Hodgson, James McInerney, James Wade, Janek Berger, Jason Martin, Jason Pekos, Jason Wong, Jeff Burnett, Jeff Dotson, Jeff Helzner, Jeffrey Erlich, Jesse Wolfhagen, Jessica Graves, Joe Wagner, John Flournoy, Jonathan H. Morgan, Jonathon Vallejo, Joran Jongerling, Joseph Despres, Josh Weinstock, Joshua Duncan, Joshua Griffith, Josué Mendoza, JU, Justin Bois, Karim Naguib, Karim Osman, Kejia Shi, Kevin Foley, Kristian Gårdhus Wichmann, Kádár András, lizzie , LOU ODETTE, Marc Dotson, Marcel Lüthi, Marek Kwiatkowski, Mark Donoghoe, Mark Worrall, Markus P., Martin Modrák, Matt Moores, Matthew, Matthew Kay, Matthieu LEROY, Maurits van der Meer, Merlin Noel Heidemanns, Michael DeWitt, Michael Dillon, Michael Lerner, Mick Cooney, Márton Vaitkus, N Sanders, Name, Nathaniel Burbank, Nic Fishman, Nicholas Clark, Nicholas Cowie, Nick S, Nicolas Frisby, Octavio Medina, Ole Rogeberg, Oliver Crook, Olivier Ma, Pablo León Villagrá, Patrick Kelley, Patrick Boehnke, Pau Pereira Batlle, Peter Smits, Pieter van den Berg , ptr, Putra Manggala, Ramiro Barrantes Reynolds, Ravin Kumar, Raúl Peralta Lozada, Riccardo Fusaroli, Richard Nerland, RLW, Robert Frost, Robert Goldman, Robert kohn, Robert Mitchell V, Robin Taylor, Ross McCullough, Ryan Grossman, Rémi , S Hong, Scott Block, Scott Brown, Sean Pinkney, Sean Wilson, Seth Axen, shira, Simon Duane, Simon Lilburn, Srivatsa Srinath, sssz, Stan_user, Stefan, Stephanie Fitzgerald, Stephen Lienhard, Steve Bertolani, Stone Chen, Susan Holmes, Svilup, Sören Berg, Tao Ye, Tate Tunstall, Tatsuo Okubo, Teresa Ortiz, Thomas Lees, Thomas Vladeck, Tiago Cabaço, Tim Radtke, Tobychev , Tom McEwen, Tony Wuersch, Utku Turk, Virginia Fisher, Vitaly Druker, Vladimir Markov, Wil Yegelwel, Will Farr, Will Tudor-Evans, woejozney, Xianda Sun, yolhaj , yureq , Zach A, Zad Rafi, and Zhengchen Cai.
License
The text and figures in this chapter are copyrighted by Michael Betancourt and licensed under the CC BY-NC 4.0 license: