Matrix multiplication Guide, Meaning , Facts, Information and Description
This article gives an overview of the various ways to multiply matrices.The Einstein notation is used throughout.
| Table of contents |
|
2 Hadamard product 3 Kronecker product 4 Common properties 5 Scalar multiplication 6 See also 7 External links 8 References |
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 m-by-n matrix and B is an n-by-p matrix, then their product AB is an m-by-p matrix given by
The following picture shows how to calculate the (AB)12 element of AB 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.
Ordinary matrix product
for each pair i and j. Example
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. In general, matrix multiplication is not commutative; that is, AB is not equal to BA.
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(nlog2(7)) (approximately O(n2.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(n2.376). It has been shown that the leading exponent must be at least 2.
For two matrices of the same dimensions, we have the Hadamard product or entrywise product. The Hadamard product of two m-by-n matrices A and B, denoted by A · B, is an m-by-n matrix given by
(A·B)[i,j]=A[i,j] * B[i,j]. For instance
Hadamard product
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.
For any two arbitrary matrices A=(aij) and B, we have the direct product or Kronecker product A B defined as
Note that if A is m-by-n and B is p-by-r then A B is an mp-by-nr matrix. Again this multiplication is not commutative.
For example
Kronecker product
(the HTML entity ⊗ (⊗) represents the direct product, but is not supported on older browsers)
If A and B represent linear transformations V1 → W1 and V2 → W2, respectively, then A B represents the tensor product of the two maps, V1 V2 → W1 W2.
For an excellent treatment of Hadamard products or advanced matrix analysis see "Topics in Matrix Analysis: Horn and Johnson; Cambridge"
All three notions of matrix multiplication are associative
Common properties
and distributive:
- A * (B + C) = A * B + A * C
- (A + B) * C = A * C + B * C
- c(A * B) = (cA) * B = A * (cB)
Scalar multiplication
The scalar multiplication of a matrix A=(aij) and a scalar r gives the product
- rA=(r aij).
- Ar=(aij r).
See also
- Coppersmith-Winograd algorithm
- Strassen algorithm
External links
References
- Strassen, Volker, Gaussian Elimination is not Optimal, Numer. Math. 13, p. 354-356, 1969
- Coppersmith, D., Winograd S., Matrix multiplication via arithmetic progressions, J. Symbolic Comput. 9, p. 251-280, 1990
- Horn, Roger; Johnson, Charles: "Topics in Matrix Analysis", Cambridge, 1994.
This is an Article on Matrix multiplication. Page Contains Information, Facts Details or Explanation Guide About Matrix multiplication
