How is $\lbrace a_1, a_2, …, a_n : a_i \in \Bbb Z_2\rbrace$ a group?

I was asked to prove that if we define \begin{equation*} \Bbb Z_2^n = \lbrace a_1, a_2, ..., a_n : a_i \in \Bbb Z_2\rbrace \end{equation*} then it's a group under the operation of addition like $$(a_1, a_2, \ldots, a_n) + (b_1, b_2, \ldots, b_n) = (a_1+b_1, a_2+b_2, \ldots , a_n+b_n)$$

It doesn't look like a group, because if we let $a_i = 1 = b_i$, then the sum is $(2,2,\ldots, 2)$ because it's not modular addition, but $2\notin \Bbb Z_2$.

What am I missing?

• It is modular addition in each component. – Daniel Fischer May 25 '15 at 16:14
• $\mathbb{Z}_2^n=\mathbb{Z}_2\times\mathbb{Z}_2\times\cdots\times\mathbb{Z}_2$. The addition is indeed using modular arithmetic (the sum operation in $\mathbb{Z}_2$). – Matt Samuel May 25 '15 at 16:15
• When you are given $a \in \mathbb{Z}_2$, then all operations are to be done $\mod 2$. – Anurag A May 25 '15 at 16:15
• @DanielFischer So when is it safe to assume modular addition vs regular addition? That wasn't obvious to me as presented in the question. – SalmonKiller May 25 '15 at 16:15
• When you have elements of $\Bbb Z_2$, there is no other meaning for the symbol $+$ other than the group operation of $\Bbb Z_2$, modular addition. And note that $2 = 1+1$ is an element of $\Bbb Z_2$. It's just that in this case $2 = 0$. The confusion might come from the fact that we use the same symbols as for integers, but remember that in all rigour we should write elements of $\Bbb Z_2$ as equivalence classes $[a]$ (but we don't because it's tiresome). – GPerez May 26 '15 at 0:04

$\mathbb{Z}^n_2$ is $\underbrace{\mathbb{Z}_2 \times \dots \times \mathbb{Z}_2}_{n \text{ times}}$, so think about it as just dealing with $\mathbb{Z}_2$ (where the sum is modular) with $n$ separate components.
So we have $(1, \dots, 1) + (1, \dots, 1) = (0, \dots, 0)$ since $1 + 1 \equiv 0 \pmod 2$, and $0 \in \mathbb{Z}_2$.
It is modular in each component. So $$(1,\ldots, 1)+(1,\ldots,1)=(0,\ldots,0)$$ and the set is closed under component-wise addition mod 2.
If $(G_1,\phi_1)$,...,$(G_n,\phi_n)$ is a collection of $n$ groups with $n$ respective binary operations, we define their product as $(G_1\times...\times G_n, \phi_1\times...\times\phi_n)$ where $\phi_1\times...\times\phi_n:(G_1\times...\times G_n)\times(G_1\times...\times G_n)\rightarrow G_1\times...\times G_n$ by computing the group operation componentwise. In $\mathbb{Z}_2$ (which I would really recommend writing as $\mathbb{Z}/2\mathbb{Z}$), we have the operation $\phi$ as being addition modulo $2$.
A group is not just the set $\{0,1\}$. It is also the binary operation of addition modulo $2$. Whenever a group is used, do not forget about the implicit notion of the operation which gives it a group structure.