Afternoon guys, I'm stuck on this proof and I'd really appreciate it if someone could help solve it. ($\displaystyle Z $ = set of integers)

Question/Theorem

Let $\displaystyle Z^*_p$ be the set of nonzero integers modulo p. ($\displaystyle p \geq 2 $) Prove $\displaystyle Z^*_p $ is a group with multiplication mod $\displaystyle p$ if and only if $\displaystyle p$ is a prime number.

__________________________________________________ ______________

My (lame) effort so far:

We need to show:

(1) $\displaystyle Z^*_p $ is a group with multiplication mod $\displaystyle p$ $\displaystyle \Rightarrow $ $\displaystyle p $ is prime.

(2) if $\displaystyle p$ is prime, $\displaystyle Z^*_p $ is a group with multiplication mod $\displaystyle p$

__________________________________________________ _______________

(1) $\displaystyle \forall x \in Z^*_p $, $\displaystyle \exists x^{-1} \in Z^*_p $ such that $\displaystyle xx^{-1} = 1 $

so $\displaystyle xx^{-1} = 1 \mod p $

$\displaystyle xx^{-1} -1 = 0 \mod p $

$\displaystyle \Rightarrow $ p divides $\displaystyle xx^{-1} -1 $

$\displaystyle \Rightarrow \exists a \in Z $ such that $\displaystyle xx^{-1} - pa =1 $

I don't know where to go from here, or indeed if this is the right way of approaching this.

__________________________________________________ __________________

(2) if $\displaystyle p$ is prime, then any integer $\displaystyle q$ such that $\displaystyle 1 \leq q \leq p-1 $ is coprime to $\displaystyle p$ and so $\displaystyle \exists $ n,m $\displaystyle \in Z $ such that $\displaystyle np + mq =1 $

Now using that, we need to show the properties of a group are satisfied.

Showing associativity and identity (=1) are easy enough. But I don't know how to show an inverse exists. i.e. show that $\displaystyle \exists x^{-1} \in Z^*_p $ such that $\displaystyle xx^{-1} = 1 $ using the above property of a prime number.

__________________________________________________ __________________

Please help

Thank you.