# Hilbert scheme of points on a surface

Let $X$ be a complex surface and $X^{[n]}$ be the Hilbert scheme of finite analytic subspaces $Z$ for which $dimH^0(Z,\mathcal{O}_Z)=n$. I have trouble understanding $X^{[n]}$. That's what i've worked out:

If we take $n$ distinct points $p_1,p_2,\cdots,p_n$ there is nothing to see ($I_Z=\{f\in\mathcal{O}_X|f(p_1)=\cdots f(p_n)=0\}$)

If two points coincide ($p_1=p_2$) then i think the subspace $Z$ will have a defining ideal of the form $I_Z=\{f\in \mathcal{O}_Z|f(p_1)=0,df_{p_1}v=0,f(p_3)=0,\cdots,f(p_n)=0\}$ for a certain $v\in T_{p_1}X$. Then if $X^{(n)}$ is the symmetric n-product of $X$ and $h:X^{[n]}\rightarrow X^{(n)}$ is the Hilbert-Chow morphism it is that $h^{-1}((p_1,p_1,p_3,\cdots,p_n))\simeq \mathbb{P}^1$ i.e. varying the direction of $v\in T_{p_1}(X)$ we obtain different points in $h^{-1}((p_1,p_1,p_3,\cdots,p_n))$.

But now if the three points coincide how is $I_Z$ defined (i can not understand it)? what is the fiber of $h$ above $(p_1,p_1,p_1,p_4,\cdots,p_n)$? I suppose it's "bigger" than $\mathbb{P}^1$.. How is the case of $i$ coinciding points ($3<i\le n$)?

Thank you very much, i hope this is not a too trivial question, i'm just approaching the study of the Hilbert scheme of points, so i will be open to suggestions for references.

Let $H_{\vec n}$ be the subfamily where the $n$ points cluster in groups of size $n_1,\ldots,n_k$ (adding up to $n$). Then it's obvious that $\dim H_{\vec n} = \sum_i \dim H_{n_i}$, so we can study just the case that all $n$ lie in the same spot, and add $2$ for moving the spot. The dimension of that "punctual" Hilbert scheme is $n-1$.
In my opinion, the best way to think of this is the following. Assume further that $X$ has a holomorphic symplectic structure and that $L$ is an irreducible Lagrangian curve in $X$. Then the Hilbert scheme (of dimension $2n$) also gets a symplectic structure, and the subfamily where all $n$ points are at the same spot, anywhere in $L$, is irreducible and Lagrangian (hence of dimension $n$) in that Hilbert scheme. (Now subtract $\dim L$ to get the previous statement.)
For $n=3$ as in your question, the punctual Hilbert scheme is a toric surface, the cone on the 3rd Veronese of $\mathbb P^1$. You might expect it to be toric because once we go to the punctual case, we can replace the surface by the formal neighborhood of the point, and that then carries a $T^2$-action. The three $T^2$-fixed points correspond to $\langle x^3,y \rangle, \langle x^2, xy, y^2 \rangle, \langle x,y^3 \rangle$ in the formal coordinates.