The transpose operator, denoted by the backquote character (`), exchanges the rows and columns of matrix, producing the transpose of matrix. If
is the value in the
th row and
th column of matrix, then the transpose of matrix contains
in the
th row and
th column. If matrix contains
rows and
columns, the transpose has
rows and
columns.
For example, the following statements transpose the matrix a, shown in Figure 23.29:
a = {1 2,
3 4,
5 6};
b = a`;
print b;
Figure 23.29
Transpose of a Matrix
You can also transpose a matrix with the T function.
Copyright © SAS Institute, Inc. All Rights Reserved.