Home Statistical Dictionary Matrix Multiplication
Matrix Multiplication
The operation combining two matrices by taking row-by-column dot products, the mechanism behind linear transformations, systems of equations, and nearly every compact matrix formula used in regression and multivariate statistics.
In Plain English
Matrix multiplication is how you chain linear transformations together, or apply one to your data, in a single algebraic step. It looks more complicated than ordinary number multiplication because it is: the order matters, and the two matrices' sizes have to line up correctly, but that structure is exactly what lets an expression like compactly represent "the sum of cross-products across every pair of predictors" without writing out a single summation sign.
Definition
For an matrix and a matrix , the matrix product is the matrix whose entry is the dot product of 's -th row and 's -th column, . Matrix multiplication requires the inner dimensions to match (the number of columns of must equal the number of rows of ), is associative, , and distributes over addition, but is not commutative in general, , even when both products are defined.
Formula
Notation
Worked Example
For and , the product's top-left entry is row 1 of A dotted with column 1 of B: . Working through all four entries gives , while -- a different matrix, confirming multiplication is not commutative here.
Properties
- Matrix multiplication is not commutative in general -- unlike ordinary numbers, the order in which two matrices are multiplied matters, and and can be different matrices, or one may not even be defined while the other is, if the dimensions don't line up both ways.
- The expression (a design matrix's transpose times itself) is the single most common matrix product in applied statistics, since its inverse (when it exists) is the core building block of the ordinary least squares normal equations, .
- Multiplying a vector by a matrix, , is a special case of matrix multiplication (an matrix) and is exactly how a matrix represents a linear transformation, applying to produces a new vector, which is the operational meaning behind projection matrices, rotation matrices, and every fitted-value computation .
At a Glance
Related Terms