Marking some homework

Another box in the garage, another notebook.

This one is from 1996, my first year of doctoral study, and it runs to thirty pages of Krylov subspace methods — conjugate gradient, SYMMLQ and MINRES — worked from first principles out of a 1975 paper by Paige and Saunders.

These are methods for solving Ax = b when A is far too large to invert. You don’t solve the system. You build a small subspace, find the best answer available inside it, then grow the subspace and go again. MINRES is the one that comes with a guarantee: the error never gets worse. You can stop whenever you like and know you haven’t gone backwards.

I did it by hand from the paper. No internet. A biro, a lot of evenings, cheap instant coffee, and a serum nicotine level I am not presently proud of.

Claude and I checked it, thirty years late. Two passes — read every line and re-derive it, then implement the recurrences exactly as written and run them against a direct solve.

The kid held up. I’ll keep calling him that — thirty years is enough distance for the third person, and it lets me hand him the credit and keep the mistakes.

All three algorithms land on the exact answer to about fifteen decimal places, on well-behaved systems and on the nasty indefinite ones that make conjugate gradient fall over.

There are four errors in thirty pages, and not one of them is a wrong answer. Every one is a place where I asserted something true without a valid argument for it — a proof by obviously, where the obvious thing happened to be right. That is the better direction to fail in, and roughly what the next three years were for.

Twice he writes something down and admits he hasn’t earned it. I presume this could be sought by a little induction. I recommend verifying this progression formulation before implementing it! Both turn out to be correct. Knowing which of your own steps you haven’t proved is not nothing at twenty-one.

My favourite thing in there isn’t a mistake at all. Paige and Saunders describe a certain 2×2 matrix as a rotation. On page 8 the twenty-one-year-old has stopped, taken its determinant, got −1, and noted that it is in fact a reflection. He was right — and it pays, because reflections are their own inverse, and he leans on exactly that twice in the pages that follow. He didn’t take the paper’s word for it, and got something for the trouble.

The whole thirty pages exist to reach one line. Everything on the right of it is a sine, and no sine is bigger than one, so the residual is a shrinking product and cannot grow. The quantity that makes conjugate gradient blow up — a division by a cosine — cancels in the very last step.

I don’t remember writing the detail. I remember the nights.

The arithmetic is still good, and the notebook is a PDF now.


I’m not posting this out of vanity, and it isn’t a back-in-my-day grumble. There’s a point in it, and some questions.

Thirty years ago the price of a technical PhD was building your own toolbox. Not reading about the tools — deriving them, from the original papers, until you knew why they worked. This notebook and one other, on a Hamiltonian for two molecular fragments, levelled a small rainforest in scratch paper before I wrote out the 90+ pages of neat final versions.

None of it went into the thesis. Not a line. The algebra would have made far better eye candy than most of what did.

So: does anyone still work this way? Was it necessary, or was it ritual? And where does that work go, given it made me competent and made no publication?

I ask in hope rather than complaint. I want the answer to be yes, they still do — because I think that is how you build a scientist. You put in the work and it makes your mind stronger, even when the particular quest has nothing to do with where you end up.

A Maclaurin in my garage?

Rummaging through my garage, I found a box of old notebooks. One of them has three pages dated 11 April 2005.

I’d been in a seminar. I have no memory of what the seminar was about (probably some boring corporate stuff) and I’d clearly stopped listening early. What I did instead, over about an hour, was work out how to tell whether a list of numbers had come from a polynomial — and if so, which one.

The method goes like this. Write the numbers in a row. Difference each neighbouring pair to get a shorter row. Do it again. Keep going until the row is constant. The number of passes gives you the degree; that constant, divided by the same number factorial, gives you the leading coefficient. Subtract the term off and go round again for the next one down.

So 13.5, 33, 74.5, 147, 259.5, 421 collapses to 9, 9, 9 after three passes. 9 ÷ 3! = 1.5. Peel off 1.5x³, repeat, and out comes 1.5x³ + 2x² + 3x + 7.

Which is correct. Claude and I checked, twenty-one years late. The arithmetic holds and so does the method.

Then we went looking for whoever got there first, because I’d written, in that same hour, “I am sure this has been considered by someone else many moons ago.” Fair — though centuries would have been a better word than moons.

It’s Newton and Gregory, in the 1670s and 80s. Not Babbage, which is where I’d have guessed: Babbage’s Difference Engine ran the same idea forwards, grinding out tables from differences it already had. I was running it backwards, recovering the polynomial from its output. The engine isn’t the theorem.

Just because people did it 300 years before doesn’t make me wrong. I did this from scratch — no Wikipedia, no Google, just a biro (remember those?) and a seminar I’d disengaged from. Looking a thing up and reconstructing it are different exercises, and only one of them tells you whether you understood it.

And I’d signed off with one more line: “I think this process is ‘Maclaurin in reverse’!”

Colin Maclaurin — Scot, mathematician, dead since 1746 — has his name on the series you get when you expand a function around zero. What I had no way of knowing without leaving that seminar is that Brook Taylor derived the whole family of those series from the calculus of finite differences, in 1715. The discrete came first. The smooth version fell out of it as a limit.

Which makes that line less a quip than a conjecture. And a correct one — more or less a statement of Newton’s forward-difference formula, arrived at by someone who was bored.

No McLaren in the garage, then. But a Maclaurin appreciates.

Full write-up, with the proof I said would “have to wait for a bit”

Persymmetry, eventually

Back in my chemistry-PhD days — modelling how molecules fly apart — I kept running into a tidy sort of matrix called a circulant. I spotted a small pattern hiding in them and, around 2011, wrote it up. Then life did its thing: work, moves, the usual entropy. The write-up went in a drawer, and somewhere along the way I lost the original .tex file completely.

This year, with my stack finally empty (see: Writing again), I dug it out, rebuilt it from an ancient PDF, and checked the maths until the computer and I agreed to about twelve decimal places. Then I sent it to a journal. Desk-rejected — no review. I tried a second, a third, and a fourth.

Nobody quite warns you that this kind of rejection isn’t a ruling that you’re wrong. It’s a ruling that you’re not new enough. The result is correct, and apparently rather elegant — but circulants have been thoroughly adored by mathematicians for a century, and “correct and elegant” doesn’t always earn a slice of a journal’s attention. Fair enough.

I could have kept knocking on doors. I didn’t fancy it. (arXiv, the usual home for these things, now wants an institutional sponsor I don’t have — the perks of being an unaffiliated, semi-retired bloke who does crowd control for beer Sprite money.) So I did the unglamorous, oddly liberating thing and published it myself, with a proper DOI, free for anyone to read.

It’s finished. It exists. It has my name on it and a permanent address. That’ll do.

→ Spectral persymmetry of complex circulant and skew-circulant matrices

Binomial compression algorithm

Over a decade ago, I had to fly for work quite frequently. Streaming wasn’t really a thing back then, which left me only reading and writing to alleviate boredom. Once in a while, I would mix things up and think about maths problems.

I recently unified some of those airline thoughts; Python makes prototyping easy. I have opened up my GitHub repo a little. Constructive feedback is encouraged.

Edit (Jan 2026): I swapped from Python to Go. Email me for repo details.