Language Reference |
performs matrix multiplication
The matrix multiplication infix operator (*) produces a new matrix by performing matrix multiplication. The first matrix must have the same number of columns as the second matrix has rows. The new matrix has the same number of rows as the first matrix and the same number of columns as the second matrix. The matrix multiplication operator does not consistently propagate missing values.
For example, the following statements produce the matrix , as shown:
a={1 2, 3 4}; b={1 2}; c=b*a;
C 1 row 2 cols (numeric) 7 10The following statement produces the matrix , as shown:
d=a*b`;
D 2 rows 1 col (numeric) 5 11
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.