Equivalence of definitions of intersection number 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.
 A: 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].   
A: The fact that powers of $m$ stabilize says that the local ring $A_m$ is artinian. Clearly, it is also noetherian.
By the Jordan-Hoelder theorem, $A_m$ has a finite composition series. The length $l$ of this series is the length of a maximal sequence of ideals $A_m=I_0\supsetneq I_1\supsetneq I_2\supsetneq\cdots\supsetneq I_l=0,$ where $I_i/I_{i+1}$ is a simple $A_m$-module. This last condition implies that $I_i/I_{i+1}\cong A/m =k$ for each $i,$ so we are really computing the $k$-linear dimension of $A_m,$ as in your first definition.
By assumption, we know that $m^{i+1}\subsetneq m^i$ for $i<N,$ which implies that $m^N\subsetneq m^{N-1}\subsetneq\cdots\subsetneq m\subsetneq A_m$ is a chain of submodules that can be extended to a composition series for $A_m.$ Suppose this is how we obtained the above.
Consider $A/m^N$. Let $\overline p=p/m^N\subseteq A/m^N$ be a prime ideal, where $p\subseteq A$ is prime. Then $p$ contains $m^N,$ and so $p$ contains $m.$ Thus, $p=m,$ and since any prime ideal of $A/m^N$ can be written this way, $A/m^N$ contains a unique prime ideal, $m/m^N.$ This proves that $A/m^N$ is artinian local, since its only prime ideal is maximal.
So $A/m^N$ also has a composition series, which computes its length, i.e. its linear dimension. Of course, since $A/m^N$ is local, we know that $A/m^N=(A/m^N)_m=A_m/m^N.$ Consider the chain $0\subseteq I_{l-1}/m^N\subseteq\cdots\subseteq A_m/m^N.$ Suppose that $I_i\subsetneq m^N,$ and $i$ is minimal with this property. By construction, $m^N=I_{i-1}$ and $m^N/I_i=k=A_m/m.$ However, $m$ annihilates $k,$ so $0=m\cdot(m^N/I_i)=m^{N+1}/I_i=m^N/I_i=k,$ which is absurd. Hence, we must have had all along that $m^N=I_l=0.$
Further, for all other $i$ we have $(I_i/m^N)/(I_{i+1}/m^N)\cong I_i/I_{i+1}=k,$ by the third isomorphism theorem.
This shows that $0\subsetneq I_{l-1}/m^N\subsetneq\cdots\subsetneq A_m/m^N=I_0/m^N$ is a composition series for $A_m/m^N\cong A/m^N,$ and so the length as a $k$-module must be equal to that of $A_m.$
