> [!definition]
>
> Let $X$ be a $C^p$-[[Manifold|manifold]]. A **function on $M$**, is a $C^p$-[[Manifold Morphism|morphism]] $f: X \to \real$.
>
> The set of all functions on $X$ forms a [[Vector Space|vector space]], and is denoted as $C^p(X)$.
> [!definition]
>
> Let $p \in X$, $(U, \varphi)$ be a [[Atlas|chart]] at $p$, $v \in T_pX$ be a [[Tangent Vector|tangent vector]], $f \in C^p(X)$, and $(\real, \text{Id})$ be the standard chart on $\real$. Define
> $
> vf = D(f_{U, \real})(\hat p) \cdot \hat v
> $
> [!definition]
>
> Let $X$ be a [[n-Manifold|n-manifold]], $p \in X$, $(U, \varphi)$ be a [[Atlas|chart]] at $p$, and $f \in C^p(X)$ be a function. Define the **differential** of $f$ as $p$
> $
> df_p: T_pX \to \real \quad v \mapsto D(f_{U, \real})(\hat p)(\hat v) = vf
> $
> which is well-defined for the same reason that the [[Differential|differential]] is. So $df_p \in T_p^*X$, and $df: X \to T_p^*X$ is a rough covector field. Since $\angles{df, \xi} \in C^{p - 1}$ for all [[Vector Field|vector fields]] of $C^{p - 1}$, $df$ is a [[Covector Field|covector field]] of class $C^{p - 1}$.
>
> This definition of the differential is identical to viewing $f$ as a morphism $X \to \real$, and identifying $T_p\real = \real$ via the standard global chart for each $p$.
> [!theorem]
>
> Let $X$ be a n-manifold and $f, g \in C^\infty(X)$. The map $d: C^\infty(X) \to \vf^*(X)$ with $f \mapsto df$ satisfies the following properties:
> 1. **Linearity:** If $\lambda \in \real$, then $d(\lambda f + g) = \lambda df + dg$.
> 2. **Product Rule:** $d(fg) = fdg + gdf$.
> 3. **Quotient Rule:** $d(f/g) = (gdf-fdg)/g^2$ if $g \ne 0$.
> 4. **Chain Rule:** If $J$ is an interval such that $f(X) \subset J \subset \real$, and $h: J \to \real$ is a smooth function, then $d(h \circ f) = (h' \circ f)df$.
> 5. **Vanish on Constants:** If $f$ is constant, then $df = 0$.
>
> *Proof*. Linearity and product rule comes from the fact that [[Tangent Vector|tangent vectors]] are derivations:
> $
> \begin{align*}
> d(\lambda f + g)(v) &= v(\lambda f + g) = \lambda vf + vg = \lambda df(v) + dg(v) \\
> d(fg)v &= v(f + g) = gvf + fvg = gdf(v) + fdg(v)
> \end{align*}
> $
> By using a chart $(U, \varphi)$, we get the chain rule
> $
> D(h \circ f \circ \varphi^{-1})_p(\hat v) = Dh_{f(p)} \circ D(f \circ \varphi^{-1})_{\hat p}(\hat v) = (h' \circ f)df(v)
> $
> In particular, if $h(x) = 1/x$, then $h'(x) = -1/x^2$, and $d(h \circ g) = -\frac{dg}{g^2}$ if $g > 0$ or $g < 0$. Since $g$ is continuous, $\bracs{p: g(p) > 0}$ and $\bracs{p: g(p) < 0}$ are [[Open Set|open]]. Restriction to either of the sets yields that
> $
> d(f/g) = fd\frac{1}{g} + \frac{1}{g}df = -\frac{fdg}{g^2} + \frac{gdf}{g^2} = \frac{gdf - fdg}{g^2}
> $
>
> Lastly, if $f$ is constant, then $vf = 0$ for all $v \in T_pX$, so $df = 0$.