Linear Algebra with Frames
I have a bunch of notations I like to use for linear algebra and vector calculus which are at this point scattered across various notes and posts. I wanted to consolidate them in one place so that I can refer to them later.
I am pretty sure that the ideas in here are useful and that various parts of math and physics would benefit from incorporating them. However, I’m not sure I have figured out the best ways of stating them all yet. Probably I will make some edits to this over time as I settle on better and less-confusing ways of writing things.
(Most of this crystallized for me a few years ago, but I got so “blocked” on getting it exactly right that I lost motivation and put the whole thing away every time I tried to write it up. Recently I decided it would be better to just publish the broken version so I can stop having it hanging over me, and I can fix it later if I figure it out, or if somebody clues me into what I’m missing.)
All vector spaces considered are finite-dimensional and over \(\bb{R}\) and come with the standard Euclidean dot product. Much of this works without those restrictions but it’s good to start with something easy to visualize. The linear span of vectors or vector spaces is denoted \(\< \x, \y, \ldots \> \equiv \span(\x, \y, \ldots)\).
1. Projections
The projection operator (or ‘projector’) for a vector space \(X\) is written
\[I_X\]I prefer the symbol \(I\) over the usual \(P\) because these operators are exactly the identity transformation for the spaces they project onto. This is why the idempotency condition \(P^2 = P\) which is often taken as a definition for projections holds—because identities are inherently idempotent:
\[I_X^2 = I_X\]Given any basis for a space \(X\), the matrix representation of \(I_X\) will look like an identity operator. For example if \(X = \< \x, \y\> \sub \bb{R}^3 = \< \x, \y, \z \>\) and \(I_X\) acts on a vector \(\b{a} = a_x \x + a_y \y + a_z \z\), then1
\[\begin{aligned} I_{X} \b{a} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} a_x \\ a_y \\ a_z \end{pmatrix} = \begin{pmatrix} a_x \\ a_y \\ 0 \end{pmatrix} \end{aligned}\]In the case where the vector space labeled by a projection is one dimensional, like \(\<\b{x} \>\), we write just the non-bolded symbol for subspace instead for brevity:
\[I_x \equiv I_{\< \x\>}\]If the vector space is spanned by multiple basis vectors which have letter names, like \(\<\x, \y\>\), then we also write the list of all of these as the subscript to label the space:2
\[I_{xy} \equiv I_{\< \x, \y \>}\]If a vector space decomposes into subspaces \(V = X \oplus Y\), then its projections also decompose:
\[I_V = I_X + I_Y\]For example, if \(V = \bb{R}^3\) with its \((\x, \y, \z)\) basis then we can write
\[\begin{aligned} I_{xy} &= I_x + I_y \\ I_{xyz} &= I_{xy} + I_z = I_x + I_y + I_z \\ \end{aligned}\]Vector projections onto a subspace are shorthanded by writing the subscript on the vector itself:
\[\b{a}_X = I_X \b{a}\]Decompositions of a vector space and its projectors carry forward onto vector projections:
\[\b{a}_{V} = \b{a}_{X \oplus Y} = (I_X + I_Y) \b{a} = \b{a}_X + \b{a}_Y\]In \(\bb{R}^3\), all of these decompositions are equivalent:
\[\b{a} = \b{a}_{xyz} = \b{a}_{xy} + \b{a}_z = \b{a}_x + \b{a}_y + \b{a}_z\]Given a vector subspace \(X \sub V\), there is an orthogonal subspace \(X_{\perp}\) (which I pronounce “\(X\)-perp”) such that \(V = X \oplus X_{\perp}\). The projection onto this complement is
\[I_{\perp X} = I - I_X\]I write \({\perp} X\) instead of \(X_{\perp}\) in subscripts just because it is easier to read as the symbols become smaller.3 Note, the word ‘orthogonal’ here technically requires an inner product, but if one is not available you can call it the complementary subspace instead; the idea is the same.
The projection of a vector onto this orthogonal subspace is the rest of the vector after removing the projection onto \(X\):
\[\b{a}_{\perp X} = I_{\perp X} = (I - I_X) \b{a} = \b{a} - \b{a}_X\]A vector space \(V\) which contains \(X\) generically factors into \(V = X \oplus X_{\perp}\), and each of its vectors can be split according to this factorization4
\[\b{a} = I_V \b{a} = (I_X + I_{\perp X}) \b{a} = \b{a}_X + \b{a}_{\perp X}\]When we write a vector \(\b{a}\) without any subscript, we usually ambiently know that it is supposed to be an element of some explicit vector space, \(\b{a} \in V\). Sometimes it is elegant to regard this as a shorthand for explicitly projecting it into that space:
\[\b{a} \stackrel{\text{means?}}{=} \b{a}_V = I_V \b{a}\]This doesn’t affect any results, but it can be a nice way to think about things. In particular it implies the interpretation that \(\b{a}\) really refers to what we know about \(\b{a}\), based on the space in which we are viewing it, but that perhaps there is more data in there which we are missing by restricting it to this space.
Similarly, the symbol \(I\) with no subscript at all means “the identity on the ambient space \(V\)”, but we can think of it as a shorthand for an explicit \(I_V\). A scalar \(1\) is often interpreted as a sort of “identity on everything” operation as well; I tend to think that this is a mistake, and we should think of all scalars as being scoped to some particular space that they act on. But this is a philosophical distinction and mostly should not affect anything.5
2. Vector Division
Projectors like \(I_{xy}\) and \(I_V\) are linear transformations, which look like the identity on their respective subspaces. Their matrix representations are sparse: they have \(1\)s along the diagonal corresponding to the subspace and \(0\)s elsewhere. A very compact way of writing linear transformations of this form is by listing only the terms that are nonzero. My preferred way of writing this is as vector division:
\[\begin{aligned} I_x &= \frac{\x}{\x} \\ I_y &= \frac{\y}{\y} \\ I_{xy} &= I_x + I_y = \frac{\x}{\x} + \frac{\y}{\y} \end{aligned}\]The rule for interpreting an inverse vector follows these rules:
- Fractions do not cancel with themselves. Instead \(\x / \x\) is interpreted as a shorthand for \(\x \o \x^{-1}\).
- \(\x^{-1}\) or \(\frac{1}{\x}\) means \(\frac{\x}{\| \x \|^2}\), the unique vector in \(\< \x \>\) which has \(\x^{-1} \cdot \x = 1\).
- The juxtaposition of an inverse vector on the left with a numerator or bare vector on the right implies a dot product: \(\frac{1}{\x} \b{a} = \x^{-1} \b{a} \equiv \frac{\x}{\| \x \|^2} \cdot \b{a} = a_x\). No contraction occurs if a denominator is on the left of a numerator.
The implication of these rules is that a denominator \(\x\) selects only the numerator \(\x\)s from the thing it acts on:
\[\begin{aligned} I_x \b{a} &= \frac{\x}{\x} (a_x \x + a_y \y + a_z \z) \\ &= a_x \frac{\x}{\x} \x + a_y \frac{\x}{\bcancel{\x}} \bcancel{\y} + a_z \frac{\x}{\bcancel{\x}} \bcancel{\z} \\ &= a_x \x \\ &= \b{a}_x \\ I_{xy} \b{a} &= (\frac{\x}{\x} + \frac{\y}{\y}) (a_x \x + a_y \y + a_z \z) \\ &=a_x \x + a_y \y \\ &= \b{a}_{xy} \end{aligned}\]Hopefully it is clear that this is a rather useful way of writing things. Let me emphasize, though, that these notations to be understood as shorthands for explicit operations on the underlying tensors. \(\x/\x\) does not cancle out to give \(1\) because it is such a common object that it’s convenient to regard it as a tensor, and \(\x^{-1} \b{a}\) implies a dot product because it’s useful, not because we are defining a canonical way of doing algebra that cancels inverses but not other terms. We are always free to insert dot and tensor product symbols to make more complicated expressions like \((\x \o \y^{-1} \o \z) \cdot \b{a}\) unambiguous.
There is nothing stopping one from writing higher-degree tensors with more fractions, like \(\Gamma = \x \y \frac{1}{\x}\), but the division notation stops be as helpful at that point because there is not a good way to do anything with the term in the middle.
This definition of \(1/\x\) is a pseudoinverse of the linear transformation given by \(\x \cdot: \b{a} \mapsto \x \cdot \b{a}\), evaluated at \(1\). Being a pseudoinverse it is nonzero the image (the columnspace) of \(\x \cdot\) and \(0\) elsewhere (the cokernel).
\[\begin{aligned} \frac{1}{\x} \cdot \x &= 1 \\ \frac{1}{\x} \cdot \y &= 0 \\ \frac{1}{\x} \cdot \z &= 0 \\ \end{aligned}\]The job of division by a vector \(\x\) is to extract the \(\x\)-component of the vector it acts on,
\[\frac{1}{\x} \b{a} = \frac{1}{\x}(a_x \x + \b{a}_{\perp x}) = a_x\]Multiplying by \(\x\) again therefore gives the vector projection again
\[\b{a}_x = \frac{\x}{\x} \b{a} = \frac{\b{a} \cdot \x}{\| \x \|^2} \x\]These definition of the scalar and vector projections are the most useful ones. Usually the scalar projection is defined as the component of \(\b{a}\) along the unit vector \(\hat{\x} = \x / \| \x \|\) instead,
\[\proj_{x} (\b{a}) \? \b{a} \cdot \frac{\x}{\| \x \|}\]such that \(\b{a}_x = a_{\hat{x}} \hat{\b{x}}\), and it gives the “shadow” of \(\b{a}\) along the direction of \(\b{x}\). I think this definition strictly less useful, since it can’t express the general component concept. You can always recover it by manually projecting onto a unit vector if you want.
Vector division notations are helpful for doing symbolic algebra on linear transformations, especially sparse ones. For example the operator of rotation in the \((x,y)\) plane of \(\bb{R}^3\) can be written
\[R_{xy} = (\frac{\y}{\x} - \frac{\x}{\y}) + \frac{\z}{\z} = r_{xy} + I_z\]Where \(R_{xy}\) is the entire operator and \(r_{xy} = \y/\x - \x/\y\) is the generator (also related by \(R_{xy} = e^{r_{xy} \frac{\pi}{2}}\).) Mirroring across the \(x=y\) axis is given by:
\[P_{xy} = \frac{\y}{\x} + \frac{\x}{\y} + I_z\]Et cetera. Calculations with linear transformations written in this form consist of cancelling terms, which is fairly easy to do by hand (certainly compared to multiplying matrices). The surviving three terms are those where the left denominator is the same as the right numerator:
\[\begin{aligned} R_{xy}^2 &= (\frac{\y}{\x} - \frac{\x}{\y} + \frac{\z}{\z}) (\frac{\y}{\x} - \frac{\x}{\y} + \frac{\z}{\z}) \\ &= (\frac{\y}{\x}) (- \frac{\x}{\y} ) + (-\frac{\x}{\y})(\frac{\y}{\x}) + (\frac{\z}{\z})(\frac{\z}{\z}) \\ &= -\frac{\y}{\y} - \frac{\x}{\x} + \frac{\z}{\z} \\ &= - I_{xy} + I_z \end{aligned}\]A projector like \(I_{xy}\) is identity on the space it describes regardless of the choice of basis for that space. If \(\< \x, \y \>\) is also spanned by some other orthogonal basis \(( \b{e}^1, \b{e}^2 )\), then \(I_{xy}\) takes the form
\[I_{xy} = \frac{\b{e}^1}{\b{e}^1} + \frac{\b{e}^2}{\b{e}^2}\]which still has matrix form \(\diag(1,1)\) in this basis. (The orthogonality of \((\b{e}^1, \b{e}^2)\) is important; more on that later.)
Another useful thing you can do is talk about the projections and rejections on an arbitrary vector in a compact way. Suppose \(\b{n}\) is the normal vector to a surface \(S\) in \(V = \bb{R}^3 = \< \x, \y, \z \>\). Then we can write the projection and rejection for tangent vectors for this surface as
\[\begin{aligned} I_n =& I_{\perp S} = \frac{\b{n}}{\b{n}} \\ I_S &= I_{\perp n} = I_{xyz} - I_n \\ &= \frac{\x}{\x} + \frac{\y}{\y} + \frac{\z}{\z} - \frac{\b{n}}{\b{n}} \end{aligned}\]If we happen to know that orthogonal vectors \((\b{u}, \b{v})\) span the surface \(S\), we can also write these as
\[\begin{aligned} I_S &= I_{uv} = \frac{\b{u}}{\b{u}} + \frac{\b{v}}{\b{v}} \\ I_{\perp S} &= I_{xyz} - I_{uv} \\ &= (\frac{\x}{\x} + \frac{\y}{\y} + \frac{\z}{\z}) - (\frac{\b{u}}{\b{u}} + \frac{\b{v}}{\b{v}}) \end{aligned}\]These are quite easier to work with, at least on paper, than their matrix representations. You can factor them out into individual terms if you want, getting something equivalent to the matrix, but there’s no need. If, for example, \(\b{n} = \x + \y + \z\), then this becomes
\[\begin{aligned} I_n &= \frac{\x + \y + \z}{\x + \y + \z} \\ &= (\x + \y + \z) \o \frac{\x + \y + \z}{\| \x + \y + \z \|^2} \\ &= \frac{1}{3} (\x + \y + \z) \o (\x + \y + \z) \\ &= \frac{1}{3} [\frac{\x}{\x} + \frac{\x}{\y} + \frac{\x}{\z} + \frac{\y}{\x} + \frac{\y}{\y} + \frac{\y}{\z} + \frac{\z}{\x} + \frac{\z}{\y} + \frac{\z}{\z}] \\ I_S &= \frac{\x}{\x} + \frac{\y}{\y} + \frac{\z}{\z} - \frac{1}{3} (\text{...all that stuff...}) \end{aligned}\]where the complicated formulas’ components are exactly the components of the equivalent matrix in the \((\x, \y, \z)\) basis.
In some fields you will see dyadics like \(\x\x\) used to express the same idea as my vector division \(\x/\x\), since for unit \(\x\) they are equal: \(\x\x \cdot \b{a} = \x (\x \cdot \b{a}) = a_x \x\). I think this notation is strictly inferior. Although the juxtaposition notation is useful for constructing tensors, especially of degree \(>2\), it doesn’t work as well for linear transformations: you really do want to represent the ‘input’ as a denominator since for most purposes it acts like one. In the case of \(\x\x\), the \(\x/\x\) notation correctly handles the case where \(\x\) is of non-unit length. It also generalizes in useful ways that dyadics cannot, as we will see next.
A helpful thing about the \(I_x = \frac{\x}{\x}\) notation is that it explicitly labels the “input” and “output” vectors of the linear transformation: denominators are inputs; numerators are outputs. This also reflects the way the two components transform under coordinate changes: numerators are covariant and denominators are contravariant, i.e. transform with the inverse transformation.
A more standard way to express this is to write a tensor product \(I_x = \x \o \x^*\) where the asterix indicates a contravariant dual vector \(\x^* \in V^*\) I don’t like this as much. Dual vectors are awkward, and it doesn’t automatically create a projector if \(\x\) has non-unit length, since under the transformation \(\x \ra 2\x\) this needs to transform as \(I_x = (2 \x ) \o (\frac{1}{2} \x^*)\). But I think that, since the second term transforms like an inverse, we may as well write it that way. (The more complicated case where we transform coordinates by mixing them together can also be handled; see below.)
3. Frames
We saw that \(\frac{1}{\b{x}} \b{a} = a_x\) gives the “\(x\)-coordinate of \(\b{a}\)”, that is, the object which when multiplied by \(\x\) gives \(\b{a}_x\) again:
\[\b{a}_x = a_x \x = \frac{\x}{\x} \b{a} = I_x \b{a}\]The same calculation can be extended to subspaces which are more than one-dimensional. For example, we can project \(\b{a}\) onto \(\< \x, \y \>\) with
\[I_{xy} \b{a} = (\frac{\x}{\x} + \frac{\y}{\y}) \b{a} = a_x \x + a_y \y\]It is helpful to think of this as the product of a tuple with another tuple,
\[I_{xy} \b{a} = (a_x, a_y) \cdot (\x, \y) = a_{xy} (\x, \y)\]such that \(a_{xy} = (a_x, a_y)\) can be thought of as the “\((xy)\)-coordinate of \(\b{a}\)”. Of course, the ‘coordinate’ is not a scalar anymore but a tuple of scalars. Allowing vectors to decompose in this way turns out to be nice way of thinking about things.
The object \((\x, \y)\) here is what I like to call a frame, which is a generalization of a vector. A frame is a tuple of linearly-independent vectors, or a ‘vector of vectors’—isomorphic to a matrix, but with a particularly useful interpretation. We will also say that a \(k\)-frame is a tuple of exactly \(k\) such vectors, and for most purposes a single vector can be regarded as a \(1\)-frame. A basis for an \(N\)-dimensional vector space is therefore an \(N\)-frame. An orthogonal frame is a frame whose vectors are mutually orthogonal, and an orthonormal frame is one whose vectors are orthonormal.6
I usually label frames with capital letters, and when possible choose the same letter as the vector space they span, for example \(X = (\x, \y)\) is a frame which spans the vector space \(X = \< \x, \y \>\). This just turns out to be convenient in practice, but there are cases where you want to distinguish the two. For instance you might have two distinct frames for the same subspace, like \((\x, \y)\) and \((\x + \y, \x - \y)\) which are both bases for \(\< \x, \y \>\), in which case you will want to give them different names to distinguish them. But for the most part conflating frames and the vector spaces they span is a useful convention.
Frames allow us to use the same notations for components of vectors along subspaces of any dimension. If a vector space \(V = X \oplus Y\), then a vector \(\b{a} \in V\) decomposes as \(\b{a} = \b{a}_X + \b{a}_Y\), and we can write each component as a product of a coordinate and a frame for that subspace:
\[\begin{aligned} \b{a} &= I_X \b{a} + I_Y \b{a} \\ &= a_X X + a_Y Y \\ &= (a_{x_1}, a_{x_2}, \ldots) (\x^1, \x^2, \ldots) + (a_{y_1}, a_{y_2}, \ldots) (\y^1, \y^2, \ldots) \end{aligned}\]A particularly common usage for this is that it lets us generically factor \(\b{a}\) into its components on and off of a subspace:
\[\b{a} = \b{a}_X + \b{a}_{\perp X} = a_X X + a_{\perp X} X_{\perp}\]which implies a choice of basis for \(X\) and \(X_{\perp}\) without having to actually write down what they are.
A surprising amount of linear algebra generalizes to work on frames instead of vectors without much modification. This suggests a perspective in which we don’t really know the dimensionality of the vector spaces we’re working with. When we say that \(a_x\) is the \(\x\)-component of \(\b{a}\), it doesn’t really matter if \(\x\) is a single vector or a frame of vectors. In some cases we might be inadvertently coercing the value \(a_x\) into being a scalar, losing information in the process, because we don’t have a way of thinking about it as a tuple of values. For example, perhaps we end up acciodentally viewing \(\b{a}_X\) as \(a_X X = (a_x a_y) (\x \^ \y)\), its projection onto a particular quotient space of the full frame \(X\), in a situation where we actually have the full data of \(a_x \x + a_y \y\) available.
As with vectors, we use division notation for extracting the projections onto frames:
\[\b{a}_X = \frac{X}{X} \b{a} = X (\frac{1}{X} \cdot \b{a}) = a_x X\]To make sense of this, consider an orthogonal frame \(X = (\x, \y)\) (we’ll discuss the non-orthogonal case in the next section.) Then the inverse frame consists of the componentwise inverses of each vector in the frame:
\[\frac{1}{X} = \frac{1}{(\x, \y)} = (\frac{1}{\x}, \frac{1}{\y})\]When this is juxtaposed with a vector, we take it to imply a dot product, which ‘distributes’ over the comma in the frame.
\[\frac{1}{X} \b{a} \equiv \frac{1}{X} \cdot \b{a} = (\frac{1}{\x}, \frac{1}{\y}) \cdot \b{a} = (\frac{1}{\x} \cdot \b{a}, \frac{1}{\y} \cdot \b{a}) = (a_x, a_y)\]The projection \(I_X = \frac{X}{X}\) then ‘dots’ the frame with this vector again:
\[\frac{X}{X} \b{a} = X (\frac{1}{X} \cdot \b{a}) = (\x , \y) (a_x, a_y) = a_x \x + a_y \y = \b{a}_X\]It is easier to understand this operation more generally if we compare to index notation. A general frame is given by an upper-indexed list of vectors
\[X = (\x^1, \x^2, \ldots) = \x^i\]Given a choice of basis \(\b{e}^j\), this is equivalent to a matrix
\[X = \x^i = (X^i_{\, j} \b{e}^j)\]which is to say, \(X\) can be thought of as a linear transformation from any choice of basis into the vectors \((\x^i)\), with \(X^i_{\, j} = \x^i \cdot \b{e}_j\). But this just kicks the interpretive can down the road, because now you have to make sense of the basis frame \(E = \b{e}^j\). So we write \(X = \x^i\) and leave it at that.
The inverse frame is written with lowered indices:
\[\frac{1}{X} = (\x_1, \x_2, \ldots) = \x_i\]Such that
\[X \cdot \frac{1}{X} = \x^i \cdot \x_j = 1_{i=j}\]Which is the sense in which is the ‘inverse’ of \(X\).
In index notation, the projector \(X/X\) therefore contains a contraction over the frames’s index
\[\frac{X}{X} = \x^i \x_i\]And its action on a vector is given by
\[\frac{X}{X} \b{a} = \x^i \x_i \cdot \b{a} = a_i \x^i = \b{a}_X\]We could write everything out fully in terms of that other basis \(\b{e}^j\), in which case \(X\) becomes a matrix \(X^i_{\, j} \b{e}^j\) and
\[\frac{X}{X} \b{a} = (X^i_{\, j} \b{e}^j X_i^{\, k} \b{e}_k) \cdot (a_l \b{e}^l) = (X^i_{\, j} \b{e}^j) X_i^{\, k} a_k = \x^i (X_i^{\, k} a_k)\]… but this is strictly more confusing, I think.
More general linear transformations can be written out with a different frame in the numerator and denominator:
\[R_{xy} = \frac{(\y, -\x, \z)}{(\x, \y, \z)} = \frac{R_{xy}V}{V}\]So long as the vectors of the denominator are orthogonal, frame division expands by pairing elements in the numerator and denominator together and then inverting the individually:
\[R_{xy} = \frac{(\y, -\x, \z)}{(\x, \y, \z)} = \frac{\y}{\x} + \frac{-\x}{\y} + \frac{\z}{\z}\]More generally,
\[\begin{aligned} \frac{E}{F} = \frac{(\b{e}^1, \b{e}^2, \ldots)}{(\b{f}^1, \b{f}^2, \ldots)} &\equiv \b{e}^1 \o (\b{f}^1)^{-1} + \b{e}^2 \o (\b{f}^2)^{-1} + \ldots\\ &= \b{e}^1 \o \b{f}_1 + \b{e}^2 \o \b{f}_2 + \ldots \\ &= \b{e}^i \b{f}_i \end{aligned}\]Note that there is no requirement that \(E \equiv (\b{e}^i)\) and \(F \equiv (\b{f}^j)\) be frames in the same vector space.
All linear transformations on a space can be written in a form where the denominator is any particular choice of canonical basis frame like \(V = (\x, \y, \z)\). So an arbitrary linear transformation \(A\) may be written
\[A = \frac{A(\x, \y, \z)}{(\x, \y, \z)} = \frac{(A\x, A\y, A\z)}{(\x, \y, \z)} = \frac{AV}{V}\]When expanded linearly in both the numerator and denominator, \(A\) will have terms like \(A_{xx} \frac{\x}{\x} + A_{xy} \frac{\y}{\x} + \ldots\). These are the matrix elements of \(A\) in the \((\x, \y, \z)\) basis.
If an operator maps a space into itself, \(A: V \ra V\), we also have the operation of taking its trace by also dotting the input and output vectors together. For projection operators this gives the dimension of the space they project onto:
\[\begin{aligned} I_X &= \frac{(\x^1, \x^2, \ldots)}{(\x^1, \x^2, \ldots)} \\ &= \x^i \o \x_i \\ \tr I_X &= \x^i \cdot \x_i \\ &= \x^1 \cdot \x_1 + \x^2 \cdot \x_2 + \ldots \\ &= \dim X \end{aligned}\]It is interesting that when you write a linear transformation like \(A \equiv \frac{AV}{V}\) as a standalone symbol, it sorta looks like you are canceling out the \(V\)s. This is probably a good way of thinking about things. I suspect the most philosophically sound way of interpreting it is that the standalone \(A\) is really supposed to be \(A_V\), so the operator \(A\)’s projection onto the vector space you are aware of (like just \(I = I_V\) above). Perhaps \(A\) also some some action on another space which you’re erasing when you project it onto your particular choice of basis frame \(V\).
Frames can be thought of as a choice of coordinate system for the vector space they span. For example, \((\x, \y)\) is a basis for the vector space \(X = \< \x, \y \> \subset V\). Division by \((\x, \y)\) is therefore a linear transformation from the vector space \(X\) itself to some other vector space—a vector space of coordinates for \(X\), which I like to write as \(\cal{I}_X\) (for “index space”). Then the frame \(X = (\x, \y)\) itself is a linear transformation \(\cal{I}_X \ra X\), so it takes a vector of coordinates for \(X\) and maps them back to \(X\) itself. This is what is happening when we write out a vector in terms of coordinates:
\[\b{a}_X = a_X X \in X \subset V\]In this sense we see that \(I_X = X/X\) amounts to contracting \(X\) and \(X^{-1}\) on their \(\cal{I}_X\) index, resulting in the identity on the space \(X\). Contracting on their \(X\) index on the other hand gives the identity on the index space,
\[\frac{1}{X} \cdot X = \x_i \cdot \x^j = I_{\cal{I}_X}\]That is, it’s the identity operator \(\diag(1, 1, \ldots)\) but in the basis for the coordinates \(\cal{I}_X\), rather than \(X\) itself. This works like you’d expect: if \(a_X = (1/X) \b{a}\) then \((I_{\cal{I}_X}) a_X = (1/X \cdot X) \cdot (1/X) \b{a} = (1/X) \b{a} = a_X\) again. This object is not very useful, though.
Since a frame \(X = (\x^1, \x^2, \ldots)\) is really a linear transformation \(\cal{I}_X \ra X\), we can write it out in a basis \((i_1, i_2, \ldots)\) for \(\cal{I}_X\):
\[X = \x^1 \o i_1 + \x^2 \o i_2 + \ldots\]The tuple notation for frames should just be viewed as a shorthand for this. Frame division, therefore, involves contracting two frames on their frame index:
\[\begin{aligned} \frac{Y}{X} &= \frac{(\y^1, \y^2, \ldots)}{(\x^1, \x^2, \ldots)} \\ &= (\y^1 i_1 + \y^2 i_2 + \ldots) \cdot (\x_1 i^1 + \x_2 i^2 + \ldots) \\ &= \y^1 \x_1 + \y^2 \x_2 + \ldots \\ &= \y^i \x_i \end{aligned}\]This only makes sense when the numerator and denominator have the same number of components. Note how when the object is fully expanded, references to the index space disappear and we are left with a linear transformation \(X \ra Y\). Also note that denominators always end up corresponding to lowered indices, while numerators have upper indices. This reflects the fact that numerators are covariant and denominators are contravariant (with respect to their respective vector spaces).
So the choice to write a frame out as a list of vectors \(X = (\x^1, \x^2, \ldots)\) is actually the choice to insert an intermediate vector space inside the transformation, \(X \ra \cal{I}_X \ra Y\), which we then use to ‘match up’ the bases for the inputs and outputs. This is one reason among many why I like to do linear algebra with frames as standalone objects: because there are a lot of implications that the expansion of frames into bases is sort of unnecessary; its role is just to make things computationally tractable by writing them out in useful coordinates.
4. Non-orthogonal frames
One thing that frames and frame division allow you to do which is otherwise somewhat annoying to talk about is projection operators in terms of bases where the vectors are not orthogonal.
Suppose you want to use the non-orthogonal frame \(F = \b{f}^i = (\x, \x+\y)\) to describe the vector space \((\x, \y)\) for some reason. It is still possible to decompose vectors in terms of this basis, \(\b{a} = a_1 \x + a_2 (\x + \y)\). However, the actual projections are no longer independent of each other: the value of \(a_1\) here is not given by \(a_x = (\x/\x) \b{a}\). We can still write
\[\b{a}_F = I_{xy} \b{a} = \frac{F}{F} = \frac{(\x, \x+\y)}{(\x, \x+\y)}\]But we cannot factor it as
\[\frac{(\x, \x+\y)}{(\x, \x+\y)} \neq \frac{\x}{\x} + \frac{\x + \y}{\x + \y}\]Instead, the correct projector has to the use the dual basis for the frame \(X\) in the denominator. In this example it looks like this:
\[\begin{aligned} \frac{(\x, \x+\y)}{(\x, \x+\y)} &= \frac{\x}{(\x - \y)/2} + \frac{\x + \y}{\y} \\ &= \x \o \frac{(\x - \y)/2}{\| (\x - \y)/2 \|^2} + (\x + \y) \o \frac{\y}{\| \y \|^2} \\ &\equiv \x \o (\x - \y) + (\x + \y) \o \x \end{aligned}\]Since this dual frame \(F^{-1} \equiv (\x - \y, \y) = \{ \b{f}_i \}\) correctly obeys \(\b{f}^i \cdot \b{f}_j = 1_{i=j}\)
\[\begin{aligned} (\x - \y) \cdot (\x) &= 1 \\ (\x - \y) \cdot (\x + \y) &= 0 \\ (\y) \cdot (\x) &= 0 \\ (\y) \cdot (\x + \y) &= 1 \end{aligned}\]that is,
\[F^{-1} \cdot F = 1_F\]So we see that \(F^{-1}\) must be the inverse matrix to \(F\). In the case where \(F\)’s vectors are not orthogonal, this necessitates some ‘mixing’ in the columns of \(F^{-1}\) to accomodate. In our example the matrix representations are
\[\begin{aligned} F &= \begin{pmatrix} i_1 & i_2 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} \begin{pmatrix} \x \\ \y \end{pmatrix} \\ &= i_1 (\x) + i_2 (\x + \y) \\ &= (\x, \x + \y)\\[1em] F^{-1} &= \begin{pmatrix} \x & \y \end{pmatrix} \begin{pmatrix} 1 & 0 \\ -1 & 1 \end{pmatrix} \begin{pmatrix} i_1 \\ i_2 \end{pmatrix} \\ &= \x (i_1) + \y (i_2 - i_1) \\ &= (\x - \y, \y) \end{aligned}\]where I have used the notation \((i_1, i_2)\) to keep track of the basis for \(\cal{I}_X\); the idea is just that tuples \((\x, \y)\) translate to vectors \(\x i_1 + \y i_2\).
The actual construction of the dual frame \(F^{-1}\) is therefore a matrix inverse, and has to be constructed using the same exterior algebra construction as all matrix inverses. The procedure should look something like this:
\[\frac{F}{F} \equiv \frac{F}{F} \^ \frac{F^{\^{n-1}}}{F^{\^n-1}} = \frac{F^{\^n-1}}{F^{\^n}} F\]Where there is some internal messiness with the indexes that causes the numerator and denominator to come out as different objects. However, I have not been able to find a fluid way of doing this calculation symbolically. I’ll update this if I do. (It is equivalent to the usual \(\adj(F)/\det(F)\) construction in, um, untyped linear algebra, but that’s not a good way of doing things either.)7
Regardless, the important takeaway is this: if a denominator frame is not orthogonal, then you cannot factor the frames apart term-by-term:
\[\begin{aligned} \frac{X}{F} = \frac{(\x^1, \x^2)}{(\b{f}^1, \b{f}^2)} \stackrel{!}{\neq} \frac{\x^1}{\b{f}_1} + \frac{\x^2}{\b{f}_2} \end{aligned}\]Instead you have to factor them according to the dual frame, \(F^{-1} = (\b{f}_i)\)
\[\begin{aligned} \frac{X}{F} = \frac{(\x^1, \x^2)}{(\b{f}^1, \b{f}^2)} = \x^1 \o \b{f}_1 + \x^2 \o \b{f}_2 \end{aligned}\]where the values of the \(\b{f}_i\) are functionally dependent on the entire frame \(F\), rather than just on \(\b{f}^i\) alone.
The real takeaway here is that you need frame division to express the projection onto a non-orthogonal frame succinctly: \(F/F\) holds always, even if \(\sum_i \b{f}^i/\b{f}^i\) does not.
5. Decomposing Linear Transformations
Now I want to describe a useful way I found for thinking about the decomposition of linear transformations. (This section is intended to be somewhat metaphorical. Although I’m writing things in the same division notation as above, I’m not quite sure everything is directly translateable as written. However, they are still useful for intuition.)
Suppose we have an invertible linear transformation written in some basis \(V\) which we know to be orthogonal, e.g. \(V = (\x, \y, \z)\)
\[A = \frac{AV}{V}\]It may be the case that \(AV\) is not an orthogonal frame, but it will still be linearly independent, since we specified that \(A\) is invertible. Since we can put non-orthogonal frames into denominators, we can write the inverse of \(A\) by simply swapping the numerator and denominator:
\[A^{-1} = \frac{V}{AV}\]and left-multiplying by \(A^{-1}/A^{-1}\) (which… seems valid) recovers the usual form you might expect:
\[\begin{aligned} \frac{A^{-1}}{A^{-1}} \frac{V}{A V} = \frac{A^{-1} V}{V} \end{aligned}\]Now suppose that \(A: V \ra W\) is a linear transformation between two vector spaces, but it is not necessarily injective or surjective; that is, it possibly has a non-trivial kernel and cokernel. It is illuminating to factor \(A\) like this:
\[\begin{aligned} A &= \frac{\text{col} (A)}{\text{row} (A)} + \frac{0_W}{\text{ker} (A)} + \frac{\text{coker} (A)}{0_V} \\ &= A_{\parallel} + \frac{0_W}{\text{ker} (A)} + \frac{\text{coker} (A)}{0_V} \end{aligned}\]The meaning is as follows:
\(A_{\parallel} = \frac{\text{col} (A)}{\text{row} (A)}\) is the non-trivial part of \(A\): it is an invertible linear transformation (an isomorphism) that maps the row-space \(\text{row}(A) \subset V\) to the column-space \(\text{col}(A) \subset W\), both of which are vector spaces of dimension \(k = \text{rank}(A)\). Each can be spanned by a basis of \(k\) vectors, and if these bases are chosen to be orthogonal, then this term can be written as the sum of \(k\) individual terms \(\b{a}^1/\b{e}^1 + \b{a}^2 / \b{e}^2 + \ldots + \b{a}^k / \b{e}^k\).
\(\frac{0_W}{\text{ker} (A)}\) is the kernel (or nullspace) of \(A\). \(\text{ker} (A)\) is a frame of dimension \((\dim V - k)\) which spans the subspace of vectors \(\b{v} \in V\) which have \(A \b{v} = 0 \in W\). The numerator \(0_W\) refers to the zero vector in \(W\), which is the image of \(\text{ker}(A)\). Strictly speaking this fraction is not a valid instance of frame division, since the numerator and denominator do not contain the same number of vectors, but it accurately depicts the behavior of \(A\) on this subspace of \(V\). Of course, since this part “is” zero, we could just leave it off entirely, but it is helpful for intuition to include it anyway, since it really does act like the the action of \(A\) on a particular subspace of \(V\).
\(\frac{\text{coker} A}{0_V}\) represents the cokernel of \(A\): \(\text{coker}(A) \subset W\) is a frame of dimension \((\dim W - k)\) spanning the subspace of vectors \(\in W\) which are not in the image of \(A\), that is, \(\text{coker}(A) = \{ \b{w} \in W \mid A \b{v} \neq \b{w}, \; \forall \, \b{v} \in V \}\). This “division by \(0_V\)” here is not really meant literally; we write it this way because it is sort of an inverse process to what the kernel part is doing. (Perhaps there is a better way to notate this.)
This is more clear if we consider trying to pseudoinvert \(A\). Only the non-trivial part \(A_{\parallel}\) is invertible. Inverting only this part, and setting the rest to zero, gives the the Moore-Penrose Pseuodinverse of \(A\), which I have also written about here (I don’t care for the \(A^+\) notation so I’m only going to use it here):
\[A^+ = (A_{\parallel})^{-1} = ( \frac{\text{col} (A)}{\text{row} (A)})^{-1} = \frac{\text{row}(A)}{\text{col}(A)}\]Since the pseudoinverse invertibly maps \(\text{row}(A) \ra \text{col}(A)\), we can use it to construct projectors for each subspace space:
\[\begin{aligned} I_{\text{row}(A)} &= (A_{\parallel}^{-1}) (A_{\parallel}) = \frac{\text{row}(A)}{\text{row}(A)} \\ I_{\text{col}(A)} &= A_{\parallel} A_{\parallel}^{-1} = \frac{\text{col}(A)}{\text{col}(A)} \\ I_{\text{ker}(A)} &= I_V - I_{\text{row}(A)} = I_V - A_{\parallel}^{-1} A_{\parallel} = \frac{\text{ker}(A)}{\text{ker}(A)} \\ I_{\text{coker}(A)} &= I_W - I_{\text{col}(A)} = I_W - A_{\parallel} A_{\parallel}^{-1} = \frac{\text{coker}(A)}{\text{coker}(A)} \end{aligned}\]We can also talk about the generalized inverse of \(A\), which is the broadest way of thinking about what is meant by inverting \(A\). This consists of inverting all three terms separately (which is valid since they each act on different subspaces (ignoring the ambiguity of what is meant by \(1/0_V\)..)):
\[\begin{aligned} A^{-1} &= (\frac{\text{col} (A)}{\text{row} (A)})^{-1} + (\frac{0_W}{\text{ker} (A)})^{-1} + (\frac{\text{coker} (A)}{0_V})^{-1} \\ &= \frac{\text{row} (A)}{\text{col} (A)} + \frac{\text{ker} (A)}{0_W} + \frac{0_V}{\text{coker} (A)} \\ &= A_{\parallel}^{-1} + \frac{\text{ker} (A)}{0_W} + \frac{0_V}{\text{coker} (A)} \end{aligned}\]The kernel and cokernel have swapped roles. Now \(\text{coker}(A) \subset W\) is the set of vectors which are mapped to \(0_V\), since they have no preimage in \(V\), while \(\text{ker}(A) \subset V\) is the cokernel of \(A^{-1}\), consisting of the vectors that were all mapped to \(0_W\) by \(A\). But now we have a different interpretation: instead of saying that these vectors are inaccessible from \(A^{-1}\), we can think of them as all being accessible. The correct preimage \(A^{-1}(0_W)\), in a generalized inverse sense, is that it is all of the vectors in the kernel of \(A\).
Another way of thinking about this is that there is missing information that is required to correctly compute \(A^{-1}(0_W)\). Suppose we augmented \(W\) with an additional vector space \(\Lambda_{\text{ker} A}\) of dimension \(\dim \text{ker}(A)\) which records exactly which vector in \(\ker A\) was mapped to \(0_W\), and then modified \(A\) by changing it to
\[A' = A_{\parallel} + \frac{\Lambda_{\text{ker} A}}{\text{ker}(A)} + \ldots\]Now the kernel of \(A\) has become invertible as well, with the use of this additional data. Accordingly, the inverse of \(A\) now includes a function from these additional coordinates \(\vec{\lambda}_{\text{ker}(A)} = (\lambda_1, \lambda_2, \ldots) \in \Lambda_{\text{ker} A} \ra \text{ker} (A)\):
\[(A')^{-1} = A_{\parallel}^{-1} + \frac{\ker A}{\lambda_{\text{ker} A}} + \ldots\]Similarly, although the cokernel is literally inaccessible from \(A\), it can be useful to think of it as really being missing information. We could augment \(V \mapsto V \oplus \Lambda_{\text{coker} (A)}\) to contain additional information which is isomorphic to \(\text{coker}(A)\), and then define
\[A' = A_{\parallel} + \frac{\Lambda_{\text{ker} A}}{\text{ker}(A)} + \frac{\text{coker}(A)}{\Lambda_{\text{coker}(A)}}\]where the new coordinates \(\vec{\lambda}_{\text{coker}(A)} = (\lambda_1, \lambda_2, \ldots) \in \Lambda_{\text{coker}(A)}\) now parameterize a particular point in the cokernel, and the usual behavior of \(A\) consists of setting all of them to \(0\) by default. This \(A''\) is fully invertible, but reduces to \(A\) in the case where all the input and output \(\lambda\)s are set to \(0\).
To put this all more simply: a linear transformation \(A : V \ra W\) of rank \(k = \text{rank}(A)\) can be augmented to a transformation \(A'\) which takes \((\dim V - k)\) additional parameters \(\vec{\lambda}_{\text{coker}(A)}\) and produces \((\dim W - k)\) additional parameters \(\vec{\lambda}_{\text{ker}(A)}\)
\[A'(\b{v}, \vec{\lambda}_{\text{coker}(A)}) = A(\b{v}) + \vec{\lambda}_{\text{ker}(A)}\]which is a bijection between \(V \oplus \Lambda_{\text{coker}(A)} \ra W \oplus \Lambda_{\text{ker}(A)}\). The original transformation is recovered upon composing this with the maps which set all the \(\lambda\)s to zero, that is
\[A = I_{\perp \Lambda_{\text{ker}(A)}} \circ A' \circ I_{\perp \Lambda_{\text{coker}(A)}}\]I don’t have any particular use for this, but I thought it was generally interesting, and I find thinking about linear transformations in this way much more insightful than the sort of complicated logic that is used to justify things like the rank-nullity theorem. In particular, it gives an algebraic representation of the sorts of objects one discusses when reasoning about vector spaces with quotients, universal properties, exact sequences, etc. I have nothing against those ways of reasoning, but I always get the feeling that we should be able to write down explicit objecfts to match the logical arguments that we’re making, and I think this approach is roughly how you would go about doing that
5. Conclusion
I originally intended to also include a section on how all these notations translate into differentials, but this is long enough. Suffice to say, all of the same formulas work on differentials under the translation
\[\begin{aligned} \frac{\p}{\p x} \Lra \x \\ dx \Lra \frac{1}{\x} \end{aligned}\]Some of the shorthands you will see in multivariable integrals, such as
\[\frac{\p(\x, \y, \z)}{\p(\u, \v)} (du, dv)\]for the Jacobian (hate that name) of the transformation from \((u,v) \ra (x,y,z)\) coordinates have literal interpretations as ratios of frames. It is also common to see exterior products of these expressions, such as exterior power
\[(\frac{\p(\x, \y, \z)}{\p(\u, \v)})^{\^ 2} (du \^ dv)\]in a surface integral, which leads to some of the other operations that you can define in the frame division notation that I did not discuss here.
Deciphering these sorts of expressions in differential geometry is where I first got the notion that we ought to have a symbolic calculus for talking about frames of vectors in the first place. Specifically I was factoring differentials into their components on and off a surface in my article on Lagrange Multipliers like \(df = d_G f + d_{\perp G} f\), where \(d_G f\) is the covariant differential of \(f\) with respect to the surface defined by \(G\), when I realized that this is a pretty good way of thinking about linear algebra in general.8 I won’t pretend like I’ve what I’ve described in this article is exactly what it should be, but I’m quite convinced that there’s something here.
Although generalizing from vectors to frames adds complexity in some places, it also seems to reveal a big symmetry that underlies a lot of linear algebra: that most of the things we do with it are somewhat agnostic as to whether the individual directions in our vector spaces are actually one-dimensional. Decompositions like \(\b{a} = \b{a}_X + \b{a}_{\perp X}\) work fine regardless of the dimensionality of the components.
Often I get the impression that the choice to view a particular system as \(n\)-dimensional is a significant choice of coordinate system, just like how defining the \((\x, \y, \z)\) axes is, and a ‘covariance’ with respect to this choice is going to be necessary to correctly reckon with the its applications in (among other places) physics. (You have no choice about how to do this in the normal way that linear algebra is formalized over a particular field; however, I think this is up for refactoring if necessary.) It is also necessary to solve my ongoing quest to make sense of ‘fractional’-dimensional objects; for instance a vector space of dimension \(1/2\) is probably going to be equivalent to a vector space of dimension \(1\), but “measured” in a basis of dimension \(2\). Something like that. I don’t know yet! But I like to think about it.
-
One can instead think of \(I_X\) as actually erasing the third component, such that it is a homomorphism \(\bb{R}^3 \ra \bb{R}^2\) like \(I_X (a_x, a_y, a_z)^T = (a_x, a_y)\). Still another option is to interpret \(I_X\) as a projection onto the quotient, \(\bb{R}^3 \ra \bb{R}^3 / \< \z \>\), such that \(I_X (a_x \x + a_y \y + a_z \z) = a_x \x + a_y \y + \< \z \>\). These are all isomorphic concepts in the case of linear algebra, but they are distinctly different at the type level, and generalize differently. We will stick with the version I have described, though, because I want to keep everything concrete and familiar. ↩
-
The direct sum operation \(\oplus\) acts more like a product than a sum (and, I understand, is equivalent for finite-dimensional spaces to the direct product \(X \times Y\)). It would be most accurate to explicitly write sense to write \(I_{x \oplus x}\), but that’s unwieldy. Another option is \(I_{x,y}\), since in many cases commas are used to represent elements of direct sums, e.g. \((v_x, v_y) \in \< x \> \oplus \< y \>\), but \(I_{xy}\) is unambiguous enough so I haven’t seen a reason to switch. ↩
-
Sometimes this operator is called called the ‘rejection’, but I don’t like that name because it’s hard to use in a sentence. \(I_X\) is the projection onto \(X\), so \(I_{\perp X}\) is the… rejection… off of… \(X\)? There’s not really a good way to say it. Calling \(I_{\perp X}\) the ‘rejector’ for \(X\) works, however. ↩
-
An alternative notation for \(I_{\perp X}\) might be \(I_{V/X}\), since the quotient space \(V/X\) is isomorphic to \(X_{\perp}\). One advantage of this is that it makes clear what \(X_{\perp}\) is perpendicular with respect to. Also, when projectors are written out using basis vectors like \(I_{xyz}\), the division symbol seems to helpfully invert the implied ‘multiplication’ operation inside \(xyz\), like \(I_{yz} = I_{xyz/x}\). On the other hand, one normally thinks of elements of \(V/X\) as being cosets of elements modulo \(X\), rather than just regular elements of \(V\), and although they are isomorphic, they are distinctly different. I haven’t been able to decide if this is worth it. (Still another notation might be \(I_{\perp X} = I_{V \ominus X}\), where \(\ominus\) is interpreted as a formal inverse to the direct sum \(V = X \oplus X_{\perp}\).) ↩
-
Aside: it is possible to write down expressions with the projectors for subspaces which resemble set algebra. For example, \(I_{xyz} = I_{xy} + I_{yz} - I_{xy} I_{yz}\) resembles the inclusion-exclusion of sets \(A = \{ x, y \}\) and \(B = \{ y, z \}\): \(I_{A \cup B} = I_A + I_B - I_{A \cap B}\). However, this gets messy as soon as you try it on more complicated bases. For instance \(I_{x}\) and \(I_{x+y}\) do not even commute as operators. Also, \(I_{xy} I_{yz} = I_y\) must hold when \(I_{xy}\) is replaced with \(I_{x+y, x-y}\), but then it no longer looks like a simple intersection. I think there is something interesting here, but it it is too complicated to explore in this article. ↩
-
Note, there are several things out there called “frame” and they’re slightly different. This concept is most similar to \(k\)-frames and moving frames, and less similar (but more important than) what Wikipedia currently describes on the Frame (linear algebra) article, which is instead a generalization of a basis to be overdetermined (to contain more basis vectors than the dimension). Although this is a useful concept, it is more useful most of the time to talk about linearly independent frames, so if I want to talk about one with that restriction relaxed I would add a qualifier like ‘singular frame’. ↩
-
This is the part that I got really blocked on a few years ago… it’s definitely not very good right now, but whatever, it is clearly getting at something that is ‘morally’ correct, even if the notation is not there yet. ↩
-
The Lagrange multiplier condition is \(d_G f = df - d_{\perp G} f = 0\), hence \(df = \frac{df}{d G_{\perp}} dG_{\perp}\); we write \(\lambda = \frac{df}{dG_{\perp}}\) as the Lagrange multiplier. In a coordinate basis this becomes \(\frac{df}{d \x} = \del f = \lambda \frac{dG_{\perp}}{d\x} = \lambda \del G_{\perp}\). ↩