# How to think of $R[x,y]$-modules?

There is a very concrete description for $R[x]$-modules: they correspond "nicely" with $R$-modules equipped with an endomorphism, by the following:

On the one hand, an $R[x]$-module $M$ is in particular an $R$-module, and we can define an endomorphism $T$ on $M$ by $T(m)=x \cdot m$, using the $R[x]$-module structure on $M$. On the other hand, given $M \in R\text{-} Mod$ and $T \in End(M)$, we can make M into an $R[x]$-module by $P(x) \cdot m = (P(T))(m)$.

Is there a similar way of looking at modules over $R[x,y]$?

Surely, these correspond to $R[x]$-modules together with an $R[x]$-endomorphism $T_y$. I want to translate this to a characterization without mentioning $R[x]$, which as we've seen can be understood in terms of the original $R$-module. So I try to come up with an explanation of the form:

An $R[x,y]$-module is an $R$-module M together with two endomorphisms $T_x,T_y$ on $M$, such that $T_y$ satisfies a criterion corresponding to being an $R[x]$-module, namely $$T_y(p(T_x)(m))=p(T_x)(T_y(m))$$

My questions: Is it true? Is there a more illuminating approach? and how do we generalize to $R[x_1,...,x_n]$?

(I'm implicitly assuming that $R$ is a commutative ring.)
An $R[x_1,\ldots,x_n]$-module is the same thing as an $R$-module equipped with $n$ mutually commuting endomorphisms.
One way of putting it is that a left $S$-module $M$, where $S$ is a (not necessarily commutative) $R$-algebra, is the same thing as an $R$-module $M$ together with an $R$-algebra map from $S$ to the endomorphisms of $M$ (acting on the left on $M$). Now $R$-algebra maps $R[x_1,\ldots,x_n] \to T$ (where $T$ is a not necessarily commutative $R$-algebra) are exactly the same thing as $n$-tuples of pairwise commuting elements of $T$: in fancy speak, this says that $R[x_1,\ldots,x_n]$ represents the functor taking a $R$-algebra $T$ to the set of its $n$-tuples of pairwise commuting elements (when $T$ is commutative, of course, we can forget the "pairwise commuting" constraint).
To put it differently: once you know that an $R[x]$-module is an $R$-module with an endomorphism $\hat x$, you should remember that an endomorphism of $R[x]$-modules $\varphi\colon M\to M'$ is an endomorphism of $R$-modules commuting with the $R[x]$-structure, i.e., such that $\hat x'\circ \varphi = \varphi\circ \hat x$. Then an $R[x,y]$-module is, as you say, an $R[x]$-module with an endomorphism $\hat y$, but by what has just been said, $\hat x$ and $\hat y$ must commute and that is the only condition. This carries over to $n$ variables.