In mathematics, especially in linear algebra and matrix theory, the duplication matrix and the elimination matrix are linear transformations used for transforming half-vectorizations of matrices into vectorizations or (respectively) vice versa.
The duplication matrix
symmetric matrix
, transforms
{\displaystyle \mathrm {vech} (A)}
{\displaystyle \mathrm {vec} (A)}
symmetric matrix
{\displaystyle A=\left[{\begin{smallmatrix}a&b\\b&d\end{smallmatrix}}\right]}
, this transformation reads
The explicit formula for calculating the duplication matrix for a
{\displaystyle D_{n}^{T}=\sum \limits _{i\geq j}u_{ij}(\mathrm {vec} T_{ij})^{T}}
Where: Here is a C++ function using Armadillo (C++ library): An elimination matrix
, transforms
{\displaystyle \mathrm {vec} (A)}
{\displaystyle \mathrm {vech} (A)}
: By the explicit (constructive) definition given by Magnus & Neudecker (1980), the
elimination matrix
is a unit vector whose
-th element is one and zeros elsewhere, and
{\displaystyle E_{ij}=e_{i}e_{j}^{T}}
Here is a C++ function using Armadillo (C++ library): For the
{\displaystyle A=\left[{\begin{smallmatrix}a&b\\c&d\end{smallmatrix}}\right]}
, one choice for this transformation is given by