Gradient of a sum of logarithms

66 Views Asked by At

Let the scalar field $f : {\Bbb R}_{>0}^n \to {\Bbb R}$ be defined by $$ f ({\bf x}) = \sum_{i=1}^{n}\ln x_i $$ and find the gradient $\nabla f$.


I am new to matrix and vector derivatives. I am not sure if my understanding is right. Since $\frac{\partial f}{\partial x_i}=\frac{1}{x_i}$, we have $\nabla f ({\bf x}) = \left( \frac{1}{x_1}, \frac{1}{x_2}, \dots, \frac{1}{x_n} \right)$. Is it correct?