Gradient of a summation

$\begingroup$

How to calculate the gradient of the following summation in terms of $x_i$ ?

$$\sum_{i=0}^n(x_i-a)^2$$

is the following answer true?

$$2 \sum_{i=0}^n(x_i-a)$$

Thank you

$\endgroup$ 3

1 Answer

$\begingroup$

The gradient is the vector of the partial derivatives; $\partial_{x_i} \sum_{i=0}^n (x_i−a)^2=2(x_i−a)$. So the first component of your gradient is $2(x_1−a)$.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like