Movatterモバイル変換


[0]ホーム

URL:


TOPICS
SearchClose
Search

Matrix Multiplication


DOWNLOAD Mathematica NotebookDownloadWolfram Notebook

The productC of twomatricesA andB is defined as

 c_(ik)=a_(ij)b_(jk),
(1)

wherej is summed over for all possible values ofi andk and the notation above uses theEinstein summation convention. The implied summation over repeated indices without the presence of an explicit sum sign is calledEinstein summation, and is commonly used in both matrix and tensor analysis. Therefore, in order for matrix multiplication to be defined, the dimensions of thematrices must satisfy

 (n×m)(m×p)=(n×p),
(2)

where(a×b) denotes amatrix witha rows andb columns. Writing out the product explicitly,

 [c_(11) c_(12) ... c_(1p); c_(21) c_(22) ... c_(2p); | | ... |; c_(n1) c_(n2) ... c_(np)]=[a_(11) a_(12) ... a_(1m); a_(21) a_(22) ... a_(2m); | | ... |; a_(n1) a_(n2) ... a_(nm)][b_(11) b_(12) ... b_(1p); b_(21) b_(22) ... b_(2p); | | ... |; b_(m1) b_(m2) ... b_(mp)],
(3)

where

c_(11)=a_(11)b_(11)+a_(12)b_(21)+...+a_(1m)b_(m1)
(4)
c_(12)=a_(11)b_(12)+a_(12)b_(22)+...+a_(1m)b_(m2)
(5)
c_(1p)=a_(11)b_(1p)+a_(12)b_(2p)+...+a_(1m)b_(mp)
(6)
c_(21)=a_(21)b_(11)+a_(22)b_(21)+...+a_(2m)b_(m1)
(7)
c_(22)=a_(21)b_(12)+a_(22)b_(22)+...+a_(2m)b_(m2)
(8)
c_(2p)=a_(21)b_(1p)+a_(22)b_(2p)+...+a_(2m)b_(mp)
(9)
c_(n1)=a_(n1)b_(11)+a_(n2)b_(21)+...+a_(nm)b_(m1)
(10)
c_(n2)=a_(n1)b_(12)+a_(n2)b_(22)+...+a_(nm)b_(m2)
(11)
c_(np)=a_(n1)b_(1p)+a_(n2)b_(2p)+...+a_(nm)b_(mp).
(12)

Matrix multiplication isassociative, as can be seenby taking

 [(ab)c]_(ij)=(ab)_(ik)c_(kj)=(a_(il)b_(lk))c_(kj),
(13)

whereEinstein summation is again used. Now, sincea_(il),b_(lk), andc_(kj) arescalars, use theassociativity ofscalar multiplication to write

 (a_(il)b_(lk))c_(kj)=a_(il)(b_(lk)c_(kj))=a_(il)(bc)_(lj)=[a(bc)]_(ij).
(14)

Since this is true for alli andj, it must be true that

 (ab)c=a(bc).
(15)

That is, matrix multiplication isassociative. Equation(13) can therefore be written

 [abc]_(ij)=a_(il)b_(lk)c_(kj),
(16)

without ambiguity. Due to associativity, matrices form asemigroupunder multiplication.

Matrix multiplication is alsodistributive. IfA andB arem×n matrices andC andD aren×p matrices, then

A(C+D)=AC+AD
(17)
(A+B)C=AC+BC.
(18)

Sincen×n matrices form anAbelian group under addition,n×n matrices form aring.

However, matrix multiplication isnot, in general,commutative (although it iscommutative ifA andB arediagonal and of the same dimension).

The product of twoblock matrices is given by multiplyingeach block

 [o o    ; o o    ;   o   ;    o o o;    o o o;    o o o][x x    ; x x    ;   x   ;    x x x;    x x x;    x x x]  =[[o o; o o][x x; x x]  ;  [o][x] ;   [o o o; o o o; o o o][x x x; x x x; x x x]].
(19)

See also

Linear Transformation,Matrix,Matrix Addition,Matrix Inverse,Strassen FormulasExplore 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."Nature610, 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

Matrix Multiplication

Cite this as:

Weisstein, Eric W. "Matrix Multiplication."FromMathWorld--A Wolfram Resource.https://mathworld.wolfram.com/MatrixMultiplication.html

Subject classifications

Created, developed and nurtured by Eric Weisstein at Wolfram Research

[8]ページ先頭

©2009-2026 Movatter.jp