


% -*- texinfo -*-
% @deftypefn {Function File} {} duplication_matrix (@var{n})
% Return the duplication matrix
% @tex
% $D_n$
% @end tex
% @ifnottex
% @math{Dn}
% @end ifnottex
% which is the unique
% @tex
% $n^2 \times n(n+1)/2$
% @end tex
% @ifnottex
% @math{n^2} by @math{n*(n+1)/2}
% @end ifnottex
% matrix such that
% @tex
% $D_n * {\rm vech} (A) = {\rm vec} (A)$
% @end tex
% @ifnottex
% @math{Dn vech (A) = vec (A)}
% @end ifnottex
% for all symmetric
% @tex
% $n \times n$
% @end tex
% @ifnottex
% @math{n} by @math{n}
% @end ifnottex
% matrices
% @tex
% $A$.
% @end tex
% @ifnottex
% @math{A}.
% @end ifnottex
%
% See Magnus and Neudecker (1988), Matrix differential calculus with
% applications in statistics and econometrics.
% @end deftypefn