Q: Given the set of positive rational numbers $\mathbb Q^+$, the operation is multiplication$~*$.
Is $\left<\mathbb Q^+, *\right>$ a monoid?
My answer is:
$ \forall x, y, z \in \mathbb Q^+$, then $ x*y \in \mathbb Q^+ $. So $\mathbb Q^+$ is a closed set.
And
$ x*(y*z) = (x*y)*z $. So it is associative under operation multiplication, thus $\mathbb Q^+$ is a semigroup.
In addition, $$ 1*x= x*1 = x$$ so $\mathbb Q^+$ has an identity element $1$.
In summary, $\left<\mathbb Q^+, *\right>$ a monoid.
Is my answer correct?
Your answer is basically correct, but in a couple of places the terminology and notation are a little off.
It’s not really correct to say that $\Bbb Q^+$ is a closed set: in this context closure is a joint property of set and an operation, so you should say that $\Bbb Q^+$ is closed under $*$.
The statement it is associative under [the] operation multiplication isn’t quite right: associativity is a property of binary operations, so it’s the operation $*$ itself that is associative.
A semigroup requires a binary operation as well as a set, so it’s $\langle\Bbb Q^+,*\rangle$ that’s a semigroup, not $\langle\Bbb Q^+\rangle$. Similarly, it’s the semigroup $\langle\Bbb Q^+,*\rangle$ that has an identity element.