# Questions tagged [vectorization]

The vectorization of a matrix is a linear transformation that converts the matrix into a column vector.

70 questions
Filter by
Sorted by
Tagged with
51 views

### Derivative of the Cholesky factor

I have a symmetric positive definite matrix $L\in\mathbb{R}^{n\times n}$ and its Cholesky factor $G\in\mathbb{R}^n$ such that $L=GG^T$. Called $\mathrm{vec}:\mathbb{R}^{n\times n}\to\mathbb{R}^{n^2}$ ...
• 776
1 vote
35 views

### How can I generalize a vector-matrix-vector product into a vector?

I've been trying to generalize a vector-matrix-vector product that represents the $i$th element of a vector $v$, but I can't figure out how to put it into a concise form. Let $v \in \mathbb{R}^{n}$ be ...
• 13
1 vote
54 views

30 views

• 540
1 vote
837 views

### Equivalent form of vectorization of Kronecker product

This question is hard to ask, but I'll try to be as specific as I can. For matrices $A \in \mathbb{R}^{m \times n}$, $B \in \mathbb{R}^{p \times q}$, is there an equivalent representation (see below) ...
• 540
58 views

### Can we write down $\mathrm{vec}(Y^{-1})$ in terms of $\mathrm{vec}(Y)$?

Lets denote the Kronecker product by $\otimes$ and the vectorization of a matrix $Y$ by $\mathrm{vec}(Y)$. Given $A\in\mathbb{R}^{n\times n}$ and $B\in\mathbb{R}^{n\times m}$, where $n\geq m$. What ...
• 1,910
1 vote
110 views

### Vector-matrix differentiation and vectorisation

In recurrent neural network backpropagation (BPTT), we have the equations: \begin{align} e_t &= E^T x_t \\ a_t &= W_{hx}^T e_t+ W_{hh}^T h_{t-1}\\ h_t &= \text{tanh}(a_t) \\ s_t &= W_{...
• 238
1 vote
111 views

• 169
96 views

### Relationship between Kronecker square and vec square

Let $X$ be a $n$ by $n$ symmetric matrix. Let vec$(X)$ denote the operator that stacks the columns of $X$ into a row vector and let $\otimes$ denote the well-known Kronecker product. The two $n^2$ by ...
• 603
365 views

### Python code for Duplication matrices

I was looking for a resource/code/script in python for forming duplication matrices but surprisingly it still evades me. The wiki page gives a pseudo-code for generating this 'unique' duplication ...
• 464
43 views

### Is there a (nice) closed form solution to $\frac{dP(t)}{dt} = AP(t)+P(t)A^T+R$

The problem: Consider constant matrices $A,R\in\mathbb{R}^{n\times n}$. I want to solve: $$\frac{dP(t)}{dt} = AP(t)+P(t)A^T+R$$ for $P(t)\in\mathbb{R}^{n\times n}$. My attempt: note that the ...
• 1,704
600 views

1 vote
112 views

1 vote
108 views

### Find $\operatorname{trace}(BY^{-1})$, given $\mathrm{vec}(Y)=(A\otimes A-I_n)^{-1}\mathrm{vec}(B)$

Given diagonal $A\in\mathbb{R}^{n\times n}$, symmetric $B\in\mathbb{R}^{n\times n}$, and $\mathrm{vec}(Y)=(A\otimes A-I_n)^{-1}\mathrm{vec}(B)$, find the following: \begin{align} \operatorname{trace}(...
• 1,910
73 views

### MATLAB elementwise matrix element access with ndgrid.

(Apologies if this is the wrong SE) I've got a function containing a rather ugly nested for loop structure that I'm trying to vectorize. Effectively, I've got a matrix of coefficients, C (as a ...
• 101
1 vote
933 views

### From vec-trick to matrix-trick for Kronecker products

for the vec-trick of the Kronecker product, we can write $$\left(\mathbf{B}^{\top} \otimes \mathbf{A}\right) \operatorname{vec}(\mathbf{X})=\operatorname{vec}(\mathbf{A} \mathbf{X} \mathbf{B}).$$ ...
• 878
1k views

### 3D Array Multiplication

I have $2$ matrices ($A$ with shape $(5,2,3)$ and $B$ with shape $(5,3,8)$), and I want to perform some kind of multiplication in order to take a new matrix with shape $(5,2,8)$. Pseudo Code: ...