# AlphaEvolve cut a multiplication from a matrix algorithm

> A tool that rewrites code found a shortcut mathematicians could check. The key was giving it a test that could tell when a proposed shortcut worked.

Published 2026-11-08

Canonical: https://machines-on-machines.anth.us/posts/alphaevolve-matrix-multiplication/

Multiply two grids of numbers the way a textbook teaches it and you get a regular procession of little multiplications. For two four-by-four grids, the straightforward method uses 64. Google DeepMind's AlphaEvolve found a recipe using 48 when the entries are complex numbers, one fewer than the 49 obtained by applying Volker Strassen's 1969 shortcut twice.

::image{
  src="assets/alphaevolve-matrix-multiplication/alphaevolve-matrix-multiplication.png" srcDark="assets/alphaevolve-matrix-multiplication/alphaevolve-matrix-multiplication.dark.png"
  layout="inline"
  alt="The textbook method uses 64 scalar multiplications, Strassen’s shortcut applied twice uses 49, and AlphaEvolve’s result uses 48."
  caption="Scalar multiplications for two four-by-four matrices with complex entries."
  credit="Drafted by AI. Approved by Ryan. Source: Novikov and colleagues, arXiv:2506.13131."
}

A matrix is a grid of numbers, and the usual method forms each answer from a row of one grid and a column of the other. There are 16 answers to compute, each requiring four multiplications. A different recipe can mix the inputs before multiplying, then use additions and subtractions to recover the same answers. The hard part is finding combinations that cancel exactly where they should.

## A language model made guesses that code could check

AlphaEvolve uses language models to propose edits to programs, then runs evaluators to see which edits improve the result. Better candidates can become the starting points for later revisions. For the matrix problem, the result was an exact algorithm in a specific mathematical setting, where the proposed identity could be verified.

The paper counts scalar multiplications, meaning multiplications between individual numbers. The count answers a narrower question than whether a computer will finish sooner. Extra additions, the cost of moving data and the hardware all matter to actual running time. The result is a new arithmetic recipe with a checkable claim about what it takes to execute.

[Read the source](https://arxiv.org/abs/2506.13131).
<!-- papyrus-source-version: 6 -->
