A type of isomorphism on $\mathbb{Z}^r$ Let $(x_1,\dots,x_r)$ be a non-zero element of $\mathbb{Z}^r$, and let $h$ be the highest common factor of $x_1, \dots, x_r$. Show that there is an isomorphism $\mathbb{Z}^r \to \mathbb{Z}^r$ taking $(x_1,\dots,x_r)$ to $(1, 0, 0,\dots,0)$ if and only if $h=1$.

One direction isn't too bad; if $\phi$ is such an isomorphism then
$$
\phi\big((x_1,\dots,x_r)\big) = (1,0,\dots,0)
$$
$$
\phi\big(h(\tfrac{x_1}{h},\dots,\tfrac{x_r}{h})\big) = (1,0,\dots,0)
$$
$$
h \phi\big((\tfrac{x_1}{h},\dots,\tfrac{x_r}{h})\big) = (1,0,\dots,0).
$$
But then $h|1$, so we must have $h=1$. I really have no idea how to go about proving the other direction... so any help would be appreciated.

If there is an isomorphism $h$ mapping $(x_1,\dots,x_n)$ to $(1,0,\dots,0)$, its inverse $h^{-1}$ maps $(1,0,\dots,0)$ to $(x_1,\dots,x_n)$, and the matrix $A$ of $h^{-1}$ with respect to the canonical basis of $\mathbb Z^n$ then has $(x_1,\dots,x_n)$ as its first column. Since $A$ must have determinant $1$ or $-1$, the $\gcd$ of each of its columns is $1$.
