I've just learnt the idea of codimension, then I try to find some exercises to calculate the codimension of some maximal ideal $J$ in the ring $R=k[x,y,z]/I$, I find it somewhat tricky. For example,
If $R=k[x,y,z]/(x^2y^2z^2,xy^3z^2)$ and $J=(x,y,z)$.
Then I just need to find the prime ideals $P_i$ in $k[x,y,z]$ so that $(x^2y^2z^2,xy^3z^2)\subsetneq P_0\subsetneq P_1 \subsetneq ... \subsetneq P_n=(x,y,z)$ is a chain of primes of maximal length. After some trial and error, I find $P_0=(x)\subsetneq (x,y)=P_1$ can be put in the chain. Since Krull dimension of $k[x,y,z]$ is 3, I'm sure this is the longest I can find.
Sometimes life is not so beautiful, for example,
If $R=k[x,y,z]/(x)(y,z)$ and $J=(x+1,y,z)$.
This time I only find $P_0=(y,z)$ can be put in the chain. But I can't prove it's the maximal chain.
Sometimes I'm even stuck from the start, for example,
If $R=k[x,y,z]/(x^5-y^2,x^3-z^2,z^5-y^3)$ and $J=(x,y,z)$.
This time I don't even know if $(x^5-y^2,x^3-z^2,z^5-y^3)$ is prime or not.
Anybody can show me some more general methods of finding primes that can be put into the chain that both end are known, and prove the maximality? You can use your own examples.
Well, maybe some dimension formulas are welcome. The best for you is the following:
Of course, $\dim R=n$, and $\operatorname{ht}(I)$ is by definition the minimum of $\operatorname{ht}(P)$ with $P\supseteq I$.
$I=(x^2y^2z^2,xy^3z^2)$. This ideal has exactly three minimal primes, all of height $1$, so $\dim R/I=3-1=2$.
$I=(x)(y,z)$. This ideal has two minimal primes, one of height one and one height two, so its height is $1$.
$I=(x^5-y^2,x^3-z^2,z^5-y^3)$. Well, this can be done by noticing that $I$ is not contained in a prime of height one (which must be principal, and thus generated by an irreducible polynomial). This shows that $\operatorname{ht}(I)\ge 2$. Now let's define a homomorphism $\varphi:k[x,y,z]\to k[t]$ by sending $x\mapsto t^2$, $y\mapsto t^5$, and $z\mapsto t^3$. Then $I\subseteq \ker\varphi$ and $k[x,y,z]/\ker\varphi\simeq k[t]$, so $\ker\varphi $ is a prime ideal of height $2$. In conclusion, $\operatorname{ht}(I)=2$. (If $I$ would be prime, then $I=\ker\varphi$, but this is not true since $xz-y\in\ker\varphi$ and $xz-y\notin I$.)