I want to find the basis and dimension of the following set, $$\left\{p\in \mathbb{C}[x,y]\ \middle|\ x\frac{\partial p}{\partial x} + y\frac{\partial p}{\partial y} = 2p\right\}$$
I saw that it looked kind of like the product rule so I tried polynomials like $p=xy$ which seemed to be apart of the set and more examples showed that any scalar multiple of this polynomial was apart of the set.
it makes sense why this is happening and i figure the set could be writen as $$\left\{p\in \mathbb{C}[x,y]\ \middle|\ x\frac{\partial p}{\partial x} = y\frac{\partial p}{\partial y} = p\right\}$$
I saw that this was only ever true when $p$ was some multiple of $xy$, so this is equivalent to $$\{p\in \mathbb{C}[x,y], \lambda \in \mathbb{C} \mid p=\lambda xy \}$$
so a spanning set is just the set $\{xy\}$ which is linearly independent and so the dimension of the set is 1.
Is this a sensible argument? I feel like I somehow missed something when reducing the set down cause I wasn't sure when i would use the fact it was the set of complex polynomials to be the set of complex polynomials.
Since everything in sight is linear, it's a subspace, so indeed, any scalar multiple of any element is contained in it. Now, you just need to show that there's nothing other than scalar multiples of $xy$ in there.
So, if $p(x,y) = \sum\limits_{i=0}^n\sum\limits_{j=0}^ma_{ij}x^iy^j$, then $\frac{\partial p}{\partial x}(x,y) = \sum\limits_{i=1}^n\sum\limits_{j=0}^m ia_{ij}x^{i-1}y^{j}$ and $\frac{\partial p}{\partial y}(x,y) = \sum\limits_{i=0}^n\sum\limits_{j=1}^m ja_{ij}x^{i}y^{j-1}$, so $x\frac{\partial p}{\partial x}(x,y) + y\frac{\partial p}{\partial y} = \sum\limits_{i=1}^n\sum\limits_{j=1}^m (i+j)a_{ij}x^iy^j + a_{1,0}x + a_{0,1}y$.
So, if that's equal to $2p(x,y)$, then we have $a_{1,0} = 2a_{1,0}$ and $a_{0,1} = 2a_{0,1}$, so $a_{1,0} = a_{0,1} = 0$, and $a_{0,0} = 0$. Finally, for $i, j \geq 1$, we have $(i + j)a_{ij} = 2a_{ij}$, so $a_{ij} = 0$ whenever $i + j \neq 2$, so indeed, the only non-zero $a_{ij}$ is $a_{1,1}$, so indeed, $p$ lies in the linear span of $xy$.