so I am studying in Germany and I stumbled upon this kind of question so I have this set given
$$M :=\begin{bmatrix}
a & 0 \\
0 & b \\
\end{bmatrix}$$
$a$ and $b$ are elements of the natural numbers
Now I have to show that $(M, ·)$ is a monoid but not a group. How should I do that?
For $a=1$ and $b=1$ we get an identity element $e$.
The associative property is obvious because we have it in $\mathbb N$.
Thus, it's indeed a monoid.
But for $x\in M$ there is a problem with $y\in M$ for which $xy=e.$
For example, take $a=2$ and $b=1$.
Thus, it's not a group.