Fast Multiplication: Karatsuba to Strassen
Fewer multiplications by clever splitting, and the race for ω.
In 1960 Andrey Kolmogorov conjectured that multiplying two -digit numbers needs on the order of digit operations, as in the schoolbook method. Within about a week, Anatoly Karatsuba, a student in his seminar, found a way with about . The same trick, one fewer product per split, gave Strassen's matrix algorithm in 1969 and started a race that is still running.
What you’ll learn
- Derive Karatsuba's three-product identity and solve its recurrence to .
- Explain Toom–Cook multiplication as evaluation and interpolation, and place Schönhage–Strassen, Fürer and Harvey–van der Hoeven on the timeline to .
- Verify Strassen's seven products and solve .
- Define the matrix multiplication exponent , state the bounds known as of 2025, and explain why the record algorithms are not used in practice.
Karatsuba: three products instead of four
Split two -digit numbers in base into halves of digits: and . Then : four half-size products plus additions and shifts, so , no better than schoolbook. Karatsuba saves one product.
Name the three coefficients of the product:
The middle coefficient needs no product of its own:
Three products of (about) half size, plus additions and shifts. Since , the leaves dominate:
| Step | with , |
|---|---|
| Split | , , , |
| , | and |
| Result |
def karatsuba(x, y): # non-negative integers
if x < 10 or y < 10:
return x * y # base case: a single digit
m = max(len(str(x)), len(str(y))) // 2
x1, x0 = divmod(x, 10 ** m) # x = x1 * 10^m + x0
y1, y0 = divmod(y, 10 ** m)
z2 = karatsuba(x1, y1)
z0 = karatsuba(x0, y0)
z1 = karatsuba(x1 + x0, y1 + y0) - z2 - z0 # one product instead of two
return z2 * 10 ** (2 * m) + z1 * 10 ** m + z0A teaching version in base 10 (real libraries work in base or and stop recursing at a few machine words). The sums may carry one extra digit; that changes only constants.
From Toom–Cook to O(n log n)
Karatsuba is evaluation and interpolation in disguise. Read as the polynomial evaluated at , and likewise . Their product has degree 2, so three values determine it: gives , gives , and "" (the leading coefficient) gives .
Toom–Cook (Toom, 1963; Cook, 1966) splits into parts: the product has degree , so evaluations, each a product of numbers of digits, suffice. That gives , so : for and for . For every some achieves , but the interpolation constants grow quickly with .
Toom-3 splits each number into 3 parts. How many products of one-third size does it need, and what running time does that give?
- 9 products:
- 5 products:
- 6 products:
- 3 products:
Show the answer
B. 5 products:
Two degree-2 polynomials have a degree-4 product, fixed by its values at 5 points, so 5 products of one-third size suffice: , and .
Evaluating at ordinary points cannot go further. The breakthrough was to evaluate at roots of unity, where the fast Fourier transform does all evaluations at once (see The Fast Fourier Transform):
| Year | Algorithm | Bit operations for -bit integers |
|---|---|---|
| — | schoolbook | |
| 1962 | Karatsuba & Ofman | |
| 1963, 1966 | Toom; Cook | for every fixed |
| 1971 | Schönhage & Strassen, an FFT over a ring of integers modulo | |
| 2007 | Fürer | |
| 2019 (published 2021) | Harvey & van der Hoeven |
Strassen: seven products for 2 × 2 blocks
Split matrices into four blocks. The block formula uses 8 block products and additions, so . Strassen (1969) found seven products that suffice:
Seven products of sums of blocks:
The four blocks of are sums of them:
Check one: the terms cancel. The identities never swap the order of a product, so they hold for blocks, which do not commute, and the scheme can recurse:
Seven half-size products and 18 block additions or subtractions:
Seven is optimal for : no bilinear algorithm uses six multiplications (Winograd, 1971; Hopcroft & Kerr, 1971). Winograd's variant of Strassen's scheme keeps the seven products and needs only 15 additions instead of 18.
Larger base cases are where searches continue. Two levels of Strassen multiply matrices with products. Using reinforcement learning, AlphaTensor (Fawzi et al., 2022) found a scheme with 47 for arithmetic modulo 2, and in 2025 AlphaEvolve reported 48 for complex matrices.
The exponent ω
| Year | Authors | Upper bound on |
|---|---|---|
| 1969 | Strassen | 2.808 |
| 1990 | Coppersmith & Winograd | 2.376 |
| 2014 | Le Gall | 2.3728639 |
| 2023 | Duan, Wu & Zhou | 2.371866 |
| 2024 | Vassilevska Williams, Xu, Xu & Zhou | 2.371552 |
| 2025 | Alman, Duan, Vassilevska Williams, Xu, Xu & Zhou | 2.371339 |
Suppose someone proves . What exactly would that mean?
- Matrices can be multiplied with operations
- For every , matrices can be multiplied with operations
- Strassen's algorithm is optimal
- In practice, matrix multiplication is as fast as matrix addition
Show the answer
B. For every , matrices can be multiplied with operations
is an infimum: means every exponent above 2 is achievable, not that exponent 2 itself is. The constants could grow without bound as , so even then practice might not change.
Key takeaways
- Karatsuba computes three half-size products, recovering the middle coefficient as : .
- Toom–Cook evaluates at points and interpolates, for ; FFT-based methods reached in 1971 and with Harvey and van der Hoeven (2021).
- Strassen's seven products for blocks never use commutativity, so they recurse: ; no bilinear scheme does with six.
- The exponent satisfies (as of 2025); whether is open, and the record algorithms are far too large to use.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
How does Karatsuba obtain the middle coefficient with only one extra multiplication?
Show the answer
C.
Expanding gives all four cross products; subtracting the two products and , which are needed anyway, leaves the middle coefficient.
A Strassen-like algorithm for blocks needs 23 block multiplications (Laderman, 1976). Applied recursively, does it beat Strassen's ?
- Yes: 23 is far fewer than the 27 of the naive method
- No: it gives ; a scheme needs at most 21 products to win
- Yes: any exponent below 3 beats Strassen
- It is impossible to multiply blocks with fewer than 27 products
Show the answer
B. No: it gives ; a scheme needs at most 21 products to win
gives exponent . To beat Strassen, requires (, while ). Whether 21 or fewer products suffice for is unknown.
Why do numerical linear algebra libraries mostly multiply matrices with the cubic algorithm?
- At practical sizes, the cubic algorithm with cache blocking runs near peak speed, while fast algorithms add memory traffic, extra additions and weaker error bounds
- Fast algorithms give wrong answers in floating point
- Fast algorithms are slower for every matrix size
- Strassen's algorithm only works when is prime
Show the answer
A. At practical sizes, the cubic algorithm with cache blocking runs near peak speed, while fast algorithms add memory traffic, extra additions and weaker error bounds
The cubic algorithm's regular access pattern maps well onto caches and vector units, and its error bounds hold entry by entry. Strassen can pay off for large matrices and appears in some implementations, but its error bounds are only normwise, and the asymptotically fastest algorithms win only for astronomically large .
Further reading
- A. Karatsuba & Yu. Ofman, "Multiplication of multidigit numbers on automata," Soviet Physics Doklady 7 (1963), 595–596; Russian original 1962.
- V. Strassen, "Gaussian elimination is not optimal," Numerische Mathematik 13 (1969), 354–356.
- A. Schönhage & V. Strassen, "Schnelle Multiplikation großer Zahlen," Computing 7 (1971), 281–292.
- D. Harvey & J. van der Hoeven, "Integer multiplication in time ," Annals of Mathematics 193(2) (2021).
- J. Alman, R. Duan, V. Vassilevska Williams, Y. Xu, Z. Xu & R. Zhou, "More asymmetry yields faster matrix multiplication," SODA (2025).