TITLE: Intersection number - difficulties with an example calculation
QUESTION [7 upvotes]: I recently learned about intersection multiplicity and tried to calculate a simple example. Unfortunately, I am having difficulty. 
Consider the two curves in $\mathbb{C}^2$ given by $y=0$ and $y-x^n=0$. If there is any justice in the world, the intersection multiplicity at $(0,0)$ should be $n$. 
By definition, the intersection number is the dimension as a $k$-module of 
$$\left( \frac{k[x,y]}{(y,y-x^n)} \right)_{(x,y)}.$$
This is clearly equivalent to 
$$\left( \frac{k[x,y]}{(y,x^n)} \right)_{(x,y)}.$$
Before localization, the quotient ring is all elements of the form 
$$a_0x^{n-1}+\cdots+a_n$$
(polynomials in $x$ of degree less than $n$). This already has dimension $n$. Wouldn't taking the localization make the ring much bigger, with all sorts of nasty fractions, and make the dimension larger as well?
My question: Why is the dimension of the localized ring $n$?

REPLY [6 votes]: The ring $A=\frac{k[x,y]}{(y,x^n)}=\frac{k[x]}{(x^n)} =k[\xi] $ is already a local ring with maximal ideal $\mathfrak m=(\bar x, \bar y)=(\bar x)=(\xi)$.
Localizing a local ring at its maximal ideal does not change it (a  result worth  remembering !).
So here localizing the local ring $A$  at $\mathfrak m$ does nothing to it: $A_\mathfrak m=A$.
 That solves your problem and  indeed $A=A_\mathfrak m$  has  dimension $n$ over $k$.