Algebraic geometry examples What are some surprising or memorable examples in algebraic geometry, suitable for a course I'll be teaching on chapters 1-2 of Hartshorne (varieties, introductory schemes)? 
I'd prefer examples that are unusual or nonstandard, as I already know many of the standard ones (27 lines on a cubic surface, etc). 
To illustrate the sorts of things I am looking for, here are some examples that would have been useful answers if I had not already thought of them: 
The  proof of the Kakeya conjecture for finite fields.
Free sheaves need not be projective
The Hilbert scheme of m points on an n dimensional variety can have dimension larger than mn.
The scheme of nilpotent matrices is not reduced. 
The 1-line proof of Pascal's theorem from Bezout's theorem.
Spec Z[x]
Resolution of the Whitney umbrella
The related threads
What should be learned in a first serious schemes course? and Interesting results in algebraic geometry accessible to 3rd year undergraduates also have some good examples, such as Grassmannians.
Added later: Thanks for all the examples; I'm embarrassed to admit that some of them are counterexamples to statements I would have guessed were true. Over the next few weeks I will  gradually add answers below (with credit to those who suggested them) to my  draft course notes (These notes still need a lot of corrections/expansion/rewriting; they should have reached a more stable state by Dec 2010)
 A: The nonprojective surface X which is flat over a curve C consisting of two projective lines attached at two nodes, where the fibers over the smooth points of C are chains of two lines, and the fibers over the nodes are chains of three lines.  Considering the degrees of line bundles restricted to the components of the fibers shows that X cannot admit an ample line bundle.
A: *

*If you discuss the Whitney umbrella, I guess it is to show that blowing-up the singular point does not resolve the singularity whereas blowing-up the double line does. Another interesting properties of blow-up can be discussed by considering  the 3 different resolutions of the conifold $x_1 x_2- x_3 x_4 =0$ in $\mathbb{C}^4$, namely  the two small resolutions related by a flop and the blow-up of the isolated singularity with exceptional locus  $\mathbb{P}^1\times\mathbb{P}^1$.  

*A quadric surface $Q$ in
$\mathbb{P}^3$ is isomorphic to
$\mathbb{P}^1\times \mathbb{P}^1$
via the Segre embedding. However,
the Zariski topology of $Q$ is not
homeomorphic to the product topology
of $\mathbb{P}^1\times \mathbb{P}^1$
when each $\mathbb{P}^1$ is
considered with the Zariski
topology.

*The orbifolds $\mathbb{C}^2/ \Gamma$
where $\Gamma$ is a discrete group
of $SU(2)$. These orbifolds can be
expressed as the  simple isolated
singularities of a surface and their
resolution gives all  the ADE Dynkin
diagrams.
A: I am not sure whether these examples can be described as nonstandard, but they are among my favorites. Ex 5 may be too advanced for your course.

*

*Proof of Poncelet's porism using correspondences and the group law on an elliptic curve.


*There are 24 inflexion lines and 28 bitangent lines to a smooth plane quartic (Clemens, Scrapbook of complex curve theory).


*Configuration of lines on a smooth del Pezzo surface of degree $d$ obtained by blowing up $n=9-d$ points in $\mathbb{P}^2$ is described via the root system of type $E_n$ (Manin, Cubic forms).


*Configuration of exceptional curves on the resolution of a Klein-du Val singularity is given by a Dynkin graph (Shafarevich, Basic algebraic geometry, vol 1).


*How many conics in $\mathbb{P}^2$ touch 5 conics in general position? (Fulton, Intersection theory)
A: I would suggest prove the Hamilton Cayley theorem in one sentence using algebraic geometry: The theorem is true for diagonalizable matrices, which forms a Zariski dense set. (although it is not open, but it contains the open subset of matrices with distinct eigenvalues. Also, the irreducibility of $\mathbb{A}^n$ is assumed.)
This proof can be compared with the "physicists'" proof of this theorem (over $\mathbb{C}$): If $A$ is a square matrix, then it is diagonalizable after perturbation, i.e. $A+\epsilon H$ is diagonalizable. And let $\epsilon\rightarrow 0$.
Finally, as an example of the somewhat mysterious reduction steps in EGA, we can also restate and reprove it for integral domains by base change to the algebraic closure of the function field.
A: The affine line $\mathbb{A}_{\Bbbk}^1$ is not "simply connected" (i.e. has nontrivial connected étale covers) if $\Bbbk$ has positive characteristic: take $x\mapsto x^p+x$.
A: A small but illuminating exemple : isolated singularities consisting of affine $k$ lines meeting at the origin in $\mathbb{A}^n$. One can show easily that the analytic type of the singularity depends on whether lines are coplanar by computing Zariski tangent cone, that there is a 1-dimensional moduli of analytical types for 4 lines in the plane (cross-ratio) or that seminormalization of such a singularity always gives the maximally non-coplanar case. When you introduce flat families, you can also look at flat limits of families of lines in this way, and explain where the "missing" tangent vector goes.
A: It seems useful to give a counterexample to a commonly misunderstood version of upper semi continuity, namely the one stated erroneously in Shafarevich's BAG chapter I, section 6.3, corollary to theorem 7.  the correct version assumes the map is proper or is stated locally on the source instead of the target, as in Mumford's red book.  E.g. take source and target both = C^3, complex 3 space, and map (x,y,z)-->(x^2,y,z).  The subset W = {(1,y,0)} of the target has reducible preimage, namely two isomorphic copies W1, W2 of W.  Now blow up the source along one copy W1, and then remove the exceptional curve over one point of W1.  Now the composition of the blow down and the original map, has one dimensional fibers over a non closed subset of the target.
As a remark on the example of the blowup at one point of the second symmetric product of a genus 2 curve over the complexes, this example shows that the second symmetric product of an algebraic curve can have non algebraic deformations, since that is true for the 2 dimensional compact complex torus. This remark has occurred several times since the paper by Xavier Gomez Mont in about 1979.
The lines on a cubic surface are classical, and the conic bundle structure on that surface any one of them gives rise to is also useful.  The book by Semple and Roth is laden with classical examples.  Perhaps the first occurrence of the use of 4 space to draw conclusions about varieties in 3 space is the paper by Corrado Segre where he studies the quartic surface with a double conic in P^3 by projecting to it from an intersection of two quadrics in P^4.  This is of course another one in the sequence of del Pezzo surfaces of which the cubic surface is merely the most famous.
The example of Schubert's method of degeneration to count the number of lines in P^3 that meet all of 4 general lines is illustrative.  One can also combine it with the Plucker embedding of the set of all lines in P^3, computing the hyperplane section of that embedding, and reduce to the fact that this variety is a quadric in P^5.  Joe Harris' book is also loaded with nice examples, including "Fano" parameter spaces and their tangent spaces.
A: Given in an order from less challenging to do in such a course to more challenging.

*

*Conics (to "connect" with high-school algebraic geometry)
All smooth conics in $\mathbb{P}^2_{k}$ that have a rational point are isomorphic to $\mathbb{P}^1$. In particular, ellipse, hyperbola and parabola are the same; one may also learn how to distinguish them in the affine plane over $\mathbb{R}$.
Steiner's construction of a conic through 5 points, no three of which are collinear is an example of how (synthetic) projective geometry can dispense with algebra! If you are adventurous, you can also give Steiner's construction of the rational normal curve.


*Flatness (example learnt from S. Ramanan)
The morphism from $V((x)\cap(x-t))$ in $\mathbb{A}^2$ to $\mathbb{A}^1$ given by $(x,t)\mapsto t$ is flat.
However, the morphism from $V((x,y)\cap(x-t,y-s))$ in $\mathbb{A}^4$ to $\mathbb{A}^2$ given by $(x,y,t,s)\mapsto (s,t)$ is not flat.
This is because the "degenerate doubled point" in the plane must keep track of the "direction" in which it was doubled.
The "real" flat family of "pairs of points" in the plane is parametrized by the blow-up of $\mathbb{A}^2$ at a point.
The insight that "flatness" is an essential condition for extending the notion of families to singular situations was a "game-changer" for algebraic geometry. Flatness is a definition that seems to require algebra and yet is important for geometry.


*Tangent bundle.
The tangent bundle of a smooth variety $X$ over $k$ is the scheme of $k[\epsilon]$ points of $X$. (This is an extension of the above example, in a way.)
This example clearly shows how infinitesimals have a meaning in algebraic geometry.


*Hirzebruch surfaces (learnt from Beauville's book on surfaces).
Given the rational normal curve $C_k$ in $\mathbb{P}^k$ and the rational normal curve $C_m$ in $\mathbb{P}^m$. Choose an isomorphism $g$ between $C_k$ and $C_m$, and choose disjoint linear embeddings of $\mathbb{P}^k$ and $\mathbb{P}^m$ in $\mathbb{P}^n$ (so $n\geq k+m+1$). Let $J$ be the union of the lines joining $g$-pairs of points in $C_k$ and $C_m$.
Then $J$ is the Hirzebruch surface $F_{|m-k|}$. Moreover, if $m<k$ then $C_m$ is the curve on $J$ with negative self-intersection.
Bonus points for understanding "elementary transformations" $F_{a}\to F_{a\pm 1}$ in terms of projection of this surface from a point on $C_k$ or $C_m$!


*Quartic curve.
Redo the analysis of a quartic equation from Chapter 12 (section 95+, page 351+) of Weber's book on "Algebra" in modern language. He demonstrates the existence of 28 bitangents. It is completely "high-school" algebra and geometry argument which does not involve and Abelian varieties and theta characteristics! Essentially he re-write the equation in the form $\sqrt{a_1a_2}+\sqrt{b_1b_2}+\sqrt{c_1c_2}$ where $a_i, b_i, c_i$ are linear forms.
In my humble opinion, this is more challenging and interesting than 27 lines on a cubic surface. In fact, the latter follows from the above analysis by doubling the plane along the quartic curve.
A: The image of an affine variety is not necessarily affine; even better: one can have a bundle with affine fibers over a projective variety such that the total space is affine:
$GL_2(\mathbb C) \to \mathbb P^1(\mathbb C)$
A: For the more arithmetically minded people, an illustration of the Weil conjectures in the simple cases of the projective space by direct checking and also proving the Hasse-Weil theorem for elliptic curves could be very instructive.
Again, for the more arithmetically minded people who are also open to some speculation, one could use counting of the number of points on the projective space over $\mathbb F_q$ and use the observation of Tits to introduce the Field with one element.
The Mordell-Weil theorem and Faltings theorem could be mentioned(without proof, of course) and compared to the case of genus 0, ie lines, to show that the geometry of a curve affects its arithmetical behavior significantly.
A: There is a nice geometric example by Zariski to show why going down theorem (https://en.wikipedia.org/wiki/Going_up_and_going_down) fails when the bottom ring is not normal.
Take a cylinder over a node and call its coordinate ring $A$. Let $B$ be the normalization of $A$. Let $P$ be a singular point of Spec$(A)$ and $Q_1,Q_2$ be points of Spec$(B)$ lying above $P$. Take an irreducible curve $C$ in Spec$(B)$ passing through $Q_1$ but avoiding $Q_2$. Then there no sequence in $A$ corresponding to the inclusion of prime ideals $I(C) \subset I(Q_1)$.
A: Tsen's theorem: the function field $K$ of a curve $C$ over an algebraically closed field $k$ is $C_1$ (hypersurfaces of degree $d$ in $\mathbb P^n$ have $K$-points when $d\le n$). Hartshorne uses this to show that ruled surfaces have sections, but his reference is to Tsen's paper of $1936$(?) which is written in terms of Galois cohomology and conceals the geometric significance (from me, anyway). It's proved, very concretely, in SGA $4\ 1/2$ (Deligne, Arcata), so not only would the class get a theorem, it would get contact with other bits of algebraic geometry. 
A: The symmetric square of a genus $2$ curve is a blow up of a 2-torus in one point (the canonical divisor in the Jacobian). Nice example for Hilbert schemes.
A: One of my favourite sets of examples, stolen from Miles Reid, is the determination of rings $R=\oplus_m H^0(X, mD)$ for ample divisors $D$ on projective varieties $X$. A nice sequence, where a lot of the general features of the theory already show up, is to take $X=E$ an elliptic curve, and $D=nP$ for $P$ a point on $E$. 
$n=1$: generators in degrees $1,2,3$, with a relation in degree 6 (by Riemann-Roch), leading to $E\subset P^2[1,2,3]$ (weighted projective space) a sextic hypersurface given by Weierstrass equation $z^2=y^3 + ax^3 y + bx^6$. 
$n=2$: get $E\subset P^2[1,1,2]$, a double cover of $P^1$; $P\in E$ is one of the ramification points.
$n=3$: get $E\subset P^2$, a general cubic; $P\in E$ is an inflection point on the image.
$n=4$: get $E\subset P^3$, a general complete intersection of bidegree $(2,2)$.
$n=5$: get $E\subset P^4$, a non-complete intersection variety, equations are the $4\times 4$ Pfaffians of a general $5\times 5$ skew-symmetric matrix of linear forms, equivalently a linear section of $Gr(2,5)$ in its Plucker embedding.
...
A: A great difference in the transition from varieties to schemes is the presence of non-reducedness.  Sometimes on a given scheme there are different natural scheme structures and with respect to one, the scheme is non-reduced, while with respect to the other one it is reduced.
An example is the scheme of nilpotent $n \times n$ matrices for $n \geq 2$.  One way to give a scheme structure to the set of nilpotent matrices is to observe that an $n \times n$ matrix $X$ is nilpotent if and only if $X^n$ is the zero matrix.  Thus all the entries of $X^n$ are polynomials (homogeneous of degree $n$) in the entries of $X$, whose vanishing set is the set of nilpotent matrices.  As has been stated in the question and noted in a comment by Victor, the trace of a nilpotent matrix is a function that is identically zero on the set of nilpotent matrices, but it is not contained in the ideal just described, since the ideal is generated by homogeneous polynomials of degree $n$.
There is though a different way of making the set of nilpotent matrices into a scheme, namely, by realizing that a matrix $X$ is nilpotent if and only if all the eigenvalues of $X$ vanish, and hence if and only if the characteristic polynomial of $X$ is the polynomial $\lambda ^n$.  The coefficients of the characteristic polynomial of the matrix $X$ (except the leading coefficient) are therefore polynomials in the entries of the matrix $X$ whose vanishing describes again the locus of nilpotent matrices.  This time, though, the polynomials generating the ideal are homogeneous of degrees $1,2,\ldots,n$.  It is not difficult to argue that in this case the ideal generated by these polynomials is indeed radical, so that the scheme thus defined is reduced.
A: Nonreduced schemes are a good source of bafflement and wonder.  For example:

The fiber product of reduced schemes may be nonreduced.

The kernel of the $p$'th power map on $\mathbb{G}_m$ in characteristic $p$ is a fast example.  This leads to what would seem to me to be an even stranger fact:

The quotient of a reduced scheme by the action of a nonreduced group scheme can be reduced.  Also, the quotient of that same scheme by the action of the reduced subscheme of that same group can be reduced again.

Surely they are not both reduced.
A: The Chevalley-Warning Theorem showing that finite fields are quasi algebraically closed is important and has a very elegant proof.
Andre Weil's elementary analysis of the number of points on Diagonal Equations over finite fields used as guidance and justification for his conjectures.
A: The gluing along closed subscheme examples are a nice exercise for playing with Spec.  That is, computing the spec of a pushout of affine schemes like
$$
(X \leftarrow Z \rightarrow Y)
$$ 
where one of the arrows is a closed immersion (or both are, for simplicity).  It's a decent exercise to show that the Spec of such a pushout is what you expect pointwise.
Some examples that are worth trying as exercises are: 
[1.]  take a copy of $\mathbb{A}^1$ for $X$, a pair of points for $Z$ and a single point for $Y$.  You get a nodal singularity.  Alternately, glue two copies of $\mathbb{A}^1$ together at the origin.
[2.]  $X = Spec k[x]$ as above, $Z = Spec k[x]/x^2$, $Y = k$, producing a cusp.
[3.]  If $X = \mathbb{A}^2$, $Z$ is an axis and the map $Z \to Y$ is the usual 2-to-1 cover, then you get a pinch point.  
[4.]  You can make the map $Z \to Y$ non-finite and produce non-noetherian affine schemes too.  For example, $X = \mathbb{A}^2$, $Z$ one of the axes (or any curve), and $Y$ a point.
You can later point out why you can't always do this for general (non-affine) schemes.  That is, $X = \mathbb{P}^2$, $Z$ an elliptic curve, and look at doing that sort of pinch point construction for various maps $Z \to \mathbb{P}^1$.  This can lead to things like algebraic spaces if you are so inclined.
Another direction you can go with this sort of stuff is normality (ie, what is the geometric meaning of normality, all the examples you just computed with gluing are non-normal).
A: Let me just write three among my favourite examples (over $\mathbb{C}$).
1) The point of type $E_8$ given by $x^2+y^3+z^5=0$ is the only isolated, $2$-dimensional,  $factorial$ singularity.
2) The Klein plane quartic $C: x^3y+y^3z+z^3x=0$ is the only genus $3$ curve having automorphism group of maximal order. In fact $\textrm{Aut}(C)=PSL_2(\mathbb{F}_7)$, whose order is $168$.
3) There exist exactly $one$ plane quartic curve with three ordinary cusps (up to projective transformations). It is obtained by taking the image of a conic $C$, which is inscribed in a triangle $T$, via the standard Cremona transformation centered at the vertices of $T$. 
Well, maybe they are standard after all, but I like them...
A: I know the following example from Kontsevich. Not sure it is suitable to your course, but I like it.
Consider a space of closed 6-edges polygonal lines in Euclidean ${\mathbb R}^3$ such that each edge has length $1$ and each angle between subsequent edges is the right angle. The problem is to count the virtual and real dimension of that space (modulo the action of Euclidean group). Surprisingly, the quotient space has isolated points and component of the dimension $1$.
A: One example which is (at least over an algebraically closed field) very classical, but contemporary geometers and number theorists do not seem to be as intimately familiar with is the geometry of curves of genus one embedded in $\mathbb{P}^3$ as the complete intersection of two quadrics:
$C: Q_1(x,y,z,w) = Q_2(x,y,z,w) = 0$.
Here are two nice facts (I work over a ground field of characteristic not $2$ or $3$ but otherwise arbitrary):
1) Such embeddings of $C_{/k}$ correspond to degree $4$ rational divisors on $C$.
2) $C$ admits a rational divisor class of degree $2$ iff it admits a $2:1$ map onto a conic curve $X$ (which need not be $\mathbb{P}^1$) iff the pencil determined by $Q_1$ and $Q_2$ admits a $k$-rational conical quadric, i.e., a quadric with a variable omitted.  (The class of the conic $X$ in the Brauer group of $k$ is the obstruction to the rational divisor class containing a $k$-rational divisor.)  If these conditions are satisfied, then the remaining $3$ conical quadrics in the pencil are isomorphic, as a set with Galois action, to the points of order $2$ on the Jacobian elliptic curve.
And a problem:
3) One quadric hypersurface over $k$ can of course be diagonalized.  Characterize the set of elliptic curves over $\overline{k}$ which may be given as the complete intersection of two diagonal quadrics in $\mathbb{P}^3$.  This can be solved both by pure thought and by calculation.   
A: 
I'd prefer examples that are unusual or nonstandard [...]

Ok then I finally have a chance to present some of my interests ;-).
Many people claim that schemes are only hausdorff in trivial cases. This is wrong. Namely, $Spec(A)$ is hausdorff if and only if $A$ is $0$-dimensional. More generally, a scheme $X$ is hausdorff if and only if it is $0$-dimensional and separated (in the scheme sense), and here you can replace $0$-dimensional by $T_1$ and separated by quasi-separated, if you wish. This shows that here the analogies of these notions in scheme theory and general topology become actually equivalences. Every compact hausdorff scheme is already affine (nice exercise, using just general topology and $Spec(R \times S) = Spec(R) \coprod Spec(S)$). Every locally compact totally disconnected hausdorff space can be made into a scheme; take the constant sheaf $\underline{\mathbb{Z}/2}$. Hausdorff schemes or more general sheaves on Stone spaces also play a role in the classification of certain algebraic rings. For example, every countable ring in which the elements satisfy $a^4=a$ is isomorpic to $\{f \in C(X,\mathbb{F}_4) : f(E) \subseteq \mathbb{F}_2\}$ for some closed subset $E$ of a Stone space $X$.
Now here is another example: In topology, the linearity of vector bundle maps is declared fiberwise (instead of working with vector space objects and declaring linearity in a functorial way). This is wrong in algebraic geometry: A $S$-endomorphism of the affine $n$-space $\mathbb{A}^n_S$, which is linear on every fiber $\mathbb{A}^n_{\kappa(s)}$, does not have to be linear.
It surprised me when I heard that infinite product is not an exact functor on the category of sheaves: If $A_i \to B_i$ are surjective, then $\prod_i A_i \to \prod_i B_i$ does not have to be surjective. The reason should be that the canonical map $(\prod_i A_i)_x \to \prod_i ({A_i}_x)$ is not an isomorphism. But I don't know of any explicit example for the $A_i \to B_i$. Hints?
A: Edit: The correct statement for the upper semicontinuity of dimension of fibers, also referred to in Roy Smith's answer, is as follows (see e.g. Corollary 3, Section I.8 of Mumford's Red Book): "let $\phi: X \to Y$ be a morphism of varieties. For all $x \in X$ define $e(x)$ to be the maximum of dimensions of irreducible components of $\phi^{-1}(\phi(x))$ containing $x$. Then $e$ is upper semicontinuous, i.e. for each $n$, $\{x: e(x) \geq n\}$ is closed in $X$."
The following example shows that semicontinuity might be lost if we remove the "locality condition" (i.e. the phrase "containing $x$") from the definition of $e$. In other words, the map $x \mapsto \dim(\phi^{-1}(\phi(x)))$ might not be semicontinuous. As noted in Roy's comment below, his example also demonstrates this violation of semicontinuity of "global dimension" of fibers.
I think I just found a counterexample to the upper semicontinuity of dimension of fibers with respect to the source, as stated in Mumford's Red Book or Algebraic Geometry I. In another answer to this question Roy Smith gave a counterexample to semicontinuity with respect to the target. This shows that in absence of an additional condition, e.g. properness of the morphism, the upper semicontinuity of dimension of fibers may not hold with respect to either the source or the target.
Now the example: it is the map $\phi:\mathbb{k}^4 \to \mathbb{k}^3$ given by $(x,y,z,w) \mapsto (x, (xy-1)z, (xy-1)(z + w))$. Unless I am mistaken,

*

*$\dim(\phi^{-1}(\phi(P)) \geq 1$ for all $P \in \mathbb{k}^4$, and

*$\dim(\phi^{-1}(\phi(P)) > 1$ if and only if $P \in Y := V(xy -1) \cup (V(z, w) \setminus V(x))$.

The upper semicontinuity of dimension with respect to the source is violated since $Y$ is not closed in $\mathbb{k}^4$.
