0
$\begingroup$

Is there any representation for the vectorization of a diagonal matrix $\text{vec}(\text{Diag}(x))$?

For example, for two elements $$\text{vec}(\begin{bmatrix} x_1 & 0 \\ 0 &x_2 \end{bmatrix}) = \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ 0 & 0 \\ 0 & 1 \end{bmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} \ . $$

In general case, $\text{vec}(\text{Diag}(x)) = A x$, what is the closed form for matrix $A$?

$\endgroup$
3
  • $\begingroup$ What do you mean by "closed form"? Is "the matrix whose $\left(i,j\right)$-th entry is $1$ if $j-1 = \left(n+1\right)\left(i-1\right)$ and $0$ otherwise" a closed form? Because that's what $A$ is. $\endgroup$ – darij grinberg Sep 22 '19 at 6:28
  • $\begingroup$ @darijgrinberg it seems there is a typo in your condition. Should be $i-1 = (n+1)(j-1)$ as in two elements example 1 in the $(4,2)$ entry. However, I am looking for $A$ to be some linear function. For example, $A = \sum_i e_i e_i^T \otimes e_i$, where $e_i$ is the i-th standard basis vector. $\endgroup$ – Andrey Gorbunov Sep 22 '19 at 8:12
  • $\begingroup$ Oops, you are right about $i $ and $j $ being swapped. $\endgroup$ – darij grinberg Sep 22 '19 at 8:23
0
$\begingroup$

$A : \Bbb R^n \to \Bbb R^{n^2}$. Let $e_i, i = 1, ..., n$ be the canonical basis vectors of $\Bbb R^n$, and let $f_j, j = 1, ..., n^2$ be the canonical basis vectors of $\Bbb R^{n^2}$

Then $$A = \sum_{i=1}^n f_{ni + n + i}\otimes e_i^T$$

$\endgroup$
1
  • $\begingroup$ Of course, I should credit danj grinberg for the index formula, where I've handled the reversal by it being the $(j,i)$th entry that is $1$. $\endgroup$ – Paul Sinclair Sep 22 '19 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.