What's the intution behind defining the cotangent sheaf as $\Delta^\ast(\mathscr{I}/\mathscr{I}^2)$? This definition seems to be given all over the place (e.g. Hartshorne II.8, Vakil 21.2.20, Wikipedia, McKernan's lecture notes from MIT), and never with any explanation as to why the map $\Delta : X \to X \times X$ should have any relation to relative differentials.  Is this purely some kind of formal trick?  Is there an intuitive meaning to it?  Could it work with other maps than $\Delta$, but $\Delta$ is just a convenient choice for some reason?
 A: Take $B$ a ring over another ring $A$. Look at $C = B\otimes_A B$. Let $I$ be the kernel of the ring morphism $C = B\otimes_A B \rightarrow B$ induced by the multiplication $B\times B\rightarrow B$. (This ideal is generated by all $1\otimes x - x\otimes 1$ for $x\in B$.) This ideal is an $B$-module, and has an $B$-submodule $I^2$. The quotient $B$-module $\Omega_{B / A}^1 = I / I^2$ is the differentials module of $A\rightarrow B$. The $\mathscr{O}_{\textrm{Spec}(B)}$-Module $\Delta^{*} ( \mathscr{I} / \mathscr{I}^2  )$ is but $\widetilde{\Omega_{B / A}^1}$. Note that the universal property of $\Omega_{B / A}^1$ (representing the derivations towards a $B$-module) justifies the denomination "cotangent sheaf" for its dual sheaf.
Let me give more details in the differentiable case. The three different ways one can define the tangent space $T_x M$ of a smooth differentiable variety $M$ at a point $x$ (and then the tangent bundle $TM$) are the following :


*

*(1) Using equivalent classes of smooth parametrized curves passing through $x$

*(2) Using derivations at $x$

*(3) Using cotangent vectors at $x$


What (1), (2) and (3) have in common is that they describe the "first order" behavior of a smooth function on $M$ locally at the point $x$. More precisely :
(1) The derivative of a smooth function $f$ along a curve $c$ with $c(0) = x$ depends on $c$ only through $c'(0)$, and indeed it recovers the directional derivative of $f$ at $x$ in the direction $c'(0)$.  The directional derivatives of $f$ determine the derivative of $f$ at $x$ which in turn determines the first order behavior of $f$ at $x$.
(2) Since a derivation $D$ at $x$ sees only the values of a function $f$ and its derivatives at $x$, you can legitimately replace $f$ by a polynomial $P$ by Taylor's theorem.  By the Leibniz rule $D(P)$ depends only on the linear part of a $P$ and $D(f)$ depends only on the first order part of $f$.
(3) Recall that the cotangent bundle of $M$ at $x$ is the space $I / I^2$ where $I$ is the ideal consisting of (germs of) functions $f$ in ${\mathscr{C}}^\infty(M,\mathbf{R})$ (defined at $x$) such that $f(x) = 0$.  If we imagine replacing the ring of germs by a ring of "polynomials" then $I$ represents the ideal of polynomials whose lowest order part has degree $1$ and $I^2$ is the ideal of polynomials whose lowest order part has degree $2$.  In this case $I/I^2$ is naturally identified with the space of linear polynomials.  Thus the cotangent bundle at $x$ is in a sense the space of "first order parts" of smooth functions on $M$.
The "diagonal" trick comes explicitely at play in (3), but let me make it clear in the schem context. Let me suppose for simplicity that $f : X \rightarrow S$. By abuse let $\Delta$ denote the image of the diagonal map in $X\times_S X$.
Following Sandor Kovacs here (and in fact EGA $\textrm{IV}_4$...) from now :
For a submanifold of a manifold you have the well-known short exact sequence connecting the tangent bundle of the ambient manifold restricted to the submanifold, the tangent bundle of the submanifold and the normal bundle of that submanifold in the ambient manifold. The geometric explanation to why the definition of the cotangent sheaf via the conormal bundle of the diagonal in $X\times_S X$ is the right one is that the normal bundle of the diagonal is isomorphic to its tangent bundle and the (co)normal bundle can be defined without the tangent bundle, so the tangent bundle may be defined as the normal bundle for this particular embedding.
In algebraic geometry one prefers the dual version involving the cotangent
bundles (or cotangent sheaves as I initially wrote). The story goes like this : the short exact sequence for $\Delta\subset X\times_S X$ is :
$$ 0 \to \mathscr I/\mathscr I^2 \to \Omega_{X\times_S X/S}\otimes \mathscr
O_{\Delta} \to \Omega_{\Delta/S} \to 0.  $$
Now $\Omega_{X\times_S X/S}\simeq p_1^*\Omega_{X/S}\oplus p_2^*\Omega_{X/S}$ (where $p_i$ are the $S$-projection to $X$) so that $\Omega_{X\times_S X/S}\otimes \mathscr O_{\Delta} \simeq
\Omega_{\Delta/S}\oplus \Omega_{\Delta/S}$. The natural morphism $\Omega_{X\times_S X/S}\otimes \mathscr
O_{\Delta} \to \Omega_{\Delta/S}$ in the above
short exact sequence may be identified with either projection to one of the direct summands as restricting either projections to the diagonal induces an isomorphism, which is another way to say the diagonal locally closed immersion is an $S$-section of the $p_i$'s. This implies that $\mathscr I/\mathscr I^2\simeq \Omega_{\Delta/S}$. As the diagonal morphism is an isomorphism between $X$ and $\Delta$, whatever way we may define
$\Omega_{X/S}^1$, it has to be isomorphic to the pull-back of $\mathscr I/\mathscr I^2$.
A: Let me maybe try to interpret in a naive fashion. When I say "smooth", I mean a reasonable varying way in your context (smooth, holomorphic, being polynomial, etc.), and all arguments below are local but eventually you glue these smoothly.
What are functions on $X\times X$? If you give a function $f(\cdot, \cdot)$ on $X\times X$ and a point $p$ on $X$, $f(\cdot, p)$ gives a function on X. Hence I regard functions on $X\times X$ as smooth varying functions on X parametrized by points in X. Now I look at their Taylor series $f(x, p)=\sum a_{i}(p)(x-p)^{i}$ and then what you wanted is precisely $a_{1}(p)$ . If I view $a_{1}(p)(x-p)$ again as a section of $\mathcal{O}_{X\times X}$, first of all at $p$ it better be zero(because as a series at p it doesn't have constant term), namely $a_{1}(x-p)$ vanishes on the diagonal $i: \Delta\subset X\times X$. Let $I$ be ideal of $\Delta$ then it is a section of $I$. But on the other hand you don't care about higher terms, so you kill them, by looking at $I/I^{2}$. Now recall that how we produced these is by looking at Taylor expansion of $f(\cdot, p)$ centered at $p$, so at $p$ you only care about $a_{1}(p)$(but not other $a_{1}(q)$), this gives you a section on $X$. This is precisely given by $i^{*} (I/I^{2})$.
Now back to an example, given a function $f \in \mathcal{O}_{X}$, what is $\mbox{d}f\in \Omega_{X}$? Let's first view it as a function on $X\times X$, where at each $p$, we associate the function $f$, namely $F(x,p)=f(x)$ for any $p$. How do I get linear term of Taylor expansion? First I need to kill constant term by modifying $F(x,p)=f(x)-f(p)$, then I kill higher terms by looking at its image in $I/I^{2}$. If you look at construction in Matsumura, then our $f(x)-f(p)$ is precisely his $f\otimes 1- 1\otimes f$, which we call it $\mbox{d}f$. 
Now a general differential form is just locally the above example, then you glue them smoothly, this justifies that our initial construction is correct. 
