Here is a brief recap of Week 1. We defined combinatorics to be the branch of mathematics which studies the category whose objects are finite sets and whose morphisms are functions. We noted that a function
can be encoded as a matrix over
This is done by choosing a labeling
of
a labeling
of
, and building the
matrix
with entries
In data science, the matrix is referred to as a one-hot encoding of the function
The one-hot encoding of a function depends on a labeling of the points of its domain and codomain: a relabeling of
will cause
to be right-multiplied by an
permutation matrix, while a relabeling of
requires us to left-multiply
by an
permutation matrix. Also note that if
and
then
So we see that combinatorics can be encoded in terms of structured matrices defined over
We next defined linear algebra to be the study of the category whose objects are finite-dimensional complex vector spaces equipped with a scalar product, which we refer to these as Hilbert spaces, and whose morphisms are linear transformations between Hilbert spaces. We defined the quantization functor
which sends each finite set to the Hilbert space
of functions
equipped with the pointwise operations and scalar product
The Hilbert space has an orthonormal basis consisting of the elementary functions
Any function can be written as a linear combination of elementary functions,
where
Here we noted an alternative notation favored by algebraists: we simply write instead of
, so that
becomes the space of formal
-linear combinations of elements of
This saves us one layer of indexing, and it is a good notation for many purposes. When thought of in this way, is referred to as the free vector space on the set
and
sits inside
as an orthonormal basis. We will mostly use this formal notation going forward, although in other contexts (mostly analysis) the original functional notation is a better fit.
It remains to stipulate how transports morphisms in
to morphisms in
i.e. how
transforms functions between finite sets into linear transformations between Hilbert spaces. The recipe is so simple that it looks tautological:
sends a given function
to the transformation
defined by
Thus, if we choose an ordering of
and an ordering
of
so that
and
become ordered orthonormal bases of
and
, the matrix of the linear transformation
relative to these bases is simply the one-hot encoding of the original function
The reason that this apparently tautological translation of a set function into a linear transformation
is useful is that it gives us many, many more matrix representations. Indeed, the only operations we could perform on the one-hot encoding
are permuting its rows and columns. However, for the linear transformation
we can multiply on the left and/or right by arbitrary invertible matrices to get new representations of the same function which are more advantageous and reveal properties of the function
which are not apparent from the one-hot encoding. The fact that this can be done in a systematic way is the Singular Value Decomposition, which is in some sense the main theorem of Math 202A: it tells us we can always find orthonormal bases
and
such that the matrix of
is real diagonal. The bases
and
are called the left singular vectors and the right singular vectors of
respectively, and the nontrivial entries of the corresponding diagonal form of
are called its singular values. In fact, this powerful result holds not just for transformations between Hilbert spaces which are functorial images of finite set functions, but for arbitrary linear transformations.
Next week, after a basic review of Hilbert spaces, we will move towards formulating and proving the SVD. In fact, for such a powerful result the proof is quite simple and straightforward, and in the case of linear transformations which come from set functions as above it has a nice interpretation in terms of bipartite graphs which is a good aid to intuition. We finish this week by introducing one more functor which transports us from the combinatorial category into a different part of mathematics.
Let be any set, not necessarily finite. Recall that a binary relation on
is a subset of
the Cartesian square of
This is a very general concept, and the binary relations that arise in practice are more structured. For example, a function
is a special type of binary relation on
Also familiar are equivalence relations. Formally, we say that
is an equivalence relation if it is:
- Reflexive: for all
we have
- Symmetric: for all
we have
iff
- Transitive: if
are such that
and
, then
The simplest and most obvious example of an equivalence relation is equality,
A different type of equivalence relation generalizes our intuitive notion of inequality. A partial on is an relation
which is reflexive and transitive, but antisymmetric rather than symmetric:
and
iff
For partial orders, the notation
is used to indicate that
because it suggestively makes the antisymmetry into
A set equipped with a partial order
is called a partially ordered set, often abbreviated to poset. If
and
are posets, a function
is said to be order-preserving if
We can now give a categorical definition of one more branch of mathematics.
Definition 3.1. Order theory is the study of the category whose objects are posets and whose morphisms are order-preserving functions.
We now define a functor
as follows. First, for any set we declare
so is the power set of
We equip
with the partial order defined by set containment,
If I was allowed to assign problems on Fridays, I would ask you to verify that the above really is a partial order; this is easy but worth doing. In order for to be a functor, it remains to stipulate how it acts on morphisms in
i.e. how it converts a function
between sets into an order-preserving function
. As with the functor
, the recipe is extremely simple: if
is a subset of
we simply define
If not for the Friday ban I would ask you to verify that is an order-preserving function, but I don’t want to risk a civil rights case.
In fact, is a special kind of poset in which every pair of elements has both a least upper bound and a greatest lower bound defined by
A poset equipped with a sup and an inf is called a lattice. We define the category to be the full subcategory of
whose objects are lattices, so that in fact
Next week, we will see an analogous functor from vector spaces to lattices.