Hi,

I need help computing the gradient of a function.

$\displaystyle f(b) = (y-Xb)^{2}+b^{2}$

Where y and b are vectors, and X is a matrix.

So

$\displaystyle f(b) = (y-Xb)^{T}(y-Xb)+b^{T}b)$

$\displaystyle f(b) = (y^{T}y -y^{T}Xb - b^{T}X^{T}y + b^{T}X^{T}Xb +b^{T}b)$

I need help to find $\displaystyle \triangledown _{b} (y^{T}y -y^{T}Xb - b^{T}X^{T}y + b^{T}X^{T}Xb+b^{T}b)$

Thanks!