Let $X$ be a nice scheme over a field $k$ and $D=\operatorname{Spec}(k[t]/t^2)$ the dual numbers. One knows that to give a k-rational point on $X$ and a tangent vector in this point is equivalent to giving a $k-$morphism $D\rightarrow X$.
If one has a closed point on $X$ with ideal sheaf $J$, then one can also consider the first infinitesimal neighborhood $Y$ of that point in $X$, which is just the closed subscheme o $X$ with ideal sheaf $J^2$.
My question: is there any relation between $Y$ and $D$ if I have a morphism $D\rightarrow X$ as above? It seems so as $D$ is the first inf. neigh. of it's own closed point.