Duplication Matrix
   HOME

TheInfoList



OR:

In mathematics, especially in
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matric ...
and
matrix theory In mathematics, a matrix (plural matrices) is a rectangular array or table of numbers, symbols, or expressions, arranged in rows and columns, which is used to represent a mathematical object or a property of such an object. For example, \beg ...
, the duplication matrix and the elimination matrix are
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
s used for transforming half-vectorizations of
matrices Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
into vectorizations or (respectively) vice versa.


Duplication matrix

The duplication matrix D_n is the unique n^2 \times \frac matrix which, for any n \times n
symmetric matrix In linear algebra, a symmetric matrix is a square matrix that is equal to its transpose. Formally, Because equal matrices have equal dimensions, only square matrices can be symmetric. The entries of a symmetric matrix are symmetric with ...
A , transforms \mathrm(A) into \mathrm(A): : D_n \mathrm(A) = \mathrm(A). For the 2 \times 2 symmetric matrix A=\left begin a & b \\ b & d \end\right/math>, this transformation reads : D_n \mathrm(A) = \mathrm(A) \implies \begin 1&0&0 \\ 0&1&0 \\ 0&1&0 \\ 0&0&1 \end \begin a \\ b \\ d \end = \begin a \\ b \\ b \\ d \end The explicit formula for calculating the duplication matrix for a n \times n matrix is: D^T_n = \sum \limits_ u_ (\mathrmT_)^T Where: * u_ is a unit vector of order \frac n (n+1) having the value 1 in the position (j-1)n+i - \fracj(j-1) and 0 elsewhere; * T_ is a n \times n matrix with 1 in position (i,j) and (j,i) and zero elsewhere Here is a C++ function using
Armadillo (C++ library) Armadillo is a linear algebra software library for the C++ programming language. It aims to provide efficient and streamlined base calculations, while at the same time having a straightforward and easy-to-use interface. Its intended target users ...
: arma::mat duplication_matrix(const int &n)


Elimination matrix

An elimination matrix L_n is a \frac \times n^2 matrix which, for any n \times n matrix A, transforms \mathrm(A) into \mathrm(A): :L_n \mathrm(A) = \mathrm(A), Definition 3.1 By the explicit (constructive) definition given by , the \fracn(n+1) by n^2 elimination matrix L_n is given by :L_n = \sum_ u_ \mathrm(E_)^T = \sum_ (u_\otimes e_j^T \otimes e_i^T), where e_i is a unit vector whose i-th element is one and zeros elsewhere, and E_ = e_ie_j^T. Here is a C++ function using
Armadillo (C++ library) Armadillo is a linear algebra software library for the C++ programming language. It aims to provide efficient and streamlined base calculations, while at the same time having a straightforward and easy-to-use interface. Its intended target users ...
: arma::mat elimination_matrix(const int &n) For the 2 \times 2 matrix A = \left begin a & b \\ c & d \end\right/math>, one choice for this transformation is given by : L_n \mathrm(A) = \mathrm(A) \implies \begin 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&1 \end \begin a \\ c \\ b \\ d \end = \begin a \\ c \\ d \end.


Notes


References

*. *Jan R. Magnus and Heinz Neudecker (1988), ''Matrix Differential Calculus with Applications in Statistics and Econometrics'', Wiley. . *Jan R. Magnus (1988), ''Linear Structures'', Oxford University Press. {{ISBN, 0-19-520655-X Matrices de:Eliminationsmatrix