# Why the ring of regular functions on a variety at a point is a local ring

In the Hartshorne's book on Algebraic Geometry one reads the following, '' Let Y be a variety. Denote by $$O(Y)$$ the ring of all regular functions on $$Y.$$ For $$p\in Y,$$ we define the local ring of $$P$$ on $$Y, O_P,$$ to be the ring of germs of regular functions on $$Y$$ near $$P$$''. He then gives an argument, why $$O_P$$ is a local ring: '' its maximal ideal $$m$$ is the set of germs of regular functions which vanish at $$P.$$ For if $$f(P) \neq 0,$$ then $$1/f$$ is regular in some neighborhood of $$P$$ ''. I unfortunately don't understand the argument, why $$O_P$$ contains a maximal ideal. Can somebody give some more explanations on that? Many thanks for your comment.

• The point is that $m$ is an ideal and every other element not in $m$ is invertible. So $m$ is maximal. Cheers. Mar 13, 2019 at 9:08

The ideal $$\mathfrak{M}_P = \{f \in \mathcal{O}_X(U): f(p) = 0\}$$ is maximal as it is the kernel of the evaluation map at $$P$$, which gives an isomorphism of $$\mathcal{O}_{X, P}/\mathfrak{M}_P \cong k$$.
Following the comment, every element not in the maximal ideal is a unit. All functions where $$f(P) \neq 0$$ is invertible and therefore a unit. So that gives us that all functions $$f(P) = 0$$ must be in some maximal ideal, implying that $$\mathfrak{m}_P$$ is maximal. Further, it is the unique maximal ring in $$\mathcal{O}_{P.Y}$$ meaning that $$\mathcal{O}_{P.Y}$$ is local.