TITLE: Equivalence of definitions of intersection number
QUESTION [6 upvotes]: Consider two varieties over an algebraically closed field $k$ given by $f=0$ and $g=0$ that intersect at some point (without loss of generality $(0,0)$) with no common components, and $f$ and $g$ have no irreducible common factor. 
The standard definition of intersection multiplicity is then the dimension (as a $k$-module) of
$$\left( \frac{k[x,y]}{(f,g)} \right)_{(x,y)},$$
where the subscript denotes localization at the ideal $(x,y)$.
Another definition, which I have been assured is equivalent, is as follows. The ring 
$$A= \frac{k[x,y]}{(f,g)} $$
has a maximal ideal $m=(x,y)$. It's a theorem that powers of $m$ eventually stabilize: there exists $N$ such that $m^{n}=m^{n+1}$ for all $n\ge N$. The intersection multiplicity is then defined as the dimension of $A/m^N$. 
My question: Why are these two definitions equivalent? My commutative algebra is weak, so a detailed answer would be very much appreciated. Thanks.

REPLY [5 votes]: First note that the algebra $A=\frac {k[x,y]}{(f,g)}$ is finite-dimensional : Fulton, Algebraic Curves,  Prop.2 page 9 and  Cor.4 page 11.
Hence A is Artinian and so is its localization $A_\mathfrak m$.
But then the maximal ideal $\mathfrak mA_\mathfrak m$ of $A_\mathfrak m$ is nilpotent (Atiyah-Macdonald, Prop. 8.6 page 90), so that $(\mathfrak mA_\mathfrak m)^r=(0)$ for some $r$. 
Finally we can write : $$   A_\mathfrak m=A_\mathfrak m/(0) =A_\mathfrak m/ (\mathfrak mA_\mathfrak m)^r =(A/\mathfrak m^r)_ {\mathfrak m/\mathfrak m^r}= A/\mathfrak m^r                 $$  which proves what you want.
[The third  equality is valid because localizing and taking quotients commute with each other.
The last equality follows from the fact that the ring $A/\mathfrak m^r$ is already local with maximal ideal $\frak m/\frak m^r$ and localizing it at that ideal does not change the ring].