next up previous index
Next: F406 Banded Linear Up: CERNLIB Previous: F123 Bit Vector

F150 Direct or Tensor Matrix Product

Routine ID: F150
Author(s): K.S. KölbigLibrary: MATHLIB
Submitter: Submitted: 15.09.1978
Language: FortranRevised:

Subroutine subprogram MXDIPR computes the direct (sometimes called tensor, or Kronecker) product C=A xB of two matrices A and B. Let A=(aik),(i=1,2,...,I; k=1,2,...K) ; B=(bjl),(j=1,2,...,J;l=1,2,...,L) ; then C= (cij;kl) with cij;kl=aikbjl . C has I xJ rows and K xL columns. If, in particular, A and B are square matrices, C is also square.

Structure:

SUBROUTINE subprogram
User Entry Names: MXDIPR

Usage:

    CALL MXDIPR(A,B,C,IAD,JBD,IJD,IA,KA,JB,LB)
A,B
( REAL) Matrices A and B.
C
( REAL) On exit, C contains the direct product A xB .
IAD
( INTEGER) First dimension of A.
JBD
( INTEGER) First dimension of B.
IJD
( INTEGER) First dimension of C.
IA,KA
( INTEGER) Number of rows, columns of A.
JB,LB
( INTEGER) Number of rows, columns of B.

Restrictions:

A, B, C must not overlap.

Error handling:

If IA or KA or JB or LB are equal to zero, the subprogram acts as do-nothing.

Examples:

    DIMENSION A(2,2),B(2,2),C(4,4)
    ...
    CALL MXDIPR(A,B,C,2,2,4,2,2,2,2)
assuming

A=(
a11 a12

a21 a22

)&quad;B=(
b11 b12

b21 b22

),

would set

C=(
a11b11 a11b12 a12b11 a12b12

a11b21 a11b22 a12b21 a12b22

a21b11 a21b12 a22b11 a22b12

a21b21 a21b22 a22b21 a22b22

) =(
c11;11 c11;12 c11;21 c11;22

c12;11 c12;12 c12;21 c12;22

c21;11 c21;12 c21;21 c21;22

c22;11 c22;12 c22;21 c22;22

).

References:

  1. E.P. Wigner, Group Theory, (Academic Press, New York 1959) 17
  2. W.I. Smirnow, Lehrgang der höheren Mathematik, Vol. III.1, (Deutscher Verlag der Wissenschaften, Berlin 1954) 221

F406



next up previous index
Next: F406 Banded Linear Up: CERNLIB Previous: F123 Bit Vector


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995