I have a vector in the following form
$\mathbf{w}^T = [a_1*w_1, a_2*w_2, \dots, a_d*w_d]$
what is the partial derivative of $\mathbf{w}$ with respect to $w_j$ ? (1 or 2)
$\frac{\partial \mathbf{w}}{\partial w_j} = a_j$
$\frac{\partial \mathbf{w}}{\partial w_j} = [0, 0, \dots, a_j, \dots, 0]$
what is the dimensionality of the output?
Let's write it in different words.
We have a function $f$ and a vector $w=\begin{pmatrix} w_1 \\w_2\\ \vdots \\w_d \end{pmatrix}$ such that $f(w)=\begin{pmatrix} a_1w_1 \\a_2w_2\\ \vdots \\a_dw_d \end{pmatrix}$
The partial derivative with respect to $w_j$ is defined as
$$\lim_{h \to 0}\frac{ f\begin{pmatrix} w_1 \\w_2\\ \vdots \\w_j+h \\ \vdots \\w_d \end{pmatrix}-f\begin{pmatrix} w_1 \\w_2\\ \vdots \\w_d \end{pmatrix}}{h}=\lim_{h \to 0}\frac{\begin{pmatrix} a_1w_1 \\a_2w_2\\ \vdots \\ a_jw_j+a_jh \\ \vdots\\a_dw_d \end{pmatrix}-\begin{pmatrix} a_1w_1 \\a_2w_2\\ \vdots \\a_dw_d \end{pmatrix}}{h}=\lim_{h \to 0}\frac{\begin{pmatrix} 0 \\ 0 \\ 0 \\ \vdots \\ a_jh \\ 0 \\ \vdots \\0 \end{pmatrix}}{h}=\begin{pmatrix} 0 \\ 0 \\ 0 \\ \vdots \\a_j \\ 0 \\ \vdots \\ 0 \end{pmatrix}$$