Modified: March 16, 2022
matrix notation
This page is from my personal notes, and has not been specifically reviewed for public consumption. It might be incomplete, wrong, outdated, or stupid. Caveat lector.Notation for Matrix Multiplication
Let and . Then
just by the definition of matrix multiplication (the summation over is performing the dot product of the th row of with the th column of ). Furthermore, if we have then
and it's easy to see by induction how this pattern generalizes: we can write a product of matrices as a sum over the product of their entries, where the sum is taken over all of the "inner" indices.
Function Composition
Say we have matrices and . We can decompose
for some sets of vectors that exist by the isomorphism between and tensor products (i.e., the vectors correspond to the pure tensor decomposition of , and similarly for ). Then we can write the composite map as
where is the trace of the matrix . That last fact follows from the general relation
which holds since the th entry if is , so the sum of the diagonal is the sum over of , which is exactly the inner product. This shows very cleanly a relationship between outer and inner products by way of the trace. We then used this to express the composition of in terms of the trace of an (implicit) operation on the in-between space .
Vector/Matrix Notation
It seems like a good notational convention in general to think of as equivalent to , i.e., to transpose a vector is to move from thinking of it as a (column) vector to thinking of it as a linear functional, expressed as a row vector. So when we write design matrices , it makes sense to think of the data points as columns, since they are explicitly vectors rather than functionals. Then has the nice interpretation as dot products (generalized from ordinary vectors), and the covariance similarly has an interpretation in terms of outer products.