why do we need to demand the closure condition on the definition of a group? so far, this is the definition I saw in number of sources:

A group $(G,·)$ is a nonempty set $G$ together with a binary operation
$\cdot$ on $G$ such that the following conditions hold:
(i) Closure: $\forall a,b\in G$, the element $a\cdot b$ is a uniquely
defined element of G.
(ii) Associativity: $\forall a,b,c\in G$, we have $a\cdot (b\cdot c)=(a\cdot b)\cdot c$
(iii) Identity: There exists an identity element $e\in G$ such that
$e\cdot a=a$ and $a\cdot e=a$
$\forall a\in G$.
(iv) Inverses: $\forall a\in G$ there exists an inverse element
$a^{-1}\in G$ such that $a\cdot a^{-1}=e$ and $a^{-1}\cdot a=e$.

what I don't understand is why do we have to demand the closure condition if from the beginning we are given a binary operation on $G$ which means by definition that the result of the operation is in $G$. so is the demand of closure condition is redundant or am I missing something here? thanks.
 A: It depends on your definition of 'binary operation'.  Often it is defined to give a result in the same set.  Then closure isn't needed.  However, when looking at whether a subset is a subgroup, closure becomes important, since the inherited operation may not keep you within the subset.
A: Yes that is correct. I don't know where you have your information from, but it is enough to either say the operation $\cdot$ on G is binary $\Leftrightarrow \cdot : G \times G \rightarrow G $ 
or to say there is an operation $\cdot$ that combines two elements of $G$: $a\cdot b$such that the operation is closed $a\cdot b\in G$
A: Yes, given the common definition of 'binary operation' the definition above is redundant.  A quick Google search on the term binary operation gives many definitions which agree with yours.  However the term binary is often overloaded and might be construed as simply a function of two arguments like so: $f: A \times B \rightarrow C$.
It should be noted that the same definition with (i) removed is also redundant.  One can assume that a group only has a right inverse or a right unit, etc...
Another concern here is pedagogy.  It doesn't hurt to make it absolutely clear that $x \cdot y$ must be in $G$ for all $x$ and $y$ in $G$.  The definition you give, with the closure law explicitly stated, is more common in introduction sources.
