This article gives an overview of the various ways to multiply matrices.
Ordinary matrix product
By far the most important way to multiply matrices is the usual matrix multiplication. It is defined between two matrices only if the number of columns of the first matrix is the same as the number of rows of the second matrix. If A is an mbyn matrix and B is an nbyp matrix, then their product A×B is an mbyp matrix given by
for each pair i and j. The algebraic system of "matrix units" summarises the abstract properties of this kind of multiplication.
The following picture shows how to calculate the (AB)_{12} element of A×B if A is a 2×4 matrix, and B is a 4×3 matrix. Elements from each matrix are paired off in the direction of the arrows; each pair is multiplied and the products are added. The location of the resulting number in AB corresponds to the row and column that were considered.

The proportionsvectors method
There is a simpler concept for multiplying matrices. Suppose you want to mix vectors together in different proportions. The matrix on the left is the list of proportions. The matrix on the right is the list of vectors. Here's how it works :
Use vector notation :
The first proportion in each mix tells how much of the first vector to use and so on :
Simplify :
Remove the vector notation :
Matrix multiplication is not commutative (A×B = B×A), except in special cases. It's easy to see why: you can't expect to switch the proportions with the vectors and get the same result. It's also easy to see why the number of columns in the proportions matrix has to be the same as the number of rows in the vectors matrix: they have to represent the same number of vectors.
This notion of multiplication is important because if A and B are interpreted as linear transformations (which is almost universally done), then the matrix product AB corresponds to the composition of the two linear transformations, with B being applied first.
The complexity of matrix multiplication, if carried out naively, is O(n³), but more efficient algorithms do exist. Strassen's algorithm, devised by Volker Strassen in 1969 and often referred to as "fast matrix multiplication", uses a mapping of bilinear combinations to reduce complexity to O(n^{log2(7)}) (approximately O(n^{2.807...})). In practice, though, it is rarely used since it is awkward to implement, lacking numerical stability. The constant factor involved is about 4.695 asymptotically; Winograd's method improves on this slightly by reducing it to an asymptotic 4.537.
The best algorithm currently known, which was presented by Don Coppersmith and S. Winograd in 1990, has an asymptotic complexity of O(n^{2.376}). It has been shown that the leading exponent must be at least 2.
Hadamard product
For two matrices of the same dimensions, we have the Hadamard product or entrywise product. The Hadamard product of two mbyn matrices A and B, denoted by A · B, is an mbyn matrix given by (A·B)[i,j]=A[i,j]B[i,j]. For instance
Note that the Hadamard product is a submatrix of the Kronecker product (see below). Hadamard product is studied by matrix theorists, but it is virtually untouched by linear algebraists.
Kronecker product
For any two arbitrary matrices A=(a_{ij}) and B, we have the direct product or Kronecker product A B defined as
(the HTML entity ⊗ (⊗) represents the direct product, but is not supported on older browsers)
Note that if A is mbyn and B is pbyr then A B is an mpbynr matrix. Again this multiplication is not commutative.
For example
 .
If A and B represent linear transformations V_{1} → W_{1} and V_{2} → W_{2}, respectively, then A B represents the tensor product of the two maps, V_{1} V_{2} → W_{1} W_{2}.
For an excellent treatment of Hadamard products or advanced matrix analysis see "Topics in Matrix Analysis: Horn and Johnson; Cambridge"
Common properties
All three notions of matrix multiplication are associative
 A(BC) = (AB)C
and distributive:
 A(B + C) = AB + AC
and
 (A + B)C = AC + BC
and compatible with scalar multiplication:
 c(AB) = (cA)B = A(cB)
Scalar multiplication
The scalar multiplication of a matrix A=(a_{ij}) and a scalar r gives the product
 rA=(r a_{ij}).
If we are concerned with matrices over a ring, then the above multiplication is sometimes called the left multiplication while the right multiplication is defined to be
 Ar=(a_{ij} r).
When the underlying ring is commutative, for example, the real or complex number field, the two multiplications are the same. However, if the ring is not commutative, such as the quaternions, they may be different. For example
See also
External links
References
 Strassen, Volker, Gaussian Elimination is not Optimal, Numer. Math. 13, p. 354356, 1969
 Coppersmith, D., Winograd S., Matrix multiplication via arithmetic progressions, J. Symbolic Comput. 9, p. 251280, 1990
 Horn, Roger; Johnson, Charles: "Topics in Matrix Analysis", Cambridge, 1994.
Last updated: 07312005 16:34:50