# How can I translate this affine hyperplane?

Let $\mu\in\Bbb Z^d$. Suppose that $H=\{x\in\Bbb Z^d:\langle\mu,x\rangle=1\}$ is nonempty and fix $v\in H$.

Now, let $\{a_1,\dotsc,a_{d-1}\}$ be a basis for the kernel of the map $\langle \mu,-\rangle:\Bbb Z^d\to\Bbb Z$. Form a $d\times d-1$ matrix $A$ with these vectors $$A=\begin{bmatrix} a_1 & \dotsb & a_{d-1}\end{bmatrix}$$ and let $\phi:\Bbb Z^{d-1}\to H$ be the map $\phi(x)=Ax+v$. It's not hard to check that this map is well-defined and injective. My questions are:

1. Is this map surjective in general?
2. If not, what conditions can we impose on $\mu$ to ensure that $\phi$ is surjective?

Since $A$ is full rank we have a left inverse, but this is not an integer matrix so I'm not immediately convinced that the answer to (1) is yes.

My motivation here is that I have a large number of lattice polytopes whose vertices live in the hyperplane $H$. I'd like to write down an algorithm that produces an invertible affine $\Bbb Z$-linear transformation that translates these polytopes to the hyperplane defined by $\langle e_1,x\rangle=1$.

Let $w\in H$. Since $<\mu,w-v>=0$, there are $u_i\in\mathbb{Z}$ s.t. $w-v=\sum_{i=1}^{d-1}u_ia_i=A[u_1,\cdots,u_{d-1}]^T$, that is $w=\phi([u_1,\cdots,u_{d-1}]^T)$.
EDIT. I wrote too fast. OK, you know that $\ker(<\mu,.>)$ has a basis with $d-1$ elements because $\mathbb{Z}$ is a PID.