GraphMath

Matrix multiplication

Four viewpoints on AB: columns, entries, rows and outer products

How can the same product be read in several useful ways?

Matrix multiplication begins with the column-wise definition: AB is formed by applying A to each column of B. From that definition, the entry-wise row-column rule follows. The same product can then be reorganized row-wise, as a sum of outer products, in blocks and through special products such as diagonal, shear, orthonormal and upper triangular matrices.

Key ideas

Matrix multiplication is one operation with several equivalent readings. Each reading is useful for a different kind of reasoning.

  • The fundamental definition is column-wise: AB is formed by applying A to each column of B
  • The entry cij is the dot product of row i of A with column j of B
  • Each row of AB can be read as a linear combination of rows of B with coefficients from A
  • The product AB can be decomposed into a sum of rank-1 outer products
  • Block multiplication treats large matrices as collections of smaller compatible blocks
  • Right multiplication changes columns; left multiplication changes rows, as shown by diagonal and shear examples
  • Products of orthonormal matrices stay orthonormal, and products of invertible upper triangular matrices stay upper triangular

The chapter moves from definitions to reorganizations, then to special products where the structure of the factors controls the structure of the result.

How is each entry of AB computed?

Each entry cij of C = AB is the dot product of row i of A with column j of B. This entry-wise rule is not a separate definition: it follows directly from the column-wise meaning of matrix multiplication.

Related chapters

Chapter contents

Why is the sum-of-outer-products viewpoint useful?

It shows that a matrix product can be built by adding simple rank-1 layers. Each layer reads one scalar from the input and places the result in one column direction of A. This viewpoint leads naturally to low-rank approximation and later ideas such as SVD.

Was this chapter helpful?

Quick feedback helps us improve the site.