# How to compute intersection multiplicity?

My book is Hulek's Elementary algebraic geometry. He defines the intersection multiplicity of $C,C'$ (given by $f,g$ respectively) at $P \in \mathbb{P}_k^2$ by $I_P(C,C')=\dim_k \mathcal{O}_{\mathbb{P}_k^2,P}/(f,g)$

He gives an example: $C$ is given in projective coordinates $X^2Z-Y^3=0$ and $L$ is $X=0$. Let $P=(0:0:1)$, then in local coordinates $x^2-y^3=0$ and, $x=0$.

Then $I_P(C,L)=\dim_k \mathcal{O}_{\mathbb{P}_k^2,P}/(X^2Z-Y^3,X)=\dim_k \mathcal{O}_{\mathbb{A}_k^2,O}/(x^2-y^3,x)=\dim_k \mathcal{O}_{\mathbb{A}_k^2,O}/(x,y^3)=3$

My question:

1. Is the second equality ok? just changing to affine coordinates does not change the dimension? (If it is too complicated, don't need to explain in detail.)
2. Why the last eq is true? I understand it roughly, maybe it related to the dimension of vector space spanned by $1, x, x^2$. But I want to know some precise details.
-

Your second equality is okay, because you even have $\mathcal{O}_{\mathbb{P}^2_{k},P}/(X^2Z-Y^3,X) \cong \mathcal{O}_{\mathbb{A}^2_{k},(0,0)}/(x^2-y^3,x)$. The moral is that the local ring at a point $P$ is essentially a "local" object, i.e. you only have to look at an affine neighborhood (or "local coordinate" as Hulek puts it) of $P$ to know it (in the above situation, we are passing to the affine neighborhood $\{[a:b:c] \in \mathbb{P}^2_k, c \neq 0\} \cong \mathbb{A}^{2}$ of $P=[0:0:1]$).
Your last equality can be deduced from the following: since $x^2-y^3$ and $x$ intersect only at the origin $(0,0)$ you have
$$\mathcal{O}_{\mathbb{A}^2_k,(0,0)}/(x^2-y^3,x) \cong k[x,y]/(x^2-y^3,x)$$
Now, as you already noted, $k[x,y]/(x^2-y^3,x)=k[x,y]/(x,y^3) \cong k[y]/(y^3)$ and the latter has $1,y,y^2$ as a basis over $k$.