> [!definition]
>
> Let $(X, g)$ be a $C^p$-[[Riemannian Manifold|Riemannian manifold]] and $f \in C^p(X)$ be a [[Function on Manifold|function]]. The **gradient** of $f$ is a [[Vector Field|vector field]] $\text{grad } f \in \vf(X)$ such that
> $
> \angles{\text{grad } f, X}_g = \angles{X, f} \quad \forall X \in \vf(X)
> $
> Obtained from taking the dual using the [[Tangent Cotangent Isomorphism|tangent cotangent isomorphism]].
> [!theorem]
>
> Let $f, g \in C^p(X)$ and $\alpha \in \real$. By linearity of dual representation, the gradient inherits the following properties from the [[Differential|differential]].
> - Linearity: $\grad{\alpha f + g} = \alpha \grad f + \grad g$.
> - Product Rule: $\grad{fg} = f\grad{g} + g\grad{f}$.
> [!theorem]
>
> Let $(U, \varphi = (x_1, \cdots, x_n))$ be a coordinate chart. Denote
> $
> g^{ij} = g_{ij} = \angles{\ppi, \frac{\partial}{\partial x^j}}_g
> $
> as the local representation of the metric. If $G = (g_{ij})$ and $G^{-1} = (g^{ij})$, then for any $f \in C^1(U)$,
> $
> \grad f = g^{ij}\frac{\partial f}{\partial x^j}\ppi
> $
> *Proof*. Fix $1 \le i \le n$, then
> $
> \begin{align*}
> \part{}{x^i}f = \angles{\ppi, \grad f}_g = \angles{\ppi, G\grad{f}} = \braks{G\grad{f}}^i
> \end{align*}
> $
> multiplying by $\ppi$ extracts the $i$-th coordinate of the gradient. Computing in coordinates we get
> $
> G\grad{f} = g_{ij}\grad{f}^i\part{}{x^j}
> $
> so taking the inverse yields
> $
> \grad{f} = g^{jk}g_{ij}\grad{f}^i\part{}{x^k} = g^{jk}\part{f}{x^j}\part{}{x^k}
> $
> Note that via abuse of notation, the indices on $g$ should be reversed to properly reflect "taking in $j$ and outputting $i
quot;. However $G$ is symmetric, so the order does not matter.