I have been thinking a lot about matrix multiplication recently. Specifically, if you’re multiplying two matrices of size , I find it very hard to understand how it’s possible to achieve this in better than time. The reasoning here is that you have to calculate elements of the output and for each element you have to do calculations, leading to calculations.

In spite of this I am aware that there are algorithms that can multiply the two matrices in significantly less time, in fact the current best algorithms can do so in , a huge amount better than . I spent a little time looking into this, and found that the history of matrix multiplication is surprisingly interesting.

It turns out that in computer science circles this scaling is so important that is has its own symbol, . The quantity is defined so that the scaling of any given algorithm is . Concretely, the naive idea I put forward in the first paragraph has . How did we get from the naive algorithm to today’s ?

The answer is that we got there in fits and starts. In the following graph I have collected some references showing how the best known value of has changed with time. Here is a graph showing the best known value for over the years.

This graph shows the best currently known value of as a function of time. The upper, horizontal bar shows the scaling of the algorithm, and the lower, horizontal bar shows the hypothesized (although not yet realized) best possible scaling for a matrix multiplication algorithm, which is .

Since time immemorial people have known the algorithm (or just assumed that no improvement is possible). Absolutely no progress was made in this direction until 1969, when Volker Strassen published his paper demonstrating an algorithm with .

I find the Strassen algorithm unbelievable (I guess the polite scientific term for that is ‘highly non-trivial’). In short, Strassen found a way of reducing the number of multiplications you need to do to multiply two matrices, , from 8 to 7, via a really convoluted series of equations

Sometimes I look at algorithms and think to myself “yes, I could have thought of that”. This time, though, I just have no idea where it came from. There was a leap of insight taken somewhere along the line there that I just can’t begin to fathom. Really incredible stuff.

comments powered by Disqus