Definition: A non-empty set G having binary operation “*” (say) is called group in math if it satisfies the following axioms:
- Closure Property w.r.t “*“
i.e, a\ast b\in G\;\;\;\;\;\;\;\forall\;a,b\in G
- Associative Law w.r.t “*“

(a\ast b)\ast c=a\ast(b\ast c)\;\;\;\;\;\;:\;\forall\;a,b,c\in G.
- Identity element exist.
There is identity element e in G such that
a\ast e=e\ast a=a\;\;\;\;\;\;\;\;\forall\;a\in G.
- Inverse of each element exist.
For each a\in G, there is an a^{-1}\in\;G such that
you can also check semi group and monoid