# duplication.matrix: Duplication matrix for n by n matrices In matrixcalc: Collection of functions for matrix calculations

## Description

This function returns a matrix with n * n rows and n * ( n + 1 ) / 2 columns that transforms vech(A) to vec(A) where A is a symmetric n by n matrix.

## Usage

 1 duplication.matrix(n=1) 

## Arguments

 n Row and column dimension

## Details

This function is a wrapper function for the function D.matrix. Let {\bf{T}}_{i,j} be an n \times n matrix with 1 in its ≤ft( {i,j} \right) element 1 ≤ i,j ≤ n. and zeroes elsewhere. These matrices are constructed by the function T.matrices. The formula for the transpose of matrix \bf{D} is {\bf{D'}} = ∑\limits_{j = 1}^n {∑\limits_{i = j}^n {{{\bf{u}}_{i,j}}\;{{≤ft( {vec\;{{\bf{T}}_{i,j}}} \right)}^\prime }} } where {{{\bf{u}}_{i,j}}} is the column vector in the order \frac{1}{2}n≤ft( {n + 1} \right) identity matrix for column k = ≤ft( {j - 1} \right)n + i - \frac{1}{2}j≤ft( {j - 1} \right). The function u.vectors generates these vectors.

## Value

It returns an {n^2}\; \times \;\frac{1}{2}n≤ft( {n + 1} \right) matrix.

## Author(s)

Frederick Novomestky fnovomes@poly.edu, Kurt Hornik Kurt.Hornik@wu-wien.ac.at

## References

Magnus, J. R. and H. Neudecker (1980). The elimination matrix, some lemmas and applications, SIAM Journal on Algebraic Discrete Methods, 1(4), December 1980, 422-449.

Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.

D.matrix, vec, vech

## Examples

 1 2 3 4 5 6 7 8 9 D <- duplication.matrix( 3 ) A <- matrix( c( 1, 2, 3, 2, 3, 4, 3, 4, 5), nrow=3, byrow=TRUE ) vecA <- vec( A ) vechA<- vech( A ) y <- D %*% vechA print( y ) print( vecA ) 

### Example output

      [,1]
[1,]    1
[2,]    2
[3,]    3
[4,]    2
[5,]    3
[6,]    4
[7,]    3
[8,]    4
[9,]    5
[,1]
[1,]    1
[2,]    2
[3,]    3
[4,]    2
[5,]    3
[6,]    4
[7,]    3
[8,]    4
[9,]    5


matrixcalc documentation built on May 2, 2019, 1:45 p.m.