# Chain rule and gradients

Suppose $f:\mathbb{R}^n \to \mathbb{R}^n$ and $v:\mathbb{R}^n \to \mathbb{R}$. I want to find $\nabla (v \circ f).$

Am I right: $\nabla (v \circ f) = \nabla v|_f \cdot Df$ where $Df$ is the matrix of partial derivatives of $f$. This is what Wikipedia tells me. But we are doing a column vector dotted with a matrix, so I guess it should be $Df \cdot \nabla v|_f$? Am I correct?

-

## 1 Answer

$\nabla (v \circ f) = \nabla v|_f \cdot Df$ is correct because $\nabla v|_f$ is a row vector.

-
Sorry my comment was wrong. You're right I think. but it's not what I expect of a gradient vector. –  mr. x Dec 10 '12 at 12:38