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 20.

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

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

Previous Page | Next Page | Top of Page