Linear Algebra

Test your knowledge:

  • Video games are so immersive that some are described as first-person. How do you get computers to draw worlds that are so realistic?

  • How do you train a Large Language Model?

  • How do you rank web pages indexed by a search engine?

  • Given a polynomial, how do you find its approximate roots? Given an approximate root, how do you find its minimal polynomial?

  • How do you compute the one-millionth hex digit of \(\pi\)?

  • What’s the best way to crack RSA and other modern cryptosystems?

  • How do practical error-correcting codes work? How do you turn them into cryptosystems?

The answer to each question involves linear algebra. And yet, this is but a small sample of its rich and diverse applications.

Its rich and diverse applications make linear algebra worth learning but tricky to teach. Steven Pinker, The Sense of Style, Chapter 4, explains that knowledge in our brains can be modeled as a graph, that is, a bunch of nodes connected by edges. (Pinker uses the non-mathematical term "web", which I prefer, as everyone knows the World Wide Web is a bunch of nodes connected by links.) To transfer knowledge to a fellow human, we must serialize this graph to a string, a string that is ultimately processed by a low-power computer with a tiny cache, namely, a human.

Thus linear stories are the easiest to tell. We start at the first event, then explain every subsequent event in order of occurrence. The listener spends almost no energy connecting them.

But linear algebra is not a linear story. Its graph in our brain is a glorious jumble of nodes and links. Serializing it is like serializing the internet. Where do you start? Once you start, what do you encode next?

When textbooks tell the story, they usually introduce strange plot devices out of the blue and force them into the narrative. The logic holds, and the proofs work, but we remain mystified. It only starts to make sense once we have built up more of the graph by reading a lot more.

I believe the story can be made smoother with the help of two great books:

  • Sheldon Axler, Linear Algebra Done Right, teaches eigenvalues without resorting to determinants.

  • Paul Halmos, Finite Vector Spaces, establishes well-known results while hardly mentioning matrices; in particular, we learn of a direct path from eigenvalues to the Jordan normal form.

These notes retrace my recommended route through these books.


Ben Lynn blynn@cs.stanford.edu 💡