01 February 2021

How many characters does it take to invert a matrix?

For almost 30 years—starting in the 80s—the introductory computer science class at MIT was 6.001 “Structure and Interpretation of Computer Programs”. Whether you’re a programmer or not, this first lecture by Hal Abelson gives an inspiring intro to the topic of computation:


This particular video was recorded in 1986, making it a fun time capsule of not just the haircuts and outfits of the students in the classroom, but also—while pretty timeless—on some topics of programming. I loved the part around the 28 minute mark where Abelson is describing a general framework for thinking about a language:

  1. Primitive elements: “what does the language come with”
  2. Means of combination: “what are the things that allow you take these primitive elements and build bigger things out of them”
  3. Means of abstraction: “how do we take those complicated things and … name them so we can use them as if they are primitive elements in making more complex things and so on and so on.”

and then he says:

So when someone says, “gee I have a great new programming language,” you don’t say, “how many characters does it take to invert a matrix?” It’s irrelevant.

This hypothetical situation sounds so outlandish and far fetched with today’s verbose and easy-to-read programming languages, but I must assume that he was taking a dig at the ultra succinct, chock-full of symbols, developed in the 60s programming language, APL (which stands for “A Programing Language”).

From Wikipedia:

The programming language APL uses a number of symbols, rather than words from natural language, to identify operations, similarly to mathematical symbols. Prior to the wide adoption of Unicode, a number of special-purpose EBCDIC and non-EBCDIC code pages were used to represent the symbols required for writing APL.

There were even custom keyboards used for it:

Close-up of an APL keyboard

So, if you’re curious how many characters it takes to invert a matrix in APL, well the answer is there’s a matrix inverse primitive function and it’s one character: ⌹




Did you find this helpful or fun? paypal.me/mrcoles
comments powered by Disqus

Peter Coles

Peter Coles

is a software engineer living in NYC who is building Superset 💪 and also created GoFullPage 📸
more »

github · soundcloud · @lethys · rss