# While driving

Out on the road today I saw some things that made me think. While none of those things were Deadhead stickers on Cadillacs, one thing I did see was a license plate, 4GIV2##. I think it was 258 at the end, but that was not the part I was focused on. I thought, “How cool to have an ID plate in the 4GIV series. And how even more cool would it be to have the plate 4GIV490.” (Matt. 18:21-22). Actually, I thought 4GIV539 would be cool because I misremembered the quote as seventy seven times seven. I’m glad I looked up the reference before writing this. * whistles *

Another thing I saw was a truck for a company called Shipping Experts Consumer Handling Transportation (SECH Transportation). Unfortunately I do not read Hangul, so I can’t really tell what their website says, but you’ve gotta appreciate their enthusiasm. Not having the benefit of seeing their website while on the road, my mind naturally went to the obvious mathematical connection – hyperbolic secant, the reciprocal to a perhaps more familiar shape: hyperbolic cosine, a.k.a. catenary. The catenary is the shape a chain or cord will naturally fall into if its ends are held fixed in a constant gravitational field. It is also the shape (inverted) of a famous US landmark.

# Teaching as a Primary Instructor. Day 1.

Today was designed to be an introduction / icebreaker sort of day. I passed around a prop, and had the students introduce themselves to the class when the prop got to them. Once I got the prop back, I asked them if they knew what it was, knowing that none of them would. It was a slide rule. I told them it was a calculator, watching for a moment as the blank looks on their faces turn into dumbfounded looks before telling them a little bit about how slide rules were the calculators used before electronic calculators came on the scene in the 1970s. Of course I brought half a dozen slide rules with me today as part of what was probably the geekiest icebreaker ever. I showed them how to use the C and D scales to multiply 2 by 3, and split the class into groups with a slide rule in each group and gave them the task of multiplying 4 by 3. That was a trick, of course, because the opposite 1 is used for those two multiplications. Then I had them look at the A and D scales, using the hairline to line up with the 5 on the D scale. And I had them do the same with 3 on the D scale. They were pretty quick to notice that the operation there is squaring, despite the initial appearance that 5 takes you to 2.5. After asking what else they could expect to be able to do with a slide rule, given that you can multiply and square numbers, I asked them to find the square root of 2, using the slide rules I handed out. I hope they had fun with that. I know I did.

Still in their groups, I had them talk to each other for about ten minutes to round out the icebreaking in a more… normal? way. I wandered around for a bit, answering questions and addressing concerns, and after the ten minutes was up, I handed them their Problem of the Day. I wanted to make it very light for a very light day, so the questions were: What is my name? What are the names of the people in your group? and What is the name of the prop we used today? I had my name and the words “slide rules” written on the board, so it was mostly a matter of, “Are you paying any attention?” After I collected the PotDs, I pointed out the reason I decided to use slide rules as a prop for the icebreakers – logarithms are what make slide rules work, and they will be learning about logarithms later on in the Precalc class portion of their Summer Bridge ensemble. The point of the geeky icebreaker: I whetted their appetites for things to come. I also explained that the multiplication on a slide rule would be addition if the scales were linear instead of logarithmic, which means logarithms effectively turn a multiplication problem into an addition problem.

By then, they started asking questions, like why I like mathematics. I answered that “mathematics is fun (interruption: frustrating) – yes, it can be frustrating at times, but it is still fun – and beautiful. No, I’m serious.” I think any subject, if you go deep enough into it, has some kind of beauty. Math has lots of really cool things you can look at. Some examples I gave were that we can show $\sqrt{2}$ is irrational… primes are 0% of all whole numbers, but there are just as many primes as whole numbers… just some snippets of cool stuff that would be accessible at the precalc level.

There was another question about what’s the hardest math I’ve dealt with. I told them the most abstract I’ve dealt with is Category theory, but the one with most nitpicky detaily nuissances that I’ve dealt with is Analysis. I don’t think I explained very well. I mean, how do you start to outline what’s so cool about Categories or any branch of Analysis when they’re taking precalc? For the sake of having somewhere to start, I reduced Categories down to manipulating arrows, and I reduced Analysis down to the details for why you can do what you will do in calculus. That is a gross oversimplification, and I don’t think I did a very good job of explaining that much. They seemed kind of bored with my answer to that question. Oh well. The remainder of the time I spent with them was answering questions about course materials and the like.

I suppose I should also note some notable things that happened last week.

Last week the other class I was supposed to teach today got cancelled because there was insufficient enrollment. That kind of sucks because it means my paycheck will be half as much. In anticipation of something like that, along with finances already being tight, I filed the FAFSA the weekend before so I could be eligible for student loans. I’ve never taken out a student loan before, so that’s kind of new territory for me. Don’t ask me how I managed to get to the beginning of my fourth year in a Ph.D. program without taking out any student loans; I would just say it’s a miracle. Turns out, even if I get offered student loans, the earliest they could possibly be disbursed would be somewhere in the middle of September. I was able to get an emergency loan through Grad Division, though. That should at least help tide me over. Basically, finances are stressful.

I’m still working on learning Hebrew, and I’m supposed to get a new apartmentmate some time this week. Things feel like they are falling apart at times, but other times I know they are falling into place. Where things land may not be comfortable all the time, but there are definite opportunities for growth from the experiences. Also! A few little notes. The Associator animation is not yet in its final state. It works, but there are things that could be better. The other little note – I finally found the spamomatic filter and noticed it deleted and removed 45 comments already. I don’t know what those comments said, so if you made some comments and they never posted, I now know one more place I have to look, when approving comments.

# Associator

After more delays that I would like to admit, I finally got around to making this. Perhaps some explanation of what’s going on in the picture is in order. We begin with a category with (all) pushouts, starting with some objects and morphisms arranged as chained spans. A pushout is used to compose the two spans on the left. This gives a new span, $L \rightarrow \Gamma'' \Gamma' \leftarrow J$, which in turn can be composed with the span to its right via pushout. This is just one way that we can compose the chain of three spans. If we had built up from right to left instead of left to right, we would have $\Gamma'' (\Gamma' \Gamma)$ at the top instead of $(\Gamma'' \Gamma') \Gamma$.

The associative property is really nice, so it would be good to show those two ways of composing spans are “the same” in some appropriate sense. Spoiler: that sense is “up to isomorphism.” Instead of directly finding them isomorphic to each other, it is easier to show each is isomorphic to some other thing – the colimit of the entire diagram we started with. This colimit will here be called an associator; it is something that both compositions of all three spans will be isomorphic to. I’m just going to sweep under the rug the question of whether that colimit will exist and just assume it does in this post.

So we’ve got the groundwork set, now we need to take advantage of some universal properties to give unique maps that make sub-diagrams commute. The first universal property taken advantage of is that of the first pushout. The associator has arrows going to it from $\Gamma''$ and $\Gamma'$, so there will exist a unique morphism, $\Gamma'' \Gamma' \rightarrow \Gamma'' \Gamma' \Gamma$. such that everything commutes. Going up a step and using the arrow we just made, we can play the same game to get a unique morphism $(\Gamma'' \Gamma') \Gamma \rightarrow \Gamma'' \Gamma' \Gamma$ that still makes everything commute.

To go in the reverse direction, we need morphisms from each of the Gammas to $(\Gamma'' \Gamma') \Gamma$. We already have one from $\Gamma$, and the other two can be built by composing morphisms. We can join two arrows together, tail to tip, to get a single arrow regardless of what category we are in. Now the universal property of the associator kicks in, giving a unique morphism $\Gamma'' \Gamma' \Gamma \rightarrow (\Gamma'' \Gamma') \Gamma$, but there’s a catch. We only know it makes some of the diagram commute. We have to put in a bit more effort to show the arrows involved in the pushouts will commute, too. The first step of this isn’t too bad — the three arrows that don’t point directly at $\Gamma'' \Gamma' \Gamma$ will commute because the morphisms from $\Gamma''$ and $\Gamma'$ to $(\Gamma'' \Gamma') \Gamma$ commute with them by construction.

The universal pushout maps are a bit trickier, but since both legs of the pushouts commute with everything else, the universal maps will commute as well. Without the picture, that sentence might be a bit hard to understand. Look at the picture. They say those things are worth a thousand words. As parts of the diagram are shown to commute with the blue arrow on top, those part turn dark green. The arrows that already commute with everything get highlighted when they are used to show other arrows commute with everything. That should clarify what the picture is doing. Once everything commutes, the arrows turn black again, and we are left with unique maps in both directions at the top of the diagram that commute with each other. Long story short, this gives an isomorphism between the composition of spans by pushouts and the composition of spans “all at once” by associator. Watching the animation in a mirror gives the other way of composing spans by pushouts as isomorphic to this as well.

So this picture together with its mirror image shows $(\Gamma'' \Gamma') \Gamma \simeq \Gamma'' (\Gamma' \Gamma)$, which is really the best we could possibly hope for when pushouts themselves are only unique up to isomorphism.

# Classical Mechanics formulations (Part 2)

Last time I mentioned looking at two functions, $M(p,\dot p)$ and $J(\dot q,\dot p)$ that would ideally carry all the data needed to solve certain types of problems in classical mechanics. In the case of $M$, I conjectured that equations analogous to the Lagrange equations ought to exist and hold, namely,
$\displaystyle \frac{d}{dt}\frac{\partial M}{\partial \dot p_i} = \frac{\partial M}{\partial p_i}$.
If we got lucky, we could recover $q$ and $\dot q$ from those partials. While my approach on that front (prior to writing this post) has been… heuristic at best, I have found evidence that indicates $M = L$ with the coordinates transformed. At least in some situations. In my attempt to present this evidence yesterday afternoon without complete notes, I was unable to recapture this evidence on the fly. There is probably a good lesson in that, even if nothing else is gained from this exercise.

In the comments for Part 1, Dr. Baez suggested looking at the one-dimensional Lagrangian $L(q,\dot q) = \frac{1}{2}m\dot q\cdot\dot q - V(q)$, for which the equations of motion are well known. Acting on this suggestion over the weekend, during a bout of insomnia while running a fever, I wove together the evidence I found so elusive yesterday with a skein of half-baked yarn. I probably could mix more metaphors in there if I tried, but the point is, the following paragraph may need to be taken with a liberal grain of salt.

At first I was uncertain how to approach an ‘easy’ $V(q)$, like a gravitational potential, so I took a simple spring potential, $V(q) = \frac{1}{2}kq\cdot q$. So that’s already a point in favor of feverish-insomnia me over at-the-whiteboard-without-notes me, who couldn’t even write down the potential correctly. The equation of motion is $m\ddot q = -kq$, from which we can find $q(t) = A\sin(\sqrt{\frac{k}{m}}t+B)$. That can be simplified by choosing units where $A=1$ and a suitable time translation for which $B=0$, but I did not originally make those simplifications, so I won’t here. $\dot q(t) = A\sqrt{\frac{k}{m}}\cos(\sqrt{\frac{k}{m}}t+B) = \frac{p}{m}$, and $\ddot q(t) = -A\frac{k}{m}\sin(\sqrt{\frac{k}{m}}t+B) = \frac{\dot p}{m}$. Noticing those two outside equalities, $\dot q = \frac{p}{m}$, and $\ddot q = \frac{\dot p}{m}$, along with the equation of motion itself, $m\ddot q = -kq$, right off the bat would have saved me from having to do any of these contortions in $t$. There goes that point I gave to feverish-insomnia me.

In particular, $L(q,\dot q) = \frac{1}{2}(m\dot q\cdot\dot q - kq\cdot q)$ can be rewritten by converting $q$ to $\ddot q$ via the equation of motion, and from there $\dot q$ can be written in terms of $p$, so $\ddot q$ can be written in terms of $\dot p$. Presto:
$\displaystyle L = \frac{p\cdot p}{2m} - \frac{\dot p\cdot\dot p}{2k}$
without any reference to $t$. But what happens when we treat this as $M$ and write the Lagrange-analogy equations?
$\displaystyle \frac{d}{dt}\frac{\partial L}{\partial \dot p} = \frac{d}{dt}\left(-\frac{\dot p}{k}\right) = \frac{d}{dt}(q)$, because $-kq = m\ddot q = \dot p$. Similarly,
$\displaystyle \frac{\partial L}{\partial p} = \frac{p}{m} = \dot q$,
and indeed, $\frac{dq}{dt} = \dot q$.

So that worked out for a simple spring. And it wasn’t just tenuous dreamstuff it was made of, after all. Bolstered by that success, I continued to the ‘simpler’ case of constant gravity. Here, $V(q) = mgq$, where $g$ is the acceleration due to gravity, and is constant. Again, I took the cheap route of writing things in terms of $t$, but this time I was unable to fold all the $t$s back into an expression with only $p,\dot p$ as variables. So that’s the bad news for this one. The good news is that if you take $L(p,\dot p,q)$ and apply the partials, you do get $\frac{dq}{dt} = \dot q$ again. Unfortunately, this requires more data than the original formulations, as the Hamiltonian approach gets by with a proper subset of those coordinate variables. I had thought I had gotten away from requiring $q$, but looking at what I wrote in my delirious state, that really was a phantasm of night.

It would appear this pseudo Lagrangian approach can work for certain situations, most likely ones whose equations of motion are second order homogeneous differential equations such that $q$ can be solved for in terms of $\dot q, \ddot q$, which can be converted to $p,\dot p$. This seems likely at least for the given kinetic energy that was used here. A DHO (damped harmonic oscillator) might be worth looking at in the future, as those provide a generic linear second order homogeneous differential equation of motion.

# Classical Mechanics formulations (Part 1)

Given fixed starting position and time, $q_0$ and $t_0$, and fixed ending position and time, $q_1$ and $t_1$, when a particle travels along a path of ‘least’ action, it obeys the Euler-Lagrange equations for some Lagrangian, $L$:
$\displaystyle \frac{d}{dt}\frac{\partial L}{\partial \dot{q}^i} = \frac{\partial L}{\partial q^i}$
which is a fancy way of saying the time derivative of $p_i$ (momentum) is equal to $F_i$ (force). The natural variables for this Lagrangian approach are $q$ (position) and $\dot{q}$ (velocity), from which $p$ and $F$ are built.

Given the right conditions, we can recast this formulation into the Hamiltonian approach, where $q^i$ and $p_i$ are the natural variables, and several nice things happen. By ‘right conditions’ I mean conditions that would allow us to return to the Lagrangian approach. One of the nice things that happen is position and momentum can be seen to be conjugate to each other in a way that is impossible for position and velocity. Indeed, Hamilton’s equations illustrate this conjugacy nicely:
$\displaystyle \frac{dp_i}{dt} = -\frac{\partial H}{\partial q^i}\\ \frac{dq^i}{dt} = \frac{\partial H}{\partial p_i}$
where $H(q^i,p_i)$ is the total energy function.

If $p$ and $q$ are so similar, could we not recast this yet again, but in terms of $p$ and $\dot p = F$, much like the Lagrangian approach was in terms of $q$ and $\dot q$? Or if we are feeling zealous with reformulations, why not consider mechanics recast in terms of $\dot q$ and $F$, like a derived Hamiltonian approach? These are some questions that occurred to me near the end of last quarter in Dr. Baez’ Classical Mechanics (Math 241) course, when he went over how to transition from the Lagrangian approach to the Hamiltonian approach.

At first blush, these ‘new’ approaches seem to give us less information than the old ones. To wit, in Newtonian mechanics, $p = m \dot q$, so any information about the absolute position appears to be lost to a constant of integration, especially for the $\dot q, F$ approach. But it is worse than this. For each particle being considered, the constant of integration may be different. So not only do we lose absolute position, we also lose relative position. This limits our considerations to situations where potential energy is zero, unless something very nice happens that would allow us to recover $q$.

The nice thing about mathematics versus physics, is that I can cast aside the difficulties of whether or not things are physically relevant, as long as they make sense mathematically. So I will set aside any complaints about possible non-utility and forge ahead. I have not actually looked that far ahead yet, but I suspect the first ‘new’ approach will be somewhat similar to the Lagrangian approach, via the analogy between $q$ and $p$. That is, I suspect there will be some function, $M$, analogous to the Lagrangian, $L$, such that:
$\displaystyle \frac{d}{dt}\frac{\partial M}{\partial \dot{p}_i} = \frac{\partial M}{\partial p_i}$
where $\frac{\partial M}{\partial \dot{p}_i}$ and $\frac{\partial M}{\partial p_i}$ will be interesting quantities, perhaps even position and velocity.

The second ‘new’ approach will almost certainly be lossy, but I suspect it will follow a pattern similar to the Hamilton equations. For convenience, I will write $v:=\dot q$ for these:
$\displaystyle \frac{dF_i}{dt} = -\frac{\partial J}{\partial v^i}\\ \frac{dv^i}{dt} = \frac{\partial J}{\partial F_i}$
where $J$ is something analogous to total energy, and should have units of power / time.

So I leave, for now, with some things to ponder, and some guesses as to the direction they will lead.

I am currently studying Hebrew, besides the million other things that are bouncing around in my mind. Seeing if I can memorize the paradigm for verbs in the Qal. I do not (as yet) have a good input method for typing Hebrew, so the stuff that is in Hebrew characters will be brief and to the point. The example verb I’m using for this post is פקד mainly because that’s the verb that I first looked at for this paradigm. The conjugation chart is upside-down, but from what I understand, that’s mainly because the third person masculine singular form of the Qal is what you’ll find if you look up a verb in a lexicon.

 Singular Plural 3ms (he/it) 3fs (she/it) 3p (they, any gender) פָּקַד פָּֽקְדָה פָּֽקְדוּ 2ms (you, bro) 2fs (you, sis) 2mp (you guys) 2fp (you ladies) פָּקַ֫דְתָּ פָּקַדְתְּ פְּקַדְתֶּם פְּקַדְתֶּן 1s (I, either gender) 1p (we, either gender) פָּקַ֫דְתִּי פָּקַ֫דְנוּ

That’s the paradigm, so now some keys to remembering what’s going on. First the vowels under the stem. The basic shape of the vowels is qamets followed by patach.
• 3fs and 3p look different because they have undergone pretonic reduction. The patach reduces to a vocal shewa, and a meteg is inserted by the qamets to make sure it stays long (otherwise it would look like it had turned into a qamets hatuf).
• 2mp and 2fp look different because they have undergone propretonic reduction. The qamets reduces to a vocal shewa.
• The shewa under the third letter of the stem in first and second person forms is a silent shewa. It’s basically keeping the second syllable closed. In the third person, it’s not there because it’s superfluous in 3ms, and the other two are getting vowel sounds that are making pretonic reduction happen.

The stem remains the same, and the vowels attached to the stem have been dealt with. Now for the stuff added to the stem.
• 3fs gets -ah (qamets he) appended, just like the typical form of feminine nouns.
• 3p gets -u (sureq) appended.
• 1p gets -nu (nun sureq) appended. Sounds like the french word for we: nous.
• Everything else starts with -t (tav) being appended:
2ms -ta (qamets).
2fs -t (shewa – this one is weird because usually back-to-back shewas are not both silent).
1s -ti (hireq yod).
2mp -tem (seghol mem) is similar to
2fp -ten (seghol nun), which can be remembered as you ladies are all tens.

There are a few places where an accent is included to indicate the syllable that has the stress. These are needed on the forms that add syllables, but do not have any (pro)pretonic reduction. That is, they appear in the 2ms, 1s, and 1p forms, and restore the stress to the same place it was in the 3ms form: on the second syllable.

Some Hebrew letters (e.g. gutterals) don’t like being doubled or taking vocal shewas, so variations on this theme occur to account for those verbs that have such letters getting in the way of this paradigm.

# All in a day’s work

A friend of mine is teaching engineering-type stuff at another university, and he relayed a question to me, which I think he said came from his students.  He asked me if I could prove why a certain transformation works.  After a false start in interpretation, wherein I proved that it works, which he was already convinced of and for which didn’t need any further corroboration, I think I understand the spirit of his question well enough to provide a (hopefully) satisfactory answer.  And since I will be writing the answer up anyway, I may as well blog it up here.

The problem:  You have two coordinate frames, each Cartesian, with one frame rotated and displaced relative to the other.  Let $R$ be the matrix that describes the rotation, and let $v$ be the vector that gives the displacement of the origin.  A point, $p$, with coordinates given in the second frame (as a column vector) can be expressed in the first frame by the transformation $p_1 = Rp + v$.  If you picked the wrong direction to rotate or translate, replace $R$ with $R^{-1}$ or $v$ with $-v$.  Regardless, this transformation is annoyingly affine.

The solution:  Augment $R$ with $v$ as a new column, and row filled with zeros in all entries except the last, which will be 1.  Let’s call this augmented matrix $T$.  Append a 1 to the bottom of $p$, too.  Let’s call that $p'$.  Now $Tp'$ will also have a 1 in the bottom entry, and $p_1$ can be read off by ignoring that extra 1.  The question of whether this will work is left as an exercise to the reader; it is not difficult to convince oneself it will always work.

The puzzle:  Why does adding a dimension like this convert our transformation from one that is affine to one that is linear?

An aside, as to the engineering significance of the problem, suppose you have several rods connected by rotating joints.  If you want to know the position of the end of the last rod, relative to the base of the first rod, this kind of transformation, possibly composed several times, would be a way to determine that position.  The potential for composing the transformation several times is very good reason why it is so nice that the affine transformation can be converted to a linear one.

The justification:  Generalize the problem to the case where the direction of the displacement is fixed, but the magnitude is not.  That is, $p_1 = Rp +\lambda v$, where $\lambda \in \mathbb{R}$.  The reason for this generalization is that it makes the affine transformation we are interested in be a special case of this transformation, with $\lambda=1$, and just as importantly, this transformation is a linear combination of linear transformations!  The value of $\lambda$ is independent of the rotation, which means we have the side effect of increasing the dimension of the transformation by 1, as seen in the solution.

A calculation analogous to the exercise above shows for this generalization, the matrix representing it is $R$, augmented by $v$.  This is not a square matrix, but square matrices are rather convenient, since the vector space in the codomain is the same as in the domain.  We can make it square by adding a row.  This row will be filled with zeros except the last column, which will be 1, in order to make the determinant 1.  This is exactly $T$.  Now let’s take a look at why $p'$ is what it is.  In order to translate by $\lambda v$, $\lambda$ is appended to $p$ instead of 1.  But as we have already seen, the transformation we are actually interested in is when $\lambda=1$.  Therefore the linearization ought to have the form prescribed by the solution.

# On Roflections

For my inaugural post here, I would merely like to explain the title chosen for this blog.  Symmetry is all around us, and many important things can be related to observing symmetries.  Two basic symmetries that often go hand-in-hand are reflection and rotation.  My language below will have a bias towards two dimensions, but a lot of it does generalize to higher dimensions.

Rotations can be made from reflecting twice, but along different axes (that go through a common point).  What happens if you keep adding more reflections through axes that go through that point?  Three reflections will give you something that may be a reflection, but it also may not be either a reflection or a rotation.  I don’t know of a standard word for a combined reflection and rotation, so I made a suitcase with two equal-sized compartments to put them in:  roflection.

What happens if you reflect again?  In two dimensions, a reflection with a roflection will always combine to make a rotation, since four reflections about a common point is equivalent to two rotations about that point, which is another rotation.  In higher dimension, it is still considered a rotation, though not necessarily a simple rotation.  For instance, in 4D, a general rotation leaves a point fixed, and will have two orthogonal planes fixed, in the sense that those planes are closed under the operation of applying that rotation any number of times.

There is a nice pun value to the term ‘roflection’ as well, thanks to the penchant towards abbreviating in texting and internet culture, which include a number of phrases that indicate amusement.  ‘Rofl’ is one such abbreviation, and it is my hope that there will be occasion for jocular posts.