# Hilbert function on finite set of projective space

Let $X$ be the set consisting of four point in $\mathbb P^2$ and $h_X$ be the Hilbert function.

If the four points are not collinear, \begin{equation*} h_X(m) = \left\{ \begin{array}{ll} 3, & if~ m=1;\\ 4, & if ~m \geq 2. \end{array} \right. \end{equation*}

I can prove that case $m=1$ and case $m \geq 3$. but I don't understand case $m=2$.

-

Let $k$ be the base field.
The space $k[X_0,X_1,X_2]_2$ of quadratic homogeneous polynomials in three variables has dimension $6$.
Now, given three of the four points $[p_1],[p_2],[p_3], [p_4]$ in $X$, say $[p_1],[p_2],[p_3]$, there is a quadratic form $q(X_0,X_1,X_2)$ vanishing on $[p_1],[p_2],[p_3]$ but not on $[p_4]$: just take $q=l\cdot m$ where $l,m$ are linear forms such that $(l\cdot m )(p_4)\neq 0$ but $(l\cdot m )(p_i)=0$ for $i=1,2,3.$
This requires that the $p_i$'s not be colinear: geometrically you are just drawing two lines which together contain $[p_1],[p_2],[p_3]$ but not $[p_4]$
Hence there exists $q$ with $q(p_1)=q(p_2)=q(p_3)=0$ and $q(p_4)=1$.
This implies that the evaluation linear map $$ev:k[X_0,X_1,X_2]_2\to k^4: q\mapsto (q(p_1),q(p_2),q(p_3),q(p_4) )$$ is surjective, because its image contains the canonical basis of $k^4$.
Its kernel is $\text {ker(ev)}=I(X)_2$ ( a crucial equality!) and has thus dimension $2$ so that we conclude for the Hilbert function: $$h_X(2)=dim (k[X_0,X_1,X_2]_2/I(X)_2)=6-2=4$$ as required.