For which polynomials $f$ is the subset {$f(x):x∈ℤ$} of $ℤ$ closed under multiplication?

You surely know about the Brahmagupta–Fibonacci identity,

$$(a_1^2 + b_1^2)(a_2^2 + b_2^2) = (a_1a_2 \pm b_1b_2)^2 + (a_1b_2 \mp a_2b_1)^2$$

which tells us that the product of two numbers, each of which is the sum of two squares, is itself a sum of two squares. That is to say, the set of all sums of two squares is closed under multiplication. If $a_k$, $b_k \in ℝ$, this is equivalent to the multiplication property for absolute values of complex numbers.

Analogous identities, are, for example, Euler's four-square identity and Degen's eight-square identity, which give the same result for the set of all sums of four and eight squares. Those can be related to quaternions and octonions, respectively (not really sure if this is relevant to the question, but I'm citing it just in case it can be useful).

I was wondering, do similar identities exist for polynomials of degree $n>2$? That is, can we find polynomials of degree $n>2$ closed under multiplication?* (In case there are none, why?) I'm not at all knowledgeable in this subject and asking this just out of curiosity, so I'd appreciate any recommendation on where to look for more information.

*(I was specially curious about integer polynomials)

• I am not sure your question title matches your actual question. – arctic tern Apr 18 '16 at 20:04
• @artictern What makes you think so? – David Herrero Martí Apr 18 '16 at 20:14
• You're asking about for which polynomials $f$ the subset $\{f(x):x\in\Bbb Z\}$ of $\Bbb Z$ is closed under multiplication right? I don't see you talking about multiplying vectors from $\Bbb Z^n$ anywhere in your question. – arctic tern Apr 18 '16 at 20:16
• I guess you're right, I was confused by the notation (I was referring by $ℤ^n$ to the set of polynomials of degree n). I'm modifying it, thank you. – David Herrero Martí Apr 18 '16 at 20:19

$$f(a,b,c) = a^3+2 b^3-6 a b c+4 c^3 = \left|\begin{bmatrix} a & 2c & 2b\\b & a & 2c\\ c & b & a\end{bmatrix}\right|,$$

The point of the construction is that we have a square matrix with integer entries, call it $M.$ For the case above we have $$M = \left( \begin{array}{rrr} 0 & 0 & 2 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{array} \right)$$

Next we define a polynomial by $$f(a,b,c) = \det \left(aI + bM + c M^2 \right)$$

There is a multiplication closure thing here, which comes from the Cayley-Hamilton theorem. The matrix $M$ satisfies some polynomial relation, here I think $M^3 = 2 I.$ That means that $M^4 = 2M$ and $M^5 = 2M^2.$ As a result, with all integers, $$(aI + bM + c M^2)(uI + vM + w M^2) = (au+2cv+2bw) I + (bu+av+2cw) M + (cu +bv+aw) M^2$$ Taking determinants, $$f(a,b,c) f(u,v,w) = f(au+2cv+2bw,bu+av+2cw,cu +bv+aw)$$

This type of polynomial is, under favorable circumstances, a norm form. For this particular example, we can describe the whole numbers $n$ that can be written as $n=f(x,y,z)$ with all integers. First, $\pm$ does not matter, if we can express $n$ we can also express $-n.$ Next, the primes represented are $3,$ all primes $q \equiv 2 \pmod 3,$ and all primes $r = u^2 + 27 v^2$ in integers. Finally, for prime $s = 4 u^2 + 2 uv+ 7 v^2,$ a number $n$ that is divisible by $s$ can only be represented as $n = f(x,y,z)$ if the exponent of $s$ is divisible by $3;$ this must hold for every such prme that divides $n.$

Another example: take $$M = \left( \begin{array}{rrr} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{array} \right)$$

Then $$f(a,b,c) = \det \left(aI + bM + c M^2 \right) = a^3 + b^3 + c^3 - 3abc.$$ You may have seen this example, as $$a^3 + b^3 + c^3 - 3abc = (a+b+c)(a^2 + b^2 + c^2 - bc - ca-ab).$$

• $M$ is the matrix of the map $x\mapsto ux$ with respect to the basis $1,u,u^2$ of $\mathbb Q(u)$, where $u^3=2$. Thus $M^3=2I$. – lhf Apr 19 '16 at 0:11
• @lhf yes. I wanted to emphasize that this can be done without knowing much machinery, just write down a square integer matrix. – Will Jagy Apr 19 '16 at 0:22
• Interesting! Thank you. – David Herrero Martí Apr 19 '16 at 23:11