Isomorphism of $\mathbb{Z}\ltimes_A \mathbb{Z}^m$ and $\mathbb{Z}\ltimes_B \mathbb{Z}^m$

Let $$A$$ and $$B$$ be matrices of finite order with integer coefficients.

Let $$n\in\mathbb{N}$$ and let $$G_A=\mathbb{Z}\ltimes_A \mathbb{Z}^n$$ be the semidirect product, where the action is $$\varphi(n)\cdot (m_1,\ldots,m_n)=A^n (m_1,\ldots,m_n)$$, and similarly with $$B$$.

It is easy to construct an isomorphism between $$G_A$$ and $$G_B$$ if $$A$$ is conjugate in $$GL(n,\mathbb{Z})$$ to $$B$$ or $$B^{-1}$$.

But, this is also a necessary condition? I mean, does $$G_A\cong G_B$$ implies $$A\cong B$$ or $$A\cong B^{-1}$$ in $$GL(n,\mathbb{Z})$$ or is there a counterexample?

I've seen in A necessary condition for two semi-direct products to be isomorphic. that it is true if A and B are hyperbolic, i.e none of their eigenvalues have module 1, but it isn't the case.

Thank you!

• Note that your assumption implies that $A,B$ have finite order.
– YCor
Jan 8, 2020 at 17:18
• Yes, you're right, they have finite order. Is this a hint? Jan 8, 2020 at 17:22
• No, it's just natural to say it.
– YCor
Jan 8, 2020 at 17:24
• I think it would fit on MO (I'd recommend mention explicitly that $A,B$ have finite order). Also a remark, denoting by $G_A$ this group, is that $G_A$ is virtually abelian iff $A$ has finite order. In particular, if $A$ has finite order and $G_A\simeq G_B$ then $B$ also has finite order.
– YCor
Jan 9, 2020 at 18:51
• @YCor thank you for your recommendations, I will do that. By the way, what's the difference between MO and MSE? Jan 9, 2020 at 19:28