Why must nilpotent elements be allowed in modern algebraic geometry? On the Wikipedia page1 about algebraic varieties https://en.wikipedia.org/wiki/Algebraic_variety, a sentence reads as follows:
[[A more significant modification is to allow nilpotents in the sheaf of rings. A nilpotent in a field must be 0: these if allowed in coordinate rings aren't seen as coordinate functions.
From the categorical point of view, nilpotents must be allowed, in order to have finite limits of varieties (to get fiber products).]]
So I am wondering if there is an intuitive example to get non-reduced 'schemes' from reduced 'algebraic varieties' (probably by taking fiber product or alike)?
1 Link to a revision from February 2011.
 A: Another example of this necessity.
If $G$ be an algebraic group, you would like it center $\mathcal{Z}(G)$ to be an algebraic group. 
But for example if you take $SL_n$ defined over a field $k$ (which is absolutely reduced), its center is $\mu_n=Spec\left(\frac{k[X]}{(X^n-1)}\right)$, which is not reduced if $char(k)$ divides $n$.
A: I'm a bit confused by the quoted wikipedia entry, because the category of reduced rings also has coproducts (take the tensor product, and then pass to the quotient by the nilradical), and hence the category of reduced schemes, the category of varieties over a field, and so on, all admit fibre products. [Added: See Jim's Borgers series of comments below for a discussion of why, nevertheless, there may be a purely categorical description of the sense in which constructions in the category of reduced rings can be "wrong", while constructions in the category of all rings are the right ones.]  
So the answer to the question of why we need nilpotents is not that it is necessary for the existence of fibre products. 
Grothendieck introduced nilpotents for many reasons, a number of which are discussed in the other answers: to get correct counting in degenerate situations, it is typically necessary to allow nilpotents; they are also the bedrock of deformation theory and other applications of analytic ideas in algebraic geometry.
It might be helpful to recall another motivation, which forms a significant part of Grothendieck's overall strategy for studying algebraic geometry: Suppose that we want to prove a property about a morphism $f: X \to S$.  A typical approach is to first show that it
is a local property, in some sense, so that we can reduce to the case when Spec $\mathcal O_{S,s}$
for some point $s \in S$, and hence assume that $S$ is local; and then to use a flat descent argument to pass from $\mathcal O_{S,s}$ to its completion, and thus assume that $S$ is the Spec of a complete local ring.  We then write this complete local ring as the projective limit of the quotients by its maximal ideals, and so reduce to the case when $S$ is the Spec of an Artinian local ring.  Since such a Spec has a single point, we can then hope to reduce to checking our property on the fibre over this one point, which reduces us to the case when $S$ is the Spec of a field.
This is a powerful method, which absolutely requires us to be able to do geometry over an Artinian ring (and hence requires us to allow nilpotents).  It comes up in lots of places, e.g. in establishing basic properties of abelian schemes, by reducing to the abelian variety case.  See the anwers to this question for some examples.
A: Suppose you want to do moduli theory or to put it simpler, you are interested in deformations and degenerations. Often the degenerate objects have a natural non-reduced structure. In fact it is possible that taking the corresponding reduced scheme screws things up.
Here are two simple examples:
Example #1:
Consider the morphism $\mathbb A^2\setminus\{(y=0)\}\to \mathbb A^1$ defined by $(x,y)\mapsto x^2/y$. The fibers are the curves defined by $\lambda y=x^2$. For $\lambda\neq 0$ this is a parabola (minus one point) and for $\lambda=0$ a (double) line (minus one point). If we only consider reduced schemes, then this is just a line, but otherwise we would expect that the members of a family of plane curves have the same intersection numbers (counted properly and also counting intersections at infinity) with other curves. Taking another line in general position one can see easily that the parabola intersects it in $2$ points while the line in only $1$. Considering the scheme theoretic fiber $x^2=0$ which is a double line resolves this problem.
To make this example more precise (and somewhat more complicated) do this: Let $\phi: Bl_O\mathbb P^2\to \mathbb P^1$ be the morphism induced by the above, where $Bl_O\mathbb P^2$ is the blow up of $\mathbb P^2$ at the "origin", i.e., the morphism given by $[x:y:z]\mapsto [x^2:yz]$. Then $\phi^{-1}([a:b])$ is (the strict transform of) a parabola if $ab\neq 0$, two lines if $b=0$, and a double line if $a=0$.
Example #2:
Let $X=\{(1,\lambda t, t^2,t^3)\vert (t,\lambda)\in \mathbb A^2\}\subset \mathbb A^3$. This is a surface defined "classically". Consider its projection to $\mathbb A^1$ by mapping the point $(1,\lambda t, t^2,t^3)$ to $\lambda$. Denote this by $f:X\to\mathbb A^1$. Still pretty classical. Now notice that the (classical=reduced) fiber of $f$ over $\lambda=0$ is a nodal cubic curve while for $\lambda\neq 0$ it is a twisted cubic. Also notice that this family can easily be compactified to be a projective family, so we get a family of $\mathbb P^1$'s degenerating to a projective nodal curve. However, without nilpotents this leads to severe headache.
Since $X$ is irreducible and $\mathbb A^1$ is non-singular, $f$ should be flat. But fibers of a flat morphism have constant Hilbert polynomials, in particular their arithmetic genus is constant. The arithmetic genus of a twisted cubic (i.e., $\mathbb P^1$) is $0$ while that of a nodal cubic is $1$. If you want a completely classical argument, then one could say that the nodal cubic is also an obvious degeneration of non-singular plane cubic curves. Working over the complex numbers a plane cubic is a torus while a twisted cubic is a sphere. So this would suggest that it is possible to deform a sphere to a torus....
The resolution of this dilemma is that if you compute the scheme theoretic fiber (using fibre products) then you'll see that the correct fibre over $\lambda=0$ is actually the nodal cubic, with a nilpotent sitting at the singularity. So the fibre is a non-reduced scheme and its arithmetic genus is $0$ so we can all sleep peacefully.
A: Here's an example that highlights why nilpotents are at least informative:  Consider the intersection of the curves in $\mathbb{A}^2$ defined by $y=x^2$ and $y=0$.  Set-theoretically, there is only the point $(0,0)$, but this doesn't account for the fact that the multiplicity of the intersection is $2$.  
However, one can phrase this simple case in terms of fiber products (as you request) as follows:  Let $C$ denote the curve in $\mathbb{A}^2$ defined by $y=x^2$ and let $\pi:C\to \mathbb{A}^1$ denote the projection to the $y$ coordinate.  Then the fiber product of $\pi$ along the inclusion of $0\hookrightarrow \mathbb{A}^1$ is precisely (the spectrum of) $K[x]/(x^2)$, and this exponent $2$ (which is the ramification index of $\pi$ at $(0,0)\in C$) "sees" this higher multiplicity via. nilpotence!
A: Question 1: "So I am wondering if there is an intuitive example to get non-reduced 'schemes' from reduced 'algebraic varieties' (probably by taking fiber product or alike)?"
Nilpotent elements are useful in mathematics (algebra/geometry, complex analysis, differential geometry) when studying derivatives, differential operators and tangent spaces.
Let $k$ be a field and let $A:=k[x],B:=k[x,y]$ be polynomial rings with $I:=(y-x)\subseteq B$ the ideal defined by the element $y-x$. Let $J(l):=B/I^{l+1}$ and let
$T^l:A \rightarrow J(l)$ be defined by $T^l(f(x)):=f(y)$. The left $A$-module $J(l)$
is free of rank $l+1$ on the elements $(dx)^i:=(y-x)^i$ for $i=0,..,l$. You can prove this using induction.
Example 0. Let $k$ have characteristic zero. It follows from the binomial theorem and an induction that
$T^l(f(x))=\sum_{i=0}^l \frac{f^{(i)}(x)}{i!}(dx)^i$.
Example 1. Let $f(x):=x^2$. We get
$T^l(f(x)):=f(y)=y^2=(x+dx)^2=x^2+2xdx+(dx)^2=$
$f(x)+ f'(x)dx+\frac{f^{(2)}(x)}{2!}(dx)^2$.
Hence the map $T^l$ is the Taylor expansion of the polynomial $f(x)$. The map
$T^l$ is a "differential operator" of order $l$ from $A$ to $J(l)$. If $k$ is the field of real numbers and $\mathfrak{m}:=(x-a)$ for $a\in k$ we may pass to the fiber
$J(l)(a):= \kappa(\mathfrak{m})\otimes_A J(l) \cong k\{(dx)^i\}$
and as an element of $J(l)(a)$ it follows
$T^l(f(x)) = \sum_{i=0}^l \frac{f^{(i)}(a)}{i!}(dx)^i \in J(l)(a)$.
Hence in this case we get the value of the Taylor series of $f(x)$ of order $l$ at the
real number $a\in k$.
If $z=a+ib$ with $a,b$ real numbers and $b \neq 0$ it follows
$p(x):=(x-z)(x-\overline{z})=x^2-2ax+a^2+b^2 \in k[x]$
is an irreducible polynomial with $k[x]/(p(x))\cong \mathbb{C}$. Choosing an explicit isomorphism $\phi: k[x]/((p(x)) \cong \mathbb{C}$ it follows
$0=\phi(p(x))=p(\phi(x))$
hence $\phi(x)$ equals $z$ or $\overline{z}$. Hence if $\mathfrak{p}=(p(x))$ and we pass to the fiber $\kappa(\mathfrak{p})\otimes J(l):=J(l)(\mathfrak{p})$ we get an isomorphism
$J(l)(\mathfrak{p})\cong \mathbb{C}\{(dx)^i\}$.
If we "Taylor expand" $f(x)$ and pass to the fiber $J(l)(\mathfrak{p})$
we get an element $T^l(f(\phi(x))) \in \mathbb{C}\{(dx)^i\}$, and the value of the Taylor series $T^l(f(\phi(x)))$
depends on the choice of an isomorphism $\kappa(\mathfrak{p})\cong \mathbb{C}$. and the choice of $\phi(x)\in \mathbb{C}$. What does not depend on this choice is if the higher order derivative $\frac{f^{(i)}(x)}{i!}$ is zero or not.
Note: If $f(x) \in \mathbb{R}[x]$ is any polynomial it follows $T^l(f(x))=0$ in the fiber at $x-a$ iff $f^{(i)}(a)=0$ for $i=0,..,l$. This holds iff $f(x)=f_l(x)(x-a)^{l+1}$. Hence $T^l(f(x))=0$ in the fiber at $x-a$ iff $a$ is a zero of $f(x)$ of order $l+1$. If $p(x):=(x-z)(x-\overline{z})$ it follows $T^l(f(x))=0$ in the fiber at $p(x)$ iff $f(x)=f_l(x)p(x)^{l+1}$. Hence $T^l(f(x))=0$ iff $z$ and $\overline{z}$ are zeros of $f(x)$ of multiplicity $l+1$.
If $\pi: Spec(J(l))\rightarrow Spec(A)$ is the canonial map, it follows $Spec(J(l))$ is a "geometric vector bundle" in the sense of Hartshorne, Ex II.5.18. The scheme $Spec(J(l))$ is non-reduced but $Spec(A)\cong \mathbb{A}^1_k$ is reduced. This gives an intuitive explanation of why non-reduced schemes are important in the study of reduced schemes, answering Question 1. The construction of $J(l)$ can be done in the "language of algebraic varieties" using coherent sheaves.
This construction globalize to any scheme/differentiable manifold/complex manifold/etc.
Hence nilpotent elements and non-reduced ideals are useful in algebraic geometry, differential geometry and complex analysis. In these fields we study tangent spaces and differential operators.
For any smooth projective curve $C \subseteq \mathbb{P}^n_k$ there is a similar construction of a finite rank vector bundle $\mathcal{J}_C^l$ and a universal differential operator
$T^l: \mathcal{O}_C \rightarrow \mathcal{J}_C^l$ which locally "Taylor expands" sections: For any open subset $U \subseteq C$ we get a differential operator
$T^l(U): \mathcal{O}_C(U) \rightarrow \mathcal{J}_C^l(U)$
and the map $T^l(U)$ Taylor expands the section $s\in \mathcal{O}_C(U)$. If $k$ is the field of real or complex numbers, we may view $s$ as a real valued or complex valued function, and in this case $T^l(U)(s)$ is the Taylor expansion of $s$.
Example 2. If $C$ is a complex holomorphic curve and $\mathcal{O}_C$ is the sheaf of holomorphic functions on $C$, there is a similar construction. There is a finite rank holomorphic vector bundle $\mathcal{J}_C^l$ and a differential operator
$T^l: \mathcal{O}_C \rightarrow \mathcal{J}_C^l$
with the same properties.
Example 3. Complex holomorphic curves and nilpotent ideals. The holomorphic vector bundle $\mathcal{J}_C^l$ may be constructed using the ideal of the diagonal $\mathcal{I} \subseteq \mathcal{O}_{C \times C}$. The ideal $\mathcal{I}$ is a coherent sheaf of ideals, and one may prove that the quotient $\mathcal{O}_{C \times C}/\mathcal{I}^{l+1}$ is (as a left $\mathcal{O}_C$-module) locally trivial of rank $l+1$. The corresponding holomorphic vector bundle is isomorphic to $\mathcal{J}_C^l$. The pair $(C\times C, \mathcal{O}_{C\times C}/\mathcal{I}^{l+1})$ may be viewed as a "locally ringed space" with nilpotent elements in the structure sheaf. The sheaf $\mathcal{J}_C^l$ is supported on the diagonal $\Delta(C) \subseteq C \times C$, and it follows $\mathcal{J}_C^l$ is a sheaf of left and right $\mathcal{O}_C$-modules. The sheaf $\mathcal{J}_C^l$ is locally trivial as left and right $\mathcal{O}_C$-module, but these two structures are not isomorphic in general. If you consider the ideal sheaf $\overline{\mathcal{I}} \subseteq \mathcal{J}_C^l$ and choose any non-zero section $s  \in \overline{\mathcal{I}}(U)$ for $U \subseteq C$ an open set it follows $s^{l+1}=0$. Hence the sheaf of rings $\mathcal{J}_C^{l}$ has nilpotent elements. When we restrict $\mathcal{J}_C^{l}$ to the diagonal $\Delta(C)$
we get a sheaf of left and right $\mathcal{O}_C$-modules, but for local sections $s \in \mathcal{O}_C(U)$ and $\omega \in \mathcal{J}_C^l(U)$ it follows $s\omega \neq \omega s$.
You may have seen in Hartshorne exercise II.5.18 that for a scheme $(X,\mathcal{O}_X)$ there is an "equivalence of categories" between the category of locally free finite rank $\mathcal{O}_X$-modules and the category of finite rank geometric vector bundles, and there is a similar result valid for complex holomorphic manifolds. Given a complex holomorphic manifold $(Y, \mathcal{O})$ where $\mathcal{O}$ is the sheaf of complex holomorphic functions
on $Y$, it follows there is an "equivalence of categories" between the category of locally trivial finite rank $\mathcal{O}$-modules and the category of finite rank holomorphic vector bundles on $Y$.
In a calculus course in one variable you define the derivative $f'(x)$ of a real valued smooth function $f(x)$ using limits. In algebraic geometry we work over arbitrary fields (or rings) and we cannot "take limits". Using non-reduced ideals we can still formally "take derivatives" of sections of sheaves as explained above. In characteristic zero we get as you can observe above the correct Taylor expansion of any polynomial (or rational) function. In characteristic $p>0$ the notion is useful as well, ref. Question 1 in your question.
See also the discussion at:
https://math.stackexchange.com/questions/3928532/about-the-reducedness-in-algebraic-geometry/3942701#3942701
A: The easiest example I can think of is to consider the map $\mathbb{A}^1\to \mathbb{A}^1$ by
sending $x\to x^2$, where $x$ is the coordinate. Then take the fibre over
the origin, which would be $Spec k[x]/(x^2)$. The idea is that $x=0$ in the fibre 
should be counted "twice".
There is lot more that one can say about why this is a useful, and perhaps someone else will.
But let me just refer you to the book by Eisenbud and Harris for further discussion.
A: Non-reduced schemes have the very interesting geometric property that they effectively equip points with "infinitesimal orientations" similar to directional derivatives in differential geometry.  It's worth actually drawing some non-reduced affine curves and seeing how they behave by looking at the algebra.  The motivation for the definition of formal smoothness, for instance, is based on this observation, namely that given a map $X_{red}\to Y$ of $S$-schemes, with $X$ an affine scheme, we want to be able to lift this map to a map $X\to Y$.  That is, formal smoothness of $Y$ says that $Y$ is locally nice enough to accommodate infinitesimal deformations of maps into it from affines.
I'm not sure that this was the original motivation for allowing nilpotents, but it's clear that nilpotents give us a much richer picture of the geometry.
Edit: To avoid any confusion, please note that the thickenings of the form $X_{red}\to X$ will not always work if $X=Spec(A)$ does not satisfy good enough finiteness properties (in particular, the nilradical should be a nilpotent ideal, which can fail spectacularly away from Noetherian rings).  In general, the requirement is that we have, for any square-zero nilpotent thickening of affine schemes over $S$, $Spec(T/J)\to Spec(T)$ (where $J^2=0$ is a nilpotent ideal of $T$) and any map of $S$-schemes $f:Spec(T/J)\to Y$, there exists a map of $S$-schemes $\tilde{f}:Spec(T)\to Y$ extending the map $f$.
A: Elaborating on the first sentence of Harry's answer - here's another motivation for considering nilpotents.  The scheme $D=Spec(K[t]/(t^2))$ set-theoretically consists of a single point, but this point has a non-trivial (one-dimensional) tangent space with a distinguished non-zero tangent vector.  For a scheme $X/K$, a map $D\to X$ amounts to a point $x\in X$ and an element of the tangent space $T_x(X)$.  
This observation is used to characterize tangent spaces as fibers of the maps $X(D)\to X(Spec(K))$.  This is useful in the study of Lie algebras of algebraic groups, for example.
A: As others have mentioned, nilpotent elements show up (at least) in the structure rings of varieties counted with multiplicities. Why should we want to have such objects? I can think of at least three reasons:


*

*The concept of family is easier to deal with. For instance, in the context of schemes, it is easy to speak of a family of conics degenerating to a double line. If we replace the double line with the same line counted once, the family behaves more badly (it is not flat)

*As rings have fibered coproducts (tensor products), schemes have fibered products. This is a general construction with good categorical properties, and it generalizes a variety of contexts (fibers, intersections, pullbacks of vector bundles...). If you want to stick with varieties, this construction will not be available, as the tensor products of reduced rings can be non-reduced

*A particular non-reduced scheme $k[x]/(x^2)$ is very useful in deformation theory. In deformation theory you want to study a given map up to the first order (or maybe higher orders, so rings like $k[x]/(x^n)$ appear). The existence of non-reduced schemes allows you indentify such an object (a first order approximation to some map) with an actual map from $k[x]/(x^2)$. This is quite handy and simplifies many arguments.


One more reason to be happy in keeping schemes the way they are is the existence of the Quot scheme. This is a general construction due to Grothendieck which allows you to have schemes which parametrizes a manifold of objects: subschemes, morphisms and so on. Moreover, most other moduli space in use in algebraic geometry are constructed starting from a Quot scheme, typically as a GIT quotient.
There is no corresponding general existence theorem in the context of varieties, so moduli theorists would have a pretty hard time abandoning schemes. Of course often it happens that the relevant Quot schemes are actually varieties, but we do not know how to construct them directly. It is easier to produce something (a scheme) and then show that it is nice (a variety), than producing a nice object in one step.
