# Seek a multiplication formula for $x^2+xy+y^2$

For $$x^2+y^2$$ there is a formula based on multiplication of complex numbers which allows one, given specific representations $$a^2+b^2=m,\ c^2+d^2=n,$$ to obtain a representation $$s^2+t^2=mn.$$ That is, there are simple formulas for $$s,t$$ in terms of $$a,b,c,d.$$

I am asking here for such a formula for the form $$x^2+xy+y^2.$$ That is, given $$a^2+ab+b^2=m,\ c^2+cd+d^2=n,$$ to solve $$s^2+st+t^2=mn,$$ where there are simple formulas for $$s,t$$ in terms of $$a,b,c,d.$$

Added later: I was looking to find cases of two representations by the form $$x^2+xy+y^2 \tag{1}$$ of the same number using positive $$x,y$$ and [though there is a smaller example] found what to me is an interesting coincidence. The "taxicab number" $$1729,$$ famous for having two essentially different representations as a sum of two cubes, has three different representations by $$(1).$$ They are $$(x,y)=(25,23),(32,15),(37,8).$$

• Yes, and it works the same way. You can write $x^2 + xy + y^2 = N(x - y \omega)$ where $\omega$ is a primitive third root of unity. Jul 2, 2022 at 3:21
• Jul 2, 2022 at 3:28
• Try $s = ac-bd$ and $t = ad+bc+bd$ (obviously not unique) Jul 2, 2022 at 4:09
• Thanks all. I had just got back to this and had found that Q. Yuan's comment showed alredy how to find the formulae. Jul 2, 2022 at 5:49

We know, if $$\omega$$ is a primitive third root of unity, then, we can factorise $$x^3-y^3$$ as $$(x-y)(x-\omega y)(x-\omega^2 y)$$ but also as $$(x-y)(x^2+xy+y^2)$$. Thus, $$(x^2+xy+y^2)= (x-\omega y)(x-\omega^2 y)$$

Now, we can write the equations as $$(a-b\omega)(a-b \omega^2)=m$$$$(c-d \omega)(c-d \omega^2)=n$$ Multiplying these together we get $$(a-b \omega)(c-d \omega)(a-b \omega^2)(c-d \omega^2)=mn$$

$$(ac+bd \omega^2-(ad+bc) \omega)(ac+bd \omega^4-(bc+ad) \omega^2)=mn$$ Now we will use $$\omega^3=1$$ and $$\omega^2+ \omega+1=0$$.

So $$(ac-bd-(ad+bc+bd) \omega) (ac-bd-(ad+bc+bd) \omega^2)=mn$$ Thus you get $$(s,t)=(ac-bd, ad+bc+bd)$$. Another solution can be $$(s,t)=(ac+bd+ad, ad-bc)$$ obtained by multiplying the first and fourth terms of the equation.

• Thanks for this answer. I like how it goes directly from the two factorizations of $z^3-1$ tep by step to get the formulas. Jul 2, 2022 at 5:52

$$(x^2 + B xy + C y^2) ( z^2 + B zw + C w^2)= m^2 + Bmn + C n^2$$

where $$m = xz - C yw$$ $$n = xw + yz + Bzw$$

One may multiply values in this way for the principal form, the form that represents $$1$$ and has the required discriminant.

The other case is when the class number is divisible by $$3$$ and you have a form of order three in the class group. However, those need a bit of tinkering to get into the simple $$FG = H$$ format as above

• Will: This is nice to have available. What is meant by the "required discriminant"? [I admit not knowing about class number.] Jul 2, 2022 at 19:53
• @coffeemath see math.stackexchange.com/questions/4479936/… and the Cox book in general. I have the first edition, some typing errors corrected for the second. Jul 2, 2022 at 20:19

Working with integers of the form $$x^2 + xy + y^2$$ naturally lends itself to the Eisenstein integers $$\mathbb Z[\omega]$$ (where $$\omega$$ is the cube root of unity), as Qiaochu Yuan points out the norm of $$x - y \omega$$ satisfies $$N(x - y\omega) = (x - y \omega)(\overline{x - y \omega}) = x^2 - xy \overline \omega - xy\omega + y^2 \omega \overline\omega = x^2 + xy + y^2$$

(Recall $$\omega \overline\omega = 1$$ and $$\omega + \overline\omega = -1$$)

As these norms are multiplicative, finding $$s,t$$ such that $$(a - b\omega)(c - d\omega) = s - t\omega$$ satisfies $$N(a - b\omega)N(c - d\omega) = N(s - t\omega)$$, your condition. Matching coefficients and simplifying (using $$\omega^2 =-( 1 + \omega)$$), $$s-t\omega = (a-b\omega)(c-d\omega) = (ac-bd) - (ad + bc + bd)\omega$$ Therefore one solution is $$(s,t) = (ac-bd, ad + bc + bd)$$.

$$x^2+xy+y^2$$ in multiplication form?

\begin{align} &\text{Note. } (ab+cd)^2+(ad-bc)^2=(a^2+b^2)(c^2+d^2). \\ \ \\ & x^2+xy+y^2=\left(x+\frac 1 2 y\right)^2+\left( \frac{\sqrt{3}}{2}y\right)^2. \\ \ \\ &\text{Now, let's find (a, b, c, d) which satisfies ab+cd=x+\frac12y, ad-bc=\frac{\sqrt{3}}2y.} \\ \ \\ &\text{just for an example, there is:} \\ & a=1, b=\frac{x}{2}-\frac{\sqrt{3}-1}{4}y, c=1, d= \frac{x}{2}+\frac{\sqrt{3}+1}{4}y. \\ \therefore \; & x^2+xy+y^2=\left(1+\left(\frac x 2 - \frac{\sqrt{3}-1}{4}y\right)^2\right)\left(1+\left(\frac x 2 + \frac{\sqrt{3}+1}{4}y\right)^2\right) \quad \quad \quad \quad \quad \ = \left(1+\left(\frac y 2 - \frac{\sqrt{3}-1}{4}x\right)^2\right)\left(1+\left(\frac y 2 + \frac{\sqrt{3}+1}{4}x\right)^2\right) \end{align}

• Isn't this the inverse problem? The problem is to find x,y in terms of a,b,c,d.
– qwr
Aug 13, 2023 at 14:16