Matrix Multiplication
Assume that you have been given two matrices A and B and you are asked to produce the product of the two C ( C := A * B ). In order for matrix multiplication to be legal, the matrices must be conformal ( the number of columns in A must equal the number of rows in B).
If we assume that A has n rows and m columns (n by m) and B has m rows and p columns (m by p), then the matrix C (n by p) which results from multiplying A by B is defined by:
m
C[I,J] := ? ( A[I,K] * B[K,J] ) FOR I = 1 TO n and
K=1 J = 1 TO p