ArticleslgStudy

computer science

Computational complexity of matrix multiplication

Computational complexity of matrix multiplication is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Computational complexity of matrix multiplication rather than just read about it. In short: In theoretical computer science, the computational complexity of matrix multiplication dictates how quickly the operation of matrix multiplication can be performed. Matrix multiplication algorithms are a central subroutine in theoretical and numerical algorithms for numerical linear algebra and optimization, so finding the fastest algorithm for matrix multiplication is of major practical relevance.

Computational complexity of matrix multiplication — main illustration
Computational complexity of matrix multiplication — illustration

Key takeaways

  • Computational complexity of matrix multiplication belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Computational complexity of matrix multiplication to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Computational complexity of matrix multiplication from memory before moving on to harder problems.

Reference excerpt

In theoretical computer science, the computational complexity of matrix multiplication dictates how quickly the operation of matrix multiplication can be performed. Matrix multiplication algorithms are a central subroutine in theoretical and numerical algorithms for numerical linear algebra and optimization, so finding the fastest algorithm for matrix multiplication is of major practical relevance. Directly applying the mathematical definition of matrix multiplication gives an algorithm that requires n3 field operations to multiply two n × n matrices over that field (Θ(n3) in big O notation). Surprisingly, algorithms exist that provide better running times than this straightforward "schoolbook algorithm". The first to be discovered was Strassen's algorithm, devised by Volker Strassen in 1969 and often referred to as "fast matrix multiplication". The optimal number of field operations needed to multiply two square n × n matrices up to constant factors is still (as of November 2026) unknown. This is a major open question in theoretical computer science. In a 2026 bulk release of mathematical manuscripts, OpenAI claimed a proof formalized in Lean that the asymptotic complexity of the best possible matrix multiplication algorithm is n9/4 + o(1), by both an algorithm which uses that many field operations along with a lower bound showing that n9/4 field operations are necessary. This claim has not yet (as of November 2026) been reviewed by leading mathematicians. Algorithms improving on Strassen are not used in practice, because the constant coefficient hidden by the big O notation is so large that they are only worthwhile for matrices that are too large to handle on present-day computers. Strassen's algorithm is itself not the fastest method for the smallest matrices, with sizes of several hundred or less. Strassen can be used recursively though on smaller submatrices and improvements in those will lead to general improvement.

Simple algorithms If A, B are two n × n matrices over a field, then their product AB is also an n × n matrix over that field, defined entrywise as (AB)ij=∑k=1nAikBkj.

Schoolbook algorithm

The simplest approach to computing the product of two n × n matrices A and B is to compute the arithmetic expressions coming from the definition of matrix multiplication. In pseudocode:

input A and B, both n by n matrices initialize C to be an n by n matrix of all zeros for i from 1 to n: for j from 1 to n: for k from 1 to n: C[i][j] = C[i][j] + A[i][k]*B[k][j] output C (as A*B)

This algorithm requires ⁠n3⁠ multiplications and ⁠n3−n2⁠ additions of scalars for computing the product of two square n×n matrices. Its computational complexity is therefore ⁠O(n3)⁠, in a model of computation where field operations (addition and multiplication) take constant time (in practice, this is the case for floating point numbers, but not necessarily for integers).

Strassen's algorithm

Strassen's algorithm improves on naive matrix multiplication through a divide-and-conquer approach. The key observation is that multiplying two 2 × 2 matrices can be done with only seven multiplications, instead of the usual eight (at the expense of 11 additional addition and subtraction operations). This means that, treating the input n×n matrices as block 2 × 2 matrices, the task of multiplying two n×n matrices can be reduced to seven subproblems of multiplying two n/2×n/2 matrices. Applying this recursively gives an algorithm needing O(nlog27)≈O(n2.807) field operations. Unlike algorithms with faster asymptotic complexity, Strassen's algorithm is used in practice. The numerical stability is reduced compared to the naive algorithm, but it is faster in cases where n > 100 or so and appears in several libraries, such as BLAS. Fast matrix multiplication algorithms cannot achieve component-wise stability, but some can be shown to exhibit norm-wise stability. It is very useful for large matrices over exact domains such as finite fields, where numerical stability is not an issue.

Matrix multiplication exponent

The matrix multiplication exponent, usually denoted ω, is the smallest real number for which any two n×n matrices over a field can be multiplied together using nω+o(1) field operations. This notation is commonly used in algorithms research, so that algorithms using matrix multiplication as a subroutine have bounds on running time that can update as bounds on ω improve. Using a naive lower bound and schoolbook matrix multiplication for the upper bound, one can straightforwardly conclude that 2 ≤ ω ≤ 3. Whether ω = 2 is a major open question in theoretical computer science, and there is a line of research developing matrix multiplication algorithms to get improved bounds on ω. All recent (as of November 2026) algorithms in this line of research use the laser method, a generalization of the Coppersmith–Winograd algorithm, which was given by Don Coppersmith and Shmuel Winograd in 1990 and was the best matrix multiplication algorithm until 2010. The conceptual idea of these algorithms is similar to Strassen's algorithm: a method is devised for multiplying two k × k-matrices with fewer than k3 multiplications, and this technique is applied recursively. The laser method has limitations to its power: Ambainis, Filmus and François Le Gall prove that it cannot be used to show that ω < 2.3725 by analyzing higher and higher tensor powers of a certain identity of Coppersmith and Winograd and neither ω < 2.3078 for a wide class of variants of this approach. In 2022 Duan, Wu and Zhou devised a variant breaking the first of the two barriers with ω < 2.37188, they do so by identifying a source of potential optimization in the laser method termed combination loss for which they compensate using an asymmetric version of the hashing method in the Coppersmith–Winograd algorithm. Nonetheless, the above are classical examples of galactic algorithms. On the opposite, the above Strassen's algorithm of 1969 and Pan's algorithm of 1978, whose respective exponents are slightly above and below 2.8, have constant coefficients that make them feasible.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Computational complexity of matrix multiplication

Start with the simplest possible case. Write down what Computational complexity of matrix multiplication claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Computational complexity of matrix multiplication before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Computational complexity of matrix multiplication ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Computational complexity of matrix multiplication

In research
Computational complexity of matrix multiplication appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Computational complexity of matrix multiplication in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Computational complexity of matrix multiplication is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational complexity theory, Computer arithmetic algorithms, Matrix theory, so understanding it makes those chapters shorter.
In everyday life
Look for Computational complexity of matrix multiplication outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Computational complexity of matrix multiplication” →

How to study Computational complexity of matrix multiplication in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Computational complexity of matrix multiplication means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Computational complexity of matrix multiplication out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Computational complexity of matrix multiplication in simple terms?

In theoretical computer science, the computational complexity of matrix multiplication dictates how quickly the operation of matrix multiplication can be performed. Matrix multiplication algorithms are a central subroutine in theoretical and numerical algorithms for numerical linear algebra and opt…

Why does Computational complexity of matrix multiplication matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Computational complexity of matrix multiplication?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Computational complexity of matrix multiplication.

Tags

  • Computational complexity theory
  • Computer arithmetic algorithms
  • Matrix theory
  • Unsolved problems in computer science

Keep exploring