I am trying to show that an ideal I of R=$\mathbb{C}[x_1,x_2]$ generated by $x_1, x_2$ is free R-module. I am trying to show that I has a basis of the two generators given above. But I am not able to show the linear independence part.
Also, does this result generalize for arbitrary number of variables?
There are ideals that cannot be generated by two elements! For example, let $I_n$ be the ideal of all linear combinations of monomials of total degree $n$ or more. e.g. $I_2 = \langle x_1^2, x_1 x_2, x_2^2 \rangle$
It's easy to see that $I_2 / I_3$ is a three-dimensional vector space over $\mathbf{C}$; its elements are in one-to-one correspondence with the polynomials that have monomials of only total degree 2. Furthermore, if you have a set of generators for $I_2/I_3$ (as an ideal over $\mathbf{C}[x_1,x_2]/I_3$), the elements of of $I_2/I_3$ are simply the $\mathbf{C}$-linear combinations of the generators. Thus, any generating set for $I_2 / I_3$ requires a minimum of three elements.
And thus, the same goes for $I_2$.
Prime ideals can be generated by two elements, though.