# Some examples of depth

This is related to the question I asked last time. This sounds a bit too specific, I hope this question is still acceptable on MO.

I am still not quite comfortable with the concept of depth, and there is this exercise in Matsumura's book that goes as follows:

Find an example of a noetherian local ring $$A$$ and a finite $$A$$-module $$M$$ such that $$\operatorname{depth}M > \operatorname{depth}A$$. Also find $$A$$, $$M$$ and $$P \in \operatorname{Spec}A$$ such that $$\operatorname{depth}M_P > \operatorname{depth}_P(M)$$.

I hope I have found correct examples, but I am still quite lost about why one can find such examples, and what the generic ones are. So if someone can just give me some representative examples I would be grateful.

The examples I found myself:

For the first one, it is clear that $$A$$ must not be Cohen-Macaulay. Then I set $$A = \frac {k[x,y,z]}{(xz,yz)}_{(x,y,z)}$$, which is of depth 1, and I consider its quotient by $$(z)$$, which is $$k[x,y]_{(x,y)}$$ and should be of depth 2 (at least $$x,y$$ is a regular sequence I think).

For the second one, I try to fix $$\operatorname{depth}_P(M) = 0$$, which means $$P$$ should lie in some associated primes of $$M$$, so I consider $$M = \frac {k[x,y,z]}{(x^2,xy,xz)}_{(x,y)}$$, such that $$(x,y)$$ is not associated prime when localized.

1) Start with a regular local ring $R$. Take 2 ideals $I,J$ such that $I$ does not contain $J$, $R/I$ is CM and $\dim R/J <\dim R/I$. Then $A=R/(I\cap J)$ and $M=R/I$ work. In your example, $I=(x)$ and $J=(y,z)$. The reason is that CM means unmixed, so by having components of different dimensions one makes sure A is not CM.
2) Take $(A,m,k)$ to be any CM rings of dimension at least 2. Let $M=A\oplus k$. Then for any non-minimal $P\in Spec(A)-{m}$, $depth M_P =depth A_P$, but $depth M=0$.