Glossary

What is Matrix multiplication?

In Turkish: Matris çarpımı · Topic: Math foundations

An operation that combines two tables of numbers by pairing the rows of one with the columns of the other, multiplying and adding, to produce a new table. It makes up most of the computation inside neural networks.

How does it work?

Each row of the first matrix is multiplied term by term with each column of the second, and the products are added up to give a single cell of the result. This only works if the first matrix has as many columns as the second has rows. In a neural network, a layer multiplies the input vector by a weight matrix to produce the input of the next layer. Because every cell can be computed independently, the work can be spread across thousands of cores, which is why GPUs suit it so well.

Why does it matter?

Most of the computation spent training and running large language models is matrix multiplication. That is why debates about AI chip speed, memory bandwidth and energy use largely come down to the cost of this one operation. Hardware and algorithms that do it more efficiently translate directly into lower costs.

Example

When a chatbot processes a user's message, most of its work consists of multiplications with large weight matrices.

FAQ

How is matrix multiplication different from ordinary multiplication?

With ordinary numbers, order does not matter. With matrices, A×B and B×A usually give different results, and one of them may not even be defined. The shapes of the matrices also have to match.

Why are GPUs good at matrix multiplication?

The cells of the result can be computed independently, so thousands of small cores can work at the same time. GPUs were designed for exactly this kind of parallel workload.

News mentioning "Matrix multiplication"

1 stories
A chalkboard with mathematical writing
Research

Is AI closing in on a P ≠ NP proof? Scott Aaronson: “For the first time, I feel a proof is not far”

After a run of proofs announced by OpenAI and Anthropic, leading theoretical computer scientist Scott Aaronson wrote that a proof of P ≠ NP is not far off. He also claimed AI labs are holding unpublished results in cryptography.

All terms