[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1206.0. "Matrix Multiplication" by DELREY::FRIEDMAN_MI () Wed Mar 07 1990 12:48

    Is multiplication defined for n-dimensional matrices?  If so,
    what are the rules for computing the product?
T.RTitleUserPersonal
Name
DateLines
1206.1simple answerCSSE::NEILSENI used to be PULSAR::WALLYWed Mar 07 1990 13:159
    Re:                   <<< Note 1206.0 by DELREY::FRIEDMAN_MI >>>

>    Is multiplication defined for n-dimensional matrices?  If so,
>    what are the rules for computing the product?
    
    
    yes.  AB(I,J) = SUM over k of A(I,K) * B(K,J)
    
    Did I understand the question?
1206.2DELREY::FRIEDMAN_MIWed Mar 07 1990 13:417
    For three dimensional matrices, for example, if we want
    to perform   C = A * B, how do you compute element
    
                  c
                   1 7 4
    
    ?
1206.3HPSTEK::XIAIn my beginning is my end.Wed Mar 07 1990 17:5519
    re .0,
    First thing first, an n-dimensional matrix usually means an nxn matrix.
    re .2,
    What you are talking about is the so called tensor (which is a kind of
    generalization of matrix) operation.  Under such generalization a matrix
    is a tensor of type (1,1).  The matrix multiplication is the same as the 
    tensor product followed by a tensor contraction, i.e. if we consider 
    matrice A and B as tensor, then the normal definition of A*B is the
    same as C(AXB) where X means tensor product and C means contraction
    (with the appropriate indices).
    Now if you want to deal with tensor of higher types, you have to
    specify whether it is of type (1, 2) or of type (2, 1).  Then you can
    generalize the so called "multiplication" several ways depends on your
    need by combining tensor product and tensor contraction.  In short,
    there many ways of defining your "high dimension matrices" and many
    ways of defining your "multiplication".
    
    Eugene 
                                
1206.4AITG::DERAMODan D&#039;Eramo, nice personThu Mar 08 1990 10:5034
>>	>    Is multiplication defined for n-dimensional matrices?  If so,
>>	>    what are the rules for computing the product?
>>    
>>    
>>    yes.  AB(I,J) = SUM over k of A(I,K) * B(K,J)
>>    
>>    Did I understand the question?

	Matrix usually implies a two dimensional array of numbers.
	By "n-dimensional matrices" the author of .0 meant arrays
	with potentially greater than two dimensions, not two dimensional
	arrays where both dimensions were length n.

	You can multiply A by B where A is, say, 3 dimensions and
	B is, say, 2 dimensions by forming C with dim(A) + dim(B) = 5
	dimensions and defining C[i,j,k,l,m] = A[i,j,k] B[l,m].  Then
	you can contract that in various ways, for example, assuming the
	middle A dimension and the final B dimension both have length n,
	you can form

		D[i,k,l] = sum(j = 1,...,n) C[i,j,k,l,j]
			 = sum(j = 1,...,n) A[i,j,k] B[l,j]

	In fact it is a common tensor notation to have a doubled index
	mean summation over its range, so that the above might be written
	as just D[i,k,l] = A[i,j,k] B[l,j].

	The physics (or whatever) underlying the arbitrary dimensional
	arrays will determine which dimensions it makes sense to "pair up"
	this way.  The usual "2 d" matrix multiplication just sums along
	the second dimension of one matrix and the first dimension of the
	other which of course must be the same length).

	Dan
1206.5HPSTEK::XIAIn my beginning is my end.Thu Mar 08 1990 13:586
    It just came to my mind that you can't really define "multiplication"
    for the so called "3-D" matrix because each contraction kills two
    indices and you can't achieve another "3-D" by applying tensor product
    and contraction to two "3-D" matrix.
    
    Eugene
1206.6parity error!AITG::DERAMODan D&#039;Eramo, nice personThu Mar 08 1990 18:173
        How about if you multiply three 3-D tensors?  :-)
        
        Dan