The product of two matrices and is defined as
|
(1) |
where is summed over for all possible values of and and the notation above uses the Einstein summation convention. The implied summation over repeated indices without the presence of an explicit sum sign is called Einstein summation, and is commonly used in both matrix and tensor analysis. Therefore, in order for matrix multiplication to be defined, the dimensions of the matrices must satisfy
|
(2) |
where denotes a matrix with rows and columns. Writing out the product explicitly,
|
(3) |
where
|
(4) | |||
|
(5) | |||
|
(6) | |||
|
(7) | |||
|
(8) | |||
|
(9) | |||
|
(10) | |||
|
(11) | |||
|
(12) |
Matrix multiplication is associative, as can be seen by taking
|
(13) |
where Einstein summation is again used. Now, since , , and are scalars, use the associativity of scalar multiplication to write
|
(14) |
Since this is true for all and , it must be true that
|
(15) |
That is, matrix multiplication is associative. Equation (13) can therefore be written
|
(16) |
without ambiguity. Due to associativity, matrices form a semigroup under multiplication.
Matrix multiplication is also distributive. If and are matrices and and are matrices, then
Since matrices form an Abelian group under addition, matrices form a ring.
However, matrix multiplication is not, in general, commutative (although it is commutative if and are diagonal and of the same dimension).
The product of two block matrices is given by multiplying each block
|
(19) |
See also
Linear Transformation, Matrix, Matrix Addition, Matrix Inverse, Strassen Formulas Explore this topic in the MathWorld classroom
Explore with Wolfram|Alpha
References
Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 178-179, 1985.Fawzi, A. et al. "Discovering Faster Matrix Multiplication Algorithms With Reinforcement Learning." Nature 610, 47-53, 2022.Higham, N. "Exploiting Fast Matrix Multiplication within the Level 3 BLAS." ACM Trans. Math. Soft. 16, 352-368, 1990.
Referenced on Wolfram|Alpha
Cite this as:
Weisstein, Eric W. "Matrix Multiplication." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/MatrixMultiplication.html