Matrix functions
These functions perform matrix operations:
Matrix product (the same as the operator *+)
Product after transposing left matrix, i.e. L′ *+ R
Product after transposing right matrix, i.e. L *+ R′
Quadratic product, i.e. M *+ S *+ M′
Quadratic transposed matrix product, i.e. M′ *+ S *+ M
Determinant of a square matrix
Inverse of a square, symmetric or diagonal matrix
Moore-Penrose generalized inverse
Transpose of a matrix, i.e. M′
Trace of a square matrix
Choleski decomposition of a matrix
Eigenvalues (as a diagonal matrix)
Eigenvectors (as a rectangular matrix)
Singular values (as a diagonal matrix)
Matrix of left-hand vectors from a singular-value
decomposition
Matrix of right-hand vectors from a singular-value
decomposition
Direct product of matrices (synonym KRONECKER)
Direct sum of matrices
Centre matrix so that columns have mean zero and variance
one
Matrix exponential
Matrix power
Matrix square root
Correlation matrix derived from a symmetric matrix
Forms sub-triangles or sub-rectangles
Forms a diagonal matrix from a variate, or takes diagonal (or
banded diagonal) of a square, symmetric or diagonal matrix
Takes lower triangle of a square matrix (setting upper to
zero)
Takes upper triangle of a square matrix (setting lower to
zero)
Sums of columns
Means of columns
Numbers of non-missing elements in columns
Centres columns by subtracting their means
Sums of rows
Means of rows
Numbers of non-missing elements in rows
Centres rows by subtracting their means
Solution of simultaneous linear equations
Stacks columns of a matrix into a single variate
Stacks columns of the lower triangle of a matrix
These functions generate matrices with particular structures:
Identity matrix
Column matrix of 1's
Row matrix of 1's
Matrix of ones
Column matrix with n rows, value one in row i and zero
elsewhere
Matrix with ones at specified positions, and zeros elsewhere
Zero matrix
Synonym of MZERO
These functions give information about matrices:
Gives the number of columns of a matrix
Gives the number of rows of a matrix
These functions form matrices from tables:
Converts a one-way table into a column matrix
Converts a one-way table into a diagonal matrix
Converts a two-way table into a matrix
Converts a one-way table into a row matrix