I have a vector $x$ and I'm trying to find $\frac{dy}{dx}$, where $y=x^{T}x$.
I believe the answer should be $2x^{T}$ but I'm trying to understand why. Does the product rule apply to matrices/vectors being multiplied?
The issue I run into is the following:
If I use the product rule blindly (which I don't know if I'm allowed to do), I get:
$\frac{dy}{dx} = \frac{dx^{T}}{dx}x+x^{T}\frac{dx}{dx}$
$\frac{dx^{T}}{dx} = \frac{dx}{dx} = I$
So I get:
$\frac{dy}{dx} = x+x^{T}$
But this makes no sense since the dimensions of the vectors don't match. If one of them were transposed then I get 2x and everything would be fine. Any help would be greatly appreciated.
Thanks!