TITLE: How can we interpret derivations as elements of the tangent sheaf
QUESTION [5 upvotes]: Suppose $X$ is an algebraic variety and $\delta : X \to X \times X$ is the diagonal map. I am defining the cotangent sheaf $\Omega^1_X$ as $\delta^{-1}(I/I^2)$ where $I$ is the ideal sheaf of functions in $\mathcal{O}_{X\times X}$ which vanishes on the diagonal. I'm then using the definition of the tangent sheaf as the dual sheaf 
$$
\Theta_X := \mathcal{H}om_{\mathcal{O}_X}(\Omega^1_X, \mathcal{O}_X).
$$
I know that if we have an element $\alpha$ in $\Theta_X$ then precomposing with the map $d(f) = f\otimes 1 - 1 \otimes f \text{ mod } I^2$ gives us a derivation. But how can we go in the opposite direction and interpret a derivation of the structure sheaf as an element of the tangent sheaf? I'm not too worried about nitty gritty details, but an overall idea would be nice. Thanks for any help!

REPLY [4 votes]: Assume $X$ is an affine $k$-scheme, say $X = \operatorname{Spec} A$ where $A$ is a $k$-algebra. Your definition of the cotangent sheaf amounts to this: taking $I = \ker (A \otimes_k A \to A)$, $\Omega = I / I^2$ (regarded as an $A$-module). However, there is another definition: for every $A$-module $M$, there is a natural bijection between $A$-module homomorphisms $\Omega \to M$ and $k$-derivations $A \to M$.
Indeed, as you say, given an $A$-module homomorphism $\phi : \Omega \to M$, we can define a $k$-derivation $\psi : A \to M$ by $\psi (a) = \phi (a \otimes 1 - 1 \otimes a)$; and conversely, given a $k$-derivation $\psi : A \to M$, we can define an $A$-module homomorphism $\phi : \Omega \to M$ by $\phi (a \otimes b) = \psi (a) b$. It is straightforward to verify these are mutually inverse.
In particular, $A$-module homomorphisms $\Omega \to A$ correspond to $k$-derivations $A \to A$.