Inverse duplication matrix.
Syntax: @duplicinv(n)
n: integer
Return: matrix
The inverse of the duplication matrix transforms the vectorization of a sym matrix to the half vectorization of the matrix.
Returns

, the

Moore-Penrose inverse of the duplication matrix where
for

, the duplication matrix satisfying
for an

symmetric matrix

, so that
Examples
The commands
sym s2 = @unvech(@mnrnd(15))
vector diff = @duplicinv(s2.@cols) * @vec(s2) - @vech(s2)
demonstrates the properties of the inverse duplication matrix since DIFF equals zero.
Cross-references