Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

Multiplication Operator, Matrix:   *

performs matrix multiplication

matrix1*matrix2

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 statements

    a={1 2,
       3 4};
    b={1 2};
    c=b*a;
result in
              C             1 row       2 cols    (numeric)

                                 7        10
and the statement
   d=a*b`;
results in
               D             2 rows      1 col     (numeric)

                                   5
                                  11

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.