Differential of a smooth function

I have seen that if $f$ is a smooth function on a smooth manifold $M$ then differential of $f$ at the point $p$ is defined by $(df)_p(X_p) = X_p(f)$ but i am not able to see that how it can be derived by the usual definition of differential map of a smooth map between manifolds which is as follows: If $\phi: M \to N$ is a smooth map between smooth manifolds then the differential of $\phi$ is $d\phi_p: T_pM \to T_{\phi(p)}N$ via $v \mapsto v_{\phi}$ such that $v_{\phi}(g) = v(g \circ \phi)$.

Can someone tell me the relation between the two?

Thanks!


In this special case $N = \mathbb R$, we usually think of each tangent space $T_x \mathbb R$ as being just another copy of $\mathbb R$, via the isomorphism $Y = c \partial_x \mapsto c$. To recover the number $c \in \mathbb R$ from the vector $Y \in T_p \mathbb R$ we can simply evaluate it on the identity function $\mathbb R \to \mathbb R$: $$c \partial_x \text{id} = c \frac{\partial x}{\partial x} = c. $$

So taking definition of the differential of a smooth map

$$ Df_p (X)(g) = X_p(g \circ f)$$

and plugging in $g(x)=x$ tells us that the number corresponding to $Df_p(X)$ is $$ df_p (X) = Df_p (X) (\text{id}) = X_p f. $$