Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Working with Matrices

Operators

Operators used in matrix expressions fall into three general categories:

prefix operators
are placed in front of operands. For example, -A uses the sign reverse prefix operator (-) in front of the operand A to reverse the sign of each element of A.

infix operators
are placed between operands. For example, A + B uses the addition infix operator (+) between operands A and B to add corresponding elements of the matrices.

postfix operators
are placed after an operand. For example, A\grave{} uses the transpose postfix operator (\grave{}) after the operand A to transpose A.

Matrix operators are listed in Appendix 1, "SAS/IML Quick Reference," and described in detail in Chapter 17, "Language Reference."

Table 4.1 shows the precedence of matrix operators in Interactive Matrix Language.

Table 4.1: Operator Precedence
Priority Group Operators
I (highest) ^\grave{{}}subscripts-(prefix)##**
II *#<>></@
III +-    
IV |//:   
V <<=>>==^=
VI &     
VII (lowest) |     

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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