rdagher

5 Reputation

One Badge

4 years, 51 days

MaplePrimes Activity


These are answers submitted by rdagher

An explicit defintion of the duplication matrix is given by (Magnus & Neudecker, Def 3.2b).

The corresponding Maple procedure is given by

DuplicationMatrix := proc(n)
  local D;
  local vec, e, E, T, u;
  
  # Helpers macros
  vec := A -> convert(A, Vector[column]);
  e := (n,i) -> Vector(n, shape=unit[i]);
  E := (i,j) -> e(n,i).Transpose(e(n,j));
  T := (i,j) -> if i=j then E(i,i) else E(i,j) + E(j,i) end if;
  u := (i,j) -> e(n*((n+1)/2), (j-1)*n + i - j*(j-1)/2);
  
  # Explicit formula for duplication matrix
  D := add(seq(seq(u(i,j).Transpose(vec(T(i,j))), j=1..i),i=1..n));
  return transpose(D);
end proc:
Page 1 of 1