How do we find a primary decomposition of an ideal? Currently I'm reading about primary decomposition of ideals from Atiyah and Macdonald's Introduction to Commutative Algebra book. I've read all the theorems related to primary decomposition given in the same book even I don't have any idea of finding a primary decomposition of an ideal. How do we find decomposition of an ideal in general ? For example, here is a problem:  

Let $I=(xy,yz,xw,zw) \subset k[x,y,z,w]$  be an ideal. Find a primary decomposition of $I$.

I'm sorry that I don't have any idea to solve this. Please help!
 A: In general, finding a primary decomposition of an ideal $I$ is a hard problem and is solved by using Gröbner bases. That is, there is an algorithm for doing this, but you don't want to do it by hand unless you have lots of time.
For monomial ideals, however, the story is different. Here one can often just see the decomposition.
Here is a claim: draw a graph with vertices $\{x,y,z,w\}$ and draw an edge between the variables if their product does not appear in the ideal. Then the components of this graph correspond to the components of your ideal. In this case we get two components.
-
Here is another way to see this. Think of the variety $V(I) \subset k^4$ defined by your ideal. This consists of all points such that the elements of your ideal evaluates to zero on these. For example, you must have $xy=0$. But then either $x=0$ or $y=0$. In the first case, the ideal reduces to $(yz,zw)$ (suppose $y \neq 0)$, which implies that $z=0$ zero as well. Thus one component of the ideal is $(x,z)$. Similarly, the other component is $(y,w)$.
We conlude that $I= (y,w) \cap (x,z)$.
