Duplication and elimination matrices

Last updated

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.

Contents

Duplication matrix

The duplication matrix is the unique matrix which, for any symmetric matrix , transforms into :

.

For the symmetric matrix , this transformation reads


The explicit formula for calculating the duplication matrix for a matrix is:

Where:

Here is a C++ function using Armadillo (C++ library):

arma::matduplication_matrix(constint&n){arma::matout((n*(n+1))/2,n*n,arma::fill::zeros);for(intj=0;j<n;++j){for(inti=j;i<n;++i){arma::vecu((n*(n+1))/2,arma::fill::zeros);u(j*n+i-((j+1)*j)/2)=1.0;arma::matT(n,n,arma::fill::zeros);T(i,j)=1.0;T(j,i)=1.0;out+=u*arma::trans(arma::vectorise(T));}}returnout.t();}

Elimination matrix

An elimination matrix is a matrix which, for any matrix , transforms into :

.  [1]

By the explicit (constructive) definition given by Magnus & Neudecker (1980), the by elimination matrix is given by

where is a unit vector whose -th element is one and zeros elsewhere, and .

Here is a C++ function using Armadillo (C++ library):

arma::matelimination_matrix(constint&n){arma::matout((n*(n+1))/2,n*n,arma::fill::zeros);for(intj=0;j<n;++j){arma::rowvece_j(n,arma::fill::zeros);e_j(j)=1.0;for(inti=j;i<n;++i){arma::vecu((n*(n+1))/2,arma::fill::zeros);u(j*n+i-((j+1)*j)/2)=1.0;arma::rowvece_i(n,arma::fill::zeros);e_i(i)=1.0;out+=arma::kron(u,arma::kron(e_j,e_i));}}returnout;}

For the matrix , one choice for this transformation is given by

.

Notes

  1. Magnus & Neudecker (1980), Definition 3.1

References