The VECH function creates a column vector whose elements are the stacked columns of the lower triangular elements of matrix. Often, the argument is a symmetric matrix, in which case the VECH function has the effect of discarding the “duplicate” elements that are above the matrix diagonal. Notice that the lower triangular elements are returned in column-major order; use the SYMSQR function if you want the elements in row-major order.
Uses of the VECH function in matrix algebra are described in Harville (1997). “Vech” is an abbreviation for “vector-half.”
The following statements produce the column vector shown in Figure 24.427:
a = {1 2 3, 4 5 6, 7 8 9}; v = vech(a); print v;
The SQRVECH function and the VECH function are inverse operations on the set of symmetric matrices.