I want to compute the derivative of
\begin{align} f(x) = Axx^\top B^\top \label{eqn} \end{align}
with respect to $x$ where $A$ and $B$ are $n\times n$ matrices and $x$ is a (column) vector of size $n \times 1$. By this I mean the derivative of each component of $f(x)$ with respect to each component of $x$.
I can prove that if $$ g(x) = xx^\top $$
Then the derivative can be expressed as, $$ \frac{\partial g}{\partial x} = x \otimes I_n + I_n \otimes x $$ where $I_n$ is the $n\times n$ identity matrix. In here I am vectorizing $xx^\top$ and then taking the derivative with respect to each of the components of $x$.
Question: Is there a way to extend this result to $f(x)$. My gut feeling is that this should be possible. Any thoughts?. If that's not possible how do I go about computing it?
EDIT (After Rodrigo de Azevedo's comment): You are right. But I mean the derivative in the following flattened sense. I hope this makes it a bit clearer.
Let us consider the $2 \times 2$ case. Then $ Y =f(x)$ is a $2 \times 2$ matrix. If I vectorize $f(x)$ then I can view $f$ as, $$ f: \mathbb{R}^2 \to \mathbb{R}^4 $$ More precisely \begin{align} f: \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \to \begin{bmatrix} Y_{11} \\ Y_{21} \\ Y_{12} \\ Y_{22} \end{bmatrix} \end{align} Then by the symbol $\frac{\partial{f(x)}}{\partial{x}}$ I mean the following: \begin{align} \frac{\partial{f(x)}}{\partial{x}} & = \begin{bmatrix} \frac{\partial{Y_{11}}}{\partial{x_1}} & \frac{\partial{Y_{11}}}{\partial{x_2}} \\ \frac{\partial{Y_{21}}}{\partial{x_1}} & \frac{\partial{Y_{21}}}{\partial{x_2}} \\ \frac{\partial{Y_{12}}}{\partial{x_1}} & \frac{\partial{Y_{12}}}{\partial{x_2}} \\ \frac{\partial{Y_{22}}}{\partial{x_1}} & \frac{\partial{Y_{22}}}{\partial{x_2}} \end{bmatrix} \end{align}