Matrix Multiplication Math and AI…

Other threads have discussed some AI math breakthroughs. Years ago, I took a course in robotics - I really didn’t enjoy the exams, which boiled down to hundreds of matrix multiplications and so were very tedious.

Still, this AI math breakthrough seems more practical than most of them, which I appreciate. What Ai found is not only a way to speed up matrix calculations but perhaps a proof that they cannot be speeded up further…

Here is how ChatGPT describes it:

Matrix Multiplication Exponents and the Proposed AI Discovery of 9/4

1. What is the matrix multiplication exponent?

The matrix multiplication exponent describes the minimum asymptotic computational effort required to multiply two square matrices.

Suppose we have two matrices, A and B, each containing n rows and n columns. Their product, C = AB, also contains n² entries.

Conventionally, calculating each entry requires n multiplications and n − 1 additions.

The total number of multiplications is therefore:

n² × n = n³

For two 1,000 × 1,000 matrices, this means one billion multiplications.

Mathematicians use the Greek letter omega (ω) to represent the optimal asymptotic exponent of matrix multiplication.

The computational workload scales approximately as:

Work = n^ω

More precisely, ω is the infimum of the exponents for which an arithmetic algorithm exists with that asymptotic complexity.

The conventional algorithm has an exponent of 3. The theoretical lower bound is 2, since there are n² output entries.

The fundamental question is where the optimal exponent lies between 2 and 3.

2. Strassen’s discovery in 1969

Until 1969, it was not obvious that matrix multiplication could be performed with an exponent smaller than 3.

Volker Strassen discovered that two 2 × 2 matrices could be multiplied using seven multiplications instead of eight, at the expense of additional additions and subtractions.

Suppose:

A = [(a, b), (c, d)]

B = [(e, f), (g, h)]

Strassen defined seven intermediate products:

M1 = (a + d)(e + h)

M2 = (c + d)e

M3 = a(f − h)

M4 = d(g − e)

M5 = (a + b)h

M6 = (c − a)(e + f)

M7 = (b − d)(g + h)

The four entries of the resulting matrix are:

C11 = M1 + M4 − M5 + M7

C12 = M3 + M5

C21 = M2 + M4

C22 = M1 − M2 + M3 + M6

This seemingly modest improvement becomes enormously important when applied recursively to larger matrices.

For matrices of dimension 2^k, the conventional algorithm requires 8^k multiplications, whereas Strassen’s algorithm requires only 7^k.

Consequently:

ω ≤ log₂(7) = approximately 2.807355

Strassen discovered that multiplication operations could be shared across apparently independent calculations.

It was a discovery of hidden algebraic structure rather than simply more efficient bookkeeping.

3. The historical pursuit of a smaller exponent

For more than half a century, mathematicians have progressively lowered the upper bound.

Selected historical milestones include:

Conventional multiplication: 3

Strassen (1969): 2.807355

Coppersmith–Winograd (1990): approximately 2.376

Subsequent refinements: approximately 2.371

Proposed AI breakthrough (2026): 2.25, or 9/4

Progress had become extremely slow, with improvements frequently occurring in the fourth or fifth decimal place.

Many mathematicians conjecture that the ultimate exponent is 2, meaning that matrix multiplication could theoretically be performed in nearly quadratic time.

4. The proposed AI discovery of 9/4

Two distinct results were described in the preceding discussion:

An upper bound:

ω ≤ 9/4

This would mean that an algorithm exists capable of multiplying matrices with an asymptotic exponent no greater than 2.25.

A matching lower bound:

ω ≥ 9/4

This would mean that no arithmetic algorithm could achieve an exponent smaller than 2.25.

If both results were established, the exact matrix multiplication exponent would be:

ω = 9/4 = 2.25

This would settle a major mathematical problem and disprove the conjecture that ω = 2.

An important qualification: the recent AI claims and their reported independent verification have not been independently rechecked for this summary. The exact value of 9/4 should therefore be treated as a proposed result rather than an established mathematical fact.

5. Why would 9/4 be surprising?

There are several reasons.

First, mathematicians have long hoped that matrix multiplication could ultimately be performed in nearly quadratic time.

An exponent of 9/4 would imply an irreducible additional computational overhead:

n^(9/4) = n² × n^(1/4)

Second, there is no immediately obvious reason why the exact exponent should be such a simple rational number.

Strassen’s exponent, for example, is log₂(7), an irrational number. Many subsequent improvements have emerged from complicated mathematical optimization.

Third, if the result holds across different mathematical fields, it would suggest that 9/4 reflects something fundamental about the algebraic structure of matrix multiplication, rather than a peculiarity of a particular number system.

6. Transforming matrix multiplication into tensor mathematics

A particularly interesting aspect of modern matrix multiplication research is that mathematicians do not necessarily study matrix multiplication directly.

Instead, they transform the problem into the language of tensors.

A tensor, in this context, is a mathematical object encoding the relationships among three sets of variables:

The entries of matrix A.

The entries of matrix B.

The entries of their product C.

A matrix multiplication algorithm can be represented as a decomposition of this tensor into simpler components.

Finding a more efficient decomposition can produce a more efficient multiplication algorithm.

Strassen’s discovery can itself be interpreted in this language.

The advantage is that tensors possess mathematical properties that are difficult to recognize when examining ordinary matrices.

7. How 9/4 reportedly emerges

The proposed AI upper-bound proof was described as making a further transformation, connecting tensor mathematics to polynomial multiplication.

In simplified notation, the reported argument establishes two inequalities involving a quantity P(a,a) associated with polynomial multiplication:

P(a,a) ≥ a^(4/3)

P(a,a) ≤ (2a − 1)^(1/t)

Here, t is a parameter associated with a tensor invariant.

For both inequalities to remain true as a becomes arbitrarily large, the exponent in the upper bound cannot be smaller than the exponent in the lower bound.

Consequently:

4/3 ≤ 1/t

Rearranging:

t ≤ 3/4

If the matrix multiplication exponent is controlled by 3t, then:

ω ≤ 3t

Therefore:

ω ≤ 3 × 3/4

ω ≤ 9/4

This is the reported final arithmetic step, not a complete proof.

The mathematical achievement would lie in establishing the preceding inequalities and justifying their relationship to matrix multiplication.

After a sophisticated sequence of mathematical transformations, the numerical boundary emerges from an elementary comparison of powers.

8. The proposed lower-bound proof

Proving a lower bound is arguably even more remarkable than discovering a faster algorithm.

How can mathematicians prove that nobody will ever invent an algorithm that performs better?

They cannot examine every conceivable algorithm.

Instead, they can attempt to establish a mathematical contradiction that would arise if a faster algorithm existed.

The proposed AI lower-bound proof was described as connecting matrix multiplication to an apparently unrelated problem: determining whether lists of items contain duplicate entries.

The proposed reasoning proceeds as follows:

Assume that ω is smaller than 9/4.

Transform the faster multiplication algorithm into a method for compressing tensor networks.

Use those networks to determine whether lists contain duplicate entries.

Perform this task with less computational effort than a proposed mathematical lower-bound theorem permits.

Obtain a contradiction.

Conclude that ω cannot be smaller than 9/4.

If valid, this would establish a computational impossibility in one mathematical setting and transfer that impossibility back to matrix multiplication.

The validity and scope of the underlying lower-bound theorem would be crucial.

9. Practical significance

Consider multiplying two matrices, each with one million rows and one million columns.

Ignoring constants and other computational overhead, the approximate scaling factors would be:

Conventional algorithm, exponent 3:

10^18

Strassen’s algorithm, exponent 2.807:

7.0 × 10^16

Previous upper bound, exponent 2.371:

1.7 × 10^14

Proposed AI upper bound, exponent 2.25:

3.16 × 10^13

Conjectured ideal, exponent 2:

10^12

An exponent of 2.25 would represent an enormous theoretical improvement over conventional matrix multiplication.

Matrix multiplication is fundamental to artificial intelligence, fluid dynamics, computer graphics, engineering simulations, statistical analysis and scientific computing.

However, asymptotically superior algorithms can involve enormous hidden constants, additional memory requirements and considerable computational overhead.

Discovering what is mathematically possible is not the same as making it practically useful.

10. The broader mathematical significance

The most interesting feature of the proposed discovery is the sequence of mathematical transformations involved:

Matrix multiplication becomes tensor mathematics.

Tensor mathematics becomes polynomial multiplication.

Computational complexity becomes network structure.

Network structure becomes a problem involving the detection of duplicate entries.

None of these connections is immediately obvious when examining two ordinary matrices.

This resembles the intellectual strategies employed in Stepanov’s method, Fourier transformations and theta lifts.

A difficult problem is transformed into an apparently unrelated problem whose mathematical structure may be easier to understand.

The achievement of AI mathematics, therefore, may not simply be performing calculations that would take humans too long.

It may increasingly involve discovering which mathematical languages a problem should be translated into.

If the exact exponent of 9/4 survives rigorous independent verification, it would represent an extraordinary achievement in theoretical computer science and AI-assisted mathematics.

TL; DR… Scientific American magazine puts it this way:

“On November 24 OpenAI quietly dropped an unglamorous proof that has astounded mathematicians. It involves multiplying two matrices—a seemingly simple calculation on which researchers have long struggled to set theoretical speed limits. OpenAI showed that a number representing that speed limit has an unexpectedly exact value. This is more important than it sounds: matrix multiplication is central to numerical simulations used in everything from climate modeling to astrophysics and quantum chemistry. It’s also central to AI itself.”

“Since the 1960s mathematicians have strived to reduce a number called the matrix multiplication exponent down from a trivially known upper bound of 3. The smaller the exponent is, the slower the computations will grow as the matrices grow in size. OpenAI’s proof, which is yet to be fully understood and verified by mathematicians, shows that the exponent is 9⁄4, or 2.25, and cannot go any lower. Until recently, for matrix multiplication, “the exponents we were dealing with were disgusting numbers. They were irrational numbers. There was no reason to expect it would just come out to be 9⁄4,” says applied mathematician Alex Townsend of Cornell University. “I’m very shocked. I just cannot get my head around why it’s such a nice fraction.”

Normal link, possibly paywalled?

Sounds like OpenAI took the red pill.

Software engineer asking the obvious question: did the AI propose an implementable algorithm, or is this just a theoretic discovery?

Don’t quite understand what @pjd meant… are matrices woke?

One pill makes you larger

And one pill makes you small

And the ones that mother gives you

Don’t do anything at all

Go ask Alice

When she’s ten feet tall

And if you go chasing rabbits

And you know you’re going to fall

Tell them a hookah-smoking caterpillar

Has given you the call

Call Alice when she was just small

When the men on the chess board

Get up and tell you where to go

And you just had some kind of mushroom

And your mind is moving slow…

I’m sure it’s a reference to The Matrix.

Ah yes… I was using more modern usages, not thinking about its origin.

What’s the constant?

Current best big O algorithms are not the best practical algorithms. Raising the theoretical lower bound from 2 to 2.25 is interesting, but not necessarily useful.

“White Rabbit” from 1966 is more modern than The Matrix from 1999?

“Low”, not “slow”. Yeah, it doesn’t make much sense to me either, but that’s what it says.

There are more woke-centric uses of the term over the last ten years or so. I’ve never actually seen that movie.

Yeah, I’m wondering that, too. The proof of the lower bound, yeah, it’ll take some mathematical work to confirm that. And if they just proved the existence of a 9/4 algorithm without actually providing one, then that’ll also take some real work to confirm. But if they actually provided an algorithm, it should be fairly simple to confirm that.

One quick possibility that occurs to me: It’s easy to show that you can convert one kind of problem into another kind of problem, and any method that solves the new kind of problem can then be used to solve the old kind of problem. But how much work is needed in the conversion? The summary, at least, glossed over that.

I think there’s a misunderstanding here. If I’m understanding the new result (and I may not be), they are not saying that there exists an algorithm with O(n^\frac{9}{4}) complexity. That was already proven a few months ago (again by AI). What the new result shows is that no possible algorithm can do better than 9/4.

I think the earlier proof that there exists a 9/4 algorithm did in fact demonstrate such an algorithm (although I haven’t been able to find details). But the algorithm demonstrated is “galactic”, which is another word for “useless”, because it only reaches the 9/4 growth rate when applied to ridiculously large matrices which would and could never be used in real life.

I can provide more details, but the usual (human) way to prove upper bounds for matrix multiplication involves techniques (cf. Strassen’s Laser Method) where you try to come up with a combinatorially optimal divide-and-conquer method where you set up a multiplication problem of (not necessarily square) matrices with the entries being blocks and apply the algorithm recursively. You can (in principle) turn this into an actual algorithm that will apply to huge-enough matrices, but no attempt is made to do so and it would probably perform terribly. The point is to establish theoretical computational complexity, not at all to produce Fortran code for BLAS.