# Solving systems of equations in roots of unity

In part of my research, the following problem has come up.

Consider the system of equations (in complex numbers)

$$z^b w^c = 1,\quad z^d w^e = 1.$$

I am interested in the solution set when we restrict both $z$ and $w$ to be $a^{\textrm{th}}$ roots of unity, for some positive integer $a$. Of course, one immediately sees that $(z, w) = (1, 1)$ is a solution.

What are some nice necessary and sufficient conditions on $a, b, c, d,$ and $e$ which guarantee that $(z, w) = (1, 1)$ is the ONLY solution?

To give an idea of the flavor of answer I'd be most happy with, one must have $\textrm{gcd}(a, b, d) = \textrm{gcd}(c, e) = 1$, because if $z$ is any $\textrm{gcd}(a, b, d)^{\textrm{th}}$ root of $1$ (which is neccesarily an $a^{\textrm{th}}$ root of $1$), then $(z, 1)$ is a solution to both equations.

It also turns out that $z$ and $w$ must both be $\textrm{gcd}(a, be - cd)^{\textrm{th}}$ roots of $1$.

I'd love to have an answer like "$\textrm{gcd}(a, be - cd) = \textrm{gcd}(a, b, d) = \textrm{gcd}(c, e) = 1$ is necessary and sufficient", with, perhaps, a few more estimates on gcd terms.

This problem can also been generalized (and I am interested in that case as well). Suppose you are given $3$ equations

$$z^a w^b = 1,\quad z^c w^d = 1,\quad z^e w^f = 1,$$

with $z$ and $w$ complex numbers of modulus $1$.

What are necessary and sufficient conditions on $a, b, c, d, e$ and $f$ which guarantee that the only simultaneous solution is $(z, w) = (1, 1)$?

The previous problem is a special case of this (which comes from setting $b = 0$. Clearly then, $z$ must be an ath root of unity. It turns that if $b$ is $0$, using the fact that $\textrm{gcd}(d, f) = 1$ one can show $w$ must also be an $a^{\textrm{th}}$ root of unity).

And please feel free to retag as appropriate!

You are computing the nullspace of a $2 \times 2$ matrix over $\mathbb{Z}/a\mathbb{Z}$, so a necessary and sufficient condition is that the matrix in question is invertible, hence $\gcd(a, be-dc) = 1$ should be necessary and sufficient. In the second case you should compute the Smith normal form of your matrix over $\mathbb{Z}$. I believe a necessary and sufficient condition is that the Smith normal form is [[1 0][0 1][0 0]] (looks like matrices aren't working yet).