What would be the gradient function Suppose we have the function $f(x) = \frac{1}{2} x^T Qx - x^Tb.$ What would be $\nabla f(x)$?
I think I am just getting confused about having both $x^T$ and $x.$ My intuitive answer would be: $\nabla f(x) = \frac{1}{2} Qx - b$ but I'm not sure if that is correct though it seems like it would be since $x^T$ and $x$ represent the same vector.

The gradient of $g(x) = x^T A x$ is $g'(x) = (A + A^T) x$  The gradient of $h(x) = x^T b$ relies on the fact that $x^T b$ is a scalar, and a scalar transposed is itself.  Therefore, $x^T b = b^T x$.  Therefore, the gradient of $h$ is $h'(x) = b$.
One can think of $g(x) = x^T A x$ as analogous to $\tilde{g}(x)=kx^2 = x k x$ when k and $x$ are both scalars.  The derivative of $\tilde{g}$ is $2 k x$.  But, since matrices are more interesting than scalars, instead of $2 k$ we have $(A + A^T)$.  It's at least interesting to note that if $A$ were a scalar, then $A+A^T = 2A$, which satisfies the derivative when working with scalars.
From here, you can use the linearity of the derivative and distribute over the sum to get your answer.
