Working with Matrices
Operators
Operators used in matrix expressions fall into three general categories:
- Prefix operators
are placed in front of operands. For example,
-Auses the sign reversal prefix operator () in front of the matrix
Ato reverse the sign of each element ofA.- Binary operators
are placed between operands. For example,
A + Buses the addition binary operator (+) between matricesAandBto add corresponding elements of the matrices.- Postfix operators
are placed after an operand. For example,
A‘uses the transpose postfix operator (`) after the matrixAto transpose the matrix.
Matrix operators are described in detail in Chapter 25, Language Reference.
Table 1 shows the precedence of matrix operators in the SAS/IML language.
Table 1: Operator Precedence
