Vous êtes sur la page 1sur 2

The Different Ways of Matrix Multiplication

I suggest you to take a look at the following book.


Ilse C.F. Ipsen, Numerical Matrix Analysis: Linear Systems and Least Squares,
Society for Industrial and Applied Mathematics (SIAM), Philadelphia, 2009,
Page 9.
We can describe matrix multiplication in four different ways. Let A ∈ Mm,n
with rows aj and let B ∈ Mn,p with columns bj :
 
a1
 a2  £ ¤
 
A =  . , B = b1 b2 . . . bp .
 .. 
am

1) AB is a block row vector of a matrix vector products. The columns of AB


are matrix vector products of A with columns
£ ¤ £ ¤
AB = A b1 b2 ... bp = Ab1 Ab2 ... Abp , (1)

2) AB is a block column vector of a matrix vector products, where the rows of


AB are matrix vector products of A the rows of A with B,
   
a1 a1 B
 a2   a2 B 
   
AB =  . B =  .  . (2)
 ..   .. 
am am B

3) The element of AB are inner product, where entry (i, j) of AB is is an inner


product (dot product) of row i of A with column j of B

(AB)ij = ai bj , 1 ≤ i ≤ m, 1 ≤ j ≤ p.

That is
   
a1 (a1 · b1 ) (a1 · b2 ) ... (a1 · bp )
 a2  £ 
¤  (a2 · b1 ) (a2 · b2 ) ... (a2 · bp ) 
  
AB =  .  b1 b2 ... bp =  .. .. .. .. .
 ..   . . . . 
an (an · b1 ) (an · b2 ) ... (an · bp )
(3)
4) If we denote by ci the columns of A and ri the row of B
 
r1
 
£ ¤  r2 
A = c1 c2 · · · cn , B =  . 
 .. 
rn
then AB is the sum of the outer product,

AB = c1 r1 + c2 r2 + · · · + cn rn . (4)

The column vector x is said to be a combination of n other column vectors


cj , if there exist numbers yj (j = 1, 2, . . . , n), not all of them zero, for which:
n
X
x= yj cj
j=l

holds.

Vous aimerez peut-être aussi