Every now and then a phrase pops into my head and won’t leave until I write it down or tell it to someone else.
One day the little voice in my head suggested putting “Didn’t” before the classic series of maths textbooks, Graduate Texts in Mathematics.
So I found a cover of a GTIM book, stuck “Didn’t” on the front and changed the title to an in-joke about not understanding category theory, and was happy with my life.
But then I thought that it would make sense to make a whole series of these, so I spent a couple of hours making a meme generator.
A while ago I made myself a calculator. I don’t know if anyone else uses it, but for the particular way I like doing calculations, it’s been really good. You’d think that if a calculator does anything, it should perform calculations correctly. But all calculators get things wrong sometimes! This is the story of how I made my calculator a bit more correct, using constructive real arithmetic.
One thing you need to think about when making a calculator is precision. How precise do the answers need to be? Is it OK to do rounding? If you do round, then it’s possible that errors accumulate as you compose operations.
I’ve always wanted to make a calculator that gives exactly correct answers. This isn’t strictly possible: there are more real numbers than a finite number of bits of memory can represent, or a digital display can show, no matter how you encode them. But I’m not going to use every real number, so I’ll be happy with just being correct on the numbers I’m likely to encounter.
At the 2021 UK MathsJam Gathering, I gave a talk on a subject that has bothered me more than is reasonable: the graph-theoretic layout of the narrative of the baby’s book Each Peach Pear Plum, by Janet and Allan Ahlberg.
It’s one of my son’s favourite books to fall asleep to. It was his older sister’s favourite, and mine and my wife’s when we were little. I agree with the quote on the back cover, that it’s “the perfect first book”.
My son was born last September. While he doesn’t hate sleep as much as his sister did, he still needs a bit of help to drop off.
I’m not at all musically inclined, and I seem unable to remember more than a couple of lines from wordy songs (my version of “Papa’s gonna buy you a mockingbird” rapidly veers into nonsense as I try to think of a rhyme for the next line), so when the girl was little I hit upon the strategy of singing counting songs to lull her off to sleep.
Tweeting this because I want to do it but don't have time, and I want someone to pester me about it in a few weeks' time:
I'd like to start a collection of mathematical notation ambiguities, inconsistencies, and unpleasantness. It'd be a wiki, or at least collaboratively edited
— Christian Lawson-Perfect (@christianp) May 18, 2021
My aim is to collect examples of conventions in mathematical notation that lead to ambiguities, inconsistencies, or just make you feel yucky. This is largely a result of me wishing I had something to point to whenever I see $\sin^2$ or one of those viral “puzzles” relying on BODMAS.
My aim is to describe conventions, without prescribing a correct notation. Whenever I tweet a question about a notational convention, my aim is to find out the range of different opinions that people hold about it. I often get replies arguing authoritatively for a particular correct answer, usually followed up by an equally certain reply from someone else arguing for the opposite. Like all language, mathematical notation is just something we make up to help express our ideas, and opinions, abuses of notation, lapses in memory and convenience all work against consistency and clarity.
I’d like the site to collect all these difficult aspects of notation, so that they don’t trip up someone who thought they might have an easy day doing maths.
So, have a look, and if you can help to build it out, I’d be very happy!
For my birthday I got an EleksDraw pen plotter. It’s a cheap and cheerful example of the form: a pair of orthogonal metal rods with a pen on the end, attached to electric motors. The idea is that I can connect it to my computer and the computer can direct it to draw things. It arrived as a kit, so first of all I had to descend from the astral plane of pure thought and – shudder – screw the bits together.
The #plottertwitter hashtag is a constant source of inspiration, where people around the world share pictures of the amazing, beautiful things they’ve made their pen plotters draw, often with the AxiDraw plotter, which differs from mine in that nobody seems to have had to attach 200g of batteries as ballast to the pen holder to overcome friction on the knacky sliding rail.
The basic idea of a pen plotter is that the pen holder is free to move in the plane, constrained by the lengths of the two axes. If there’s a pen in the holder and paper underneath as it moves, then a drawing happens. The pen holder can move up and down, to lift the pen away from the paper so it can move without drawing.
The instructions you can give the plotter are quite straightforward: move in a straight line to these coordinates; move the pen up or down; move back to the ‘home’ position. It’s a lot like the turtle drawing robot I played with in primary school.
A Valiant turtle robot, similar to the one I used in primary school. Photo from National Education Network.
You can either directly write a list of instructions for the plotter, or write some code that takes a vector image and produces a corresponding set of instructions. SVG is a widely-used vector graphics format, so it’s a common choice of input for pen plotters.
This was very pleasing to watch.
So I was playing around with my pen plotter, getting it to draw space-filling curves and geometrical diagrams, when I decided that I should get it to draw text. It turns out that there are a few ready-made “fonts” for plotters that give paths to write letters with strokes instead of filling in shapes, so that was nice and easy.
But then I wanted to write mathematical notation, and I remembered: MathJax has an SVG output! It didn’t take long to write a bit of JavaScript that takes some maths written in LaTeX and gets MathJax to produce the corresponding SVG code and insert it into the picture, ready for my plotter to draw.
The remaining problem is that MathJax’s fonts produces shapes that should be filled in, which is easy on a computer screen, but the pen plotter just draws their outlines. That’s not much of a problem, though: I just had to trace over the symbols in Inkscape, and replace each instance of a MathJax symbol with my single-stroke traced version.
Success! But it looks like a mathematical crime scene with those outlines.
There are squillions of symbols in the TeX fonts, and I didn’t want to have to trace them all before I could draw anything, so I decided to do it bit-by-bit. I added a step to my MathJax → SVG tool to capture any symbols in the output that hadn’t been traced yet and produce an SVG file I could load into Inkscape. After tracing over those symbols, my code absorbed them into its library of replacements. I wasn’t too careful to be precise with my traced symbols – I wanted it to look as much like handwriting as I could manage.
My first few traced symbols. They already look a lot better, and more like handwriting, than the standard TeX fonts.Starting to draw TeX inline with plain text. The font I chose for the plain text made it look a bit too much like the product of a typewriter. The text is from Éléments de Géométrie of 1885 by L’Abbé M. Reydellet, another birthday present.This looks much better! The text is drawn from Philip Ording’s brilliant 99 Variations on a Proof.
The fantastic thing about MathJax is that it does a lot of work to match its output with the size of the surrounding plain text, so the results looked really good straight away.
I decided to draw some mathematical postcards to send to my maths pals. On one side I drew a picture, and on the other side I wrote a passage of text about it, often with plenty of mathematical notation.
The “front” sides of my first batch of postcards.The “back” sides, with explanations of the diagrams. You can see a few places where the pen went awry or failed to drop down, so I had to make it draw over some sections a couple more times.