Derivative of a vector with respect to a matrix let $W$ be a $n\times m$ matrix and $\textbf{x}$ be a $m\times1$ vector. How do we calculate the following then?

$$\frac{dW\textbf{x}}{dW}$$

Thanks in advance.
The quantity in question  is a $3^{rd}$ order tensor. 

One approach is to use index notation
$$\eqalign{
  f_i &amp;= W_{ij} x_j \cr\cr
 \frac{\partial f_i}{\partial W_{mn}}
 &amp;= \frac{\partial W_{ij}}{\partial W_{mn}} \,x_j \cr
 &amp;= \delta_{im}\delta_{jn} \,x_j \cr
 &amp;= \delta_{im}\,x_n \cr
}$$
Another approach is vectorization
$$\eqalign{
  f &amp;= W\,x \cr
    &amp;= I\,W\,x \cr
    &amp;= (x^T\otimes I)\,{\rm vec}(W) \cr
    &amp;= (x^T\otimes I)\,w \cr\cr
 \frac{\partial f}{\partial w} &amp;= (x^T\otimes I) \cr
}$$
For independent case:

If $\mathbf{x}$ is independent of $W$, this problem can be calculated as follows.

$$\cfrac{\partial W\mathbf{x}}{\partial W}=
\cfrac{\partial}{\partial W}
\begin{bmatrix}
w_{11} &amp; w_{12} &amp; \cdots &amp; w_{1m} \\
w_{21} &amp; w_{22} &amp; \cdots &amp; w_{2m} \\
\vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
w_{n1} &amp; w_{n2} &amp; \cdots &amp; w_{nm} 
\end{bmatrix}
\mathbf{x}
$$

$$
=
\begin{bmatrix}
\cfrac{\partial w_{11}}{\partial w_{11}} &amp; \cfrac{\partial w_{12}}{\partial w_{12}} &amp; \cdots &amp; \cfrac{\partial w_{1m}}{\partial w_{1m}} \\
\cfrac{\partial w_{21}}{\partial w_{21}} &amp; \cfrac{\partial w_{22}}{\partial w_{22}} &amp; \cdots &amp; \cfrac{\partial w_{2m}}{\partial w_{2m}} \\
\vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
\cfrac{\partial w_{n1}}{\partial w_{n1}} &amp; \cfrac{\partial w_{n2}}{\partial w_{n2}} &amp; \cdots &amp; \cfrac{\partial w_{nm}}{\partial w_{nm}} 
\end{bmatrix}
\mathbf{x}
$$

Therefore, all elements are $1$. Eventually, the result is below.

$$
\cfrac{\partial W\mathbf{x}}{\partial W}=
(\mathbf{x}^{\text{T}}\mathbf{1_{m}}) \mathbf{1_{n}}
$$

Then $\mathbf{1_{k}} \in \mathbf{R}^{k}$ is

$$\mathbf{1_{k}}=[1 \ 1 \ \cdots 1]^{\text{T}}$$

For dependent case:

If $\mathbf{x}$ is dependent of $W$, it is more difficult than independent case. Likewise,

$$
\cfrac{\partial W\mathbf{x}}{\partial W}=
(\mathbf{x}^{\text{T}}\mathbf{1_{m}}) \mathbf{1_{n}} +
W \cfrac{\partial F(W) }{ \partial W}\mathbf{x}_{0}
$$

Then, $\mathbf{x}$ can be replaced as follows

$$\mathbf{x}=F(W)\mathbf{x}_{0}$$

where, $F(W) \in \mathbf{R}^{m \times n}$ is a matrix function, for which parameters are $W$, and $\mathbf{x}_{0} \in \mathbf{R}^{m}$ is independent of $W$.