$\newcommand{\Spec}{\mathrm{Spec}\,}$Let $X=\Spec A$ be a variety over $k$, then we have the definition of the tangent bundle $\hom\_k(\Spec k[\varepsilon]/(\varepsilon^2),X)$ (note that this has the structure of a variety). On the other hand, we have the definition of a tangent sheaf $\hom\_{\mathscr{O}\_X}(\Omega\_{X/k},\mathscr{O}\_X)$. What is the relationship between the two? Also, when $X$ is an arbitrary scheme (not necessarily affine), then does the relationship still hold?



Relationship between Tangent bundle and Tangent sheaf
You can always apply the "vector bundle" construction to $\Omega:=\Omega\_{X/k}$ (locally free or not). What you get is a scheme $T=\mathrm{Spec\ Sym}(\Omega)\to X$ which deserves to be called "tangent bundle" (albeit not locally trivial); in particular its $k$-points are what you want and, more generally, if, say, $Z=\mathrm{Spec}\ C$ is an affine $k$-scheme, then $T(C)$ is just $\mathrm{Hom}\_k (\mathrm{Spec}\ C[\varepsilon]/\varepsilon^2, X)$.


On the other hand consider the ${\cal O}\_X$-dual ${\cal T}:={\Omega}^\vee$. For every $X$-scheme $y:Y\to X$ there is a canonical map $\Gamma(Y,y^\*\mathcal{T})\to \mathrm{Hom}\_X(Y,T)$. If $Y$ is an open subset of $X$ this is bijective. But if $y$ is a point of $X$, then the LHS is $\Omega^\vee \otimes \kappa(y)$ while the RHS is the $\kappa(y)$-dual of $\Omega\otimes \kappa(y)$. Clearly the image consists of those tangent vectors at $y$ which extend to vector fields in a neighbourhood. The computation when $X$ is the union of the two axes in the plane is a good exercise; if $y$ is the origin the above map is zero.


[EDIT] after seeing Unknown's answer (BTW, there are some problems with TeX there). The above argument shows that the "tangent bundle" is always a scheme, if you define it right. Another way of seeing this is that it's just an instance of Weil restriction: if $R$ is a finite-dimensional $k$-algebra you can define the functor $\underline{\mathrm{Hom}}\_k (\mathrm{Spec}(R),X)$ in a similar way. This is always an algebraic space, and it is a scheme if $X$ is quasiprojective. But it is also a scheme if $R$ is *local*, which is the case here with $R=D\_1(k)$. The reason is that if you cover $X$ by affines $U\_i$, every morphism frome a local scheme to $X$ factors through one of the $U\_i$'s, so we can construct the Weil restriction of $X$ by gluing those of the $U\_i$'s.


