Various resources claim
$ \nabla_x x^\top x = 2x $ .
I only know
$ \nabla_X f(X) = \begin{bmatrix} \frac{\partial f(X)}{\partial x_{11}} & \cdots & \frac{\partial f(X)}{\partial x_{1m}}\\ \vdots & & \\ \frac{\partial f(X)}{\partial x_{n1}} & \cdots & \frac{\partial f(X)}{\partial x_{nm}} \end{bmatrix} $
How do I use the above rule to get $\nabla_x x^\top x = 2x$?
Hint: Based on my understand, even if a question look like homework, if OP explained his point of view and his own efforts to understand, and he only asks for confirmation / rejection / details, the question should be on topic.
I tried the following, but cannot find the answer.
$ \begin{align*} \nabla_Z f(Z) =& \nabla_Z\begin{bmatrix} z_{11} & \cdots & z_{1m}\\ \vdots & & \\ z_{n1} & \cdots &z_{nm} \end{bmatrix}^\top \begin{bmatrix} z_{11} & \cdots & z_{1m}\\ \vdots & & \\ z_{n1} & \cdots &z_{nm} \end{bmatrix}\\ =& \nabla_Z\begin{bmatrix} z_{11} & \cdots & z_{n1}\\ \vdots & & \\ z_{1m} & \cdots &z_{nm} \end{bmatrix} \begin{bmatrix} z_{11} & \cdots & z_{1m}\\ \vdots & & \\ z_{n1} & \cdots &z_{nm} \end{bmatrix} \notag \\ =& \nabla_Z\begin{bmatrix} z_{11}z_{11}+z_{21}z_{21}+\cdots +z_{n1}z_{n1} & \cdots & z_{11}z_{1m}+z_{21}z_{2m}+\cdots +z_{n1}z_{nm}\\ \vdots & & \\ z_{1m}z_{11}+z_{2m}z_{21}+\cdots +z_{nm}z_{n1} & \cdots & z_{1m}z_{1m}+z_{2m}z_{2m}+\cdots +z_{nm}z_{nm} \end{bmatrix} \notag \\ =& \begin{bmatrix} \frac{\partial}{\partial z_{11}} z_{11}z_{11}+z_{21}z_{21}+\cdots +z_{n1}z_{n1} & \cdots & \frac{\partial}{\partial z_{1m}}z_{11}z_{1m}+z_{21}z_{2m}+\cdots +z_{n1}z_{nm}\\ \vdots & & \\ \frac{\partial}{\partial z_{n1}}z_{1m}z_{11}+z_{2m}z_{21}+\cdots +z_{nm}z_{n1} & \cdots & \frac{\partial}{\partial z_{nm}}z_{1m}z_{1m}+z_{2m}z_{2m}+\cdots +z_{nm}z_{nm} \end{bmatrix} \notag \\ = & \begin{bmatrix} 2z_{11} & z_{11} & \cdots & z_{11}\\ & 2z_{22} \\ \vdots & \\ z_{nm} & z_{nm} & \cdots & 2z_{nm} \end{bmatrix} \notag \end{align*} $