# How to write an arbitrary polynomial in $n$ variables

Be $$k$$ a field. I'm trying to define a function on $$k[x_1, ..., x_n]$$. However, I know of no way to write an arbitrary element of this ring efficiently. I read somewhere about using the $$S_n$$-orbit, but that seemed cumbersome too. Maybe I'll just have to accept it is cumbersome, but any ideas are appreciated.

• If $I : \{1, \ldots, n\} \to \Bbb{N}$ is a sequence of $n$ natural numbers $\langle i_1, \ldots, i_n\rangle$, write $x^I$ for $x_1^{i_1} \cdots x_n^{i_n}$. The $x^I$ are a basis for $k[x_1, \ldots, x_n]$ as a vector space over $k$ and any element of $k[x_1, \ldots, x_n]$ can be written uniquely as a sum $\sum_I a_I x^I$ where only finitely many of the coefficients $a_I \in k$ are non-zero. Does that help? Jun 13 '19 at 20:25
• Hmm I see, but for my purposes not really... Given $n$ $k$-linear maps $f_1, \ldots f_n : V \rightarrow V$, I want to define a homomorphism $\rho : k[x_1, \ldots, x_n] \rightarrow \text{Aut}_k(V)$ by setting $\rho(x_i)v := f_i(v)$. I think I have found a way now, which I'll post in a minute. Jun 13 '19 at 20:39
• $\sum_{i_1, \ldots, i_k} \lambda_{i_1i_2\ldots i_k}x_1^{i_1}x_2^{i_2}\ldots x_k^{i_k}$, for $0 \leq i_j \leq n_j$ and $1 \leq j \leq k$. (Here $n_j$ is the degree of the $j-$th variable.) Jun 13 '19 at 20:42
• @JosvanNieuwman Be careful, such a function $\rho$ will only be defined if the $f_i$ all commute with each other. Otherwise you'll want the ring $k\langle x_1,\ldots,x_n\rangle$, the free noncommutative algebra.
– jgon
Jun 14 '19 at 2:28
• You're absolutely right. In my situation pairwise commutativity of the $f_i$ is given. Jun 14 '19 at 2:55

What $$k[x_1,\dots,x_n]$$ actually means is the free commutative $$k$$-algebra generated from the set $$\{x_1,\dots,x_n\}$$. We can generalize this to $$k[I]$$ for any set $$I$$. Of course, just writing $$k[I]$$ without comment will definitely lead to confusion. If I were writing a sizable article that leverages this notation a bit, I may well define the notation for an arbitrary set, and then state that $$k[x_1,\dots,x_n]$$ is shorthand for $$k[\{x_1,\dots,x_n\}]$$ (assuming all $$x_i$$ are distinct).1
For your purposes, a more practical compromise would be to write $$k[\{x_i\}_{i\in I}]$$ where you also have $$\{f_i\}_{i\in I}$$ and $$\rho$$ becomes simply $$\rho(x_i)(v)=f_i(v)$$. Often $$[n]$$ (or just $$n$$ itself) is used for notation for the $$n$$-element set $$\{0,\dots,n-1\}$$ (or $$\{1,\dots,n\}$$ if you're uncouth), so you could say $$k[\{x_i\}_{i\in[n]}]$$ and $$\{f_i\}_{i\in[n]}$$.
Notation like $$\{a_i\}_{i\in I}$$ is commonly used to represent the $$I$$-indexed family of objects $$a_i$$. If all the $$a_i$$ are drawn from some encompassing set, $$A$$, this can be identified with a function $$I\to A$$. In set theory, such a function is a set of pairs, so if you wanted to be really precise, you should have something like $$\rho((i,x_i))(v)=f_i(v)$$.