# A finite abelian group $G$ has invariant factors $(m_1, m_2, …, m_k)$. Show that $G$ has an element of order $s$ if and only if $s$ divides $m_k$.

Suppose a finite abelian group $G$ has invariant factors $(m_1, m_2, ..., m_k)$. Show that $G$ has an element of order $s$ if and only if $s$ divides $m_k$.

Because these are the invariant factors, we then know that $G \cong \mathbb{Z}_{m_1} \times \mathbb{Z}_{m_2} ... \times \mathbb{Z}_{m_k}$. Also, because it is in invariant factor form, $m_1$ divides $m_2$ ..., $m_{k-1}$ divides $m_k$. I'm not sure how to proceed. I know that the order of $s$ must divide the order of $|G|=m_1*m_2*...*m_k$, but I'm not sure how to argue that it must divide $m_k$ specifically.

Let $x$ be an element of order $s$.
Write $$x=(x_1,x_2,\dots,x_k)$$ where $x_i\in \Bbb{Z}_{m_k}$ Then $$s=\text{lcm }(|x_1|,|x_2|,\dots,|x_k|)$$ Note that $|x_i|$ divides $m_i$ divides $m_k$.
Hence we conclude that $s$ divides $m_k$