f(x) = x' * E * x

x' = x transpose

E = a covariance matrix

The problem is: prove that f(x) is convex. The solution has the equations:

gradient of f = 2 * E * x <- How is the gradient calculated here from f(x)?

gradient^2 of f = 2 * E

E > 0 since it is a covariance matrix, therefore f is convex

I want to learn how to calculate the gradient from the function f, the answer is given but I don't know how it was determined.