what is the definition of restricted direct product ? in an exercise , i'm given a definition of  restricted direct product , but it doesn't make sense for me ! 
they say , the  restricted direct product of groups $G_i$ is the set of elements of direct product which are the identity in all but finitely many compontents
i really don't understand what it means to be all but finitely ! 
i googled and found the same defintion with No clearification ! 
so , any help by example or explanation ? 
 A: Note first that when we are taking the product of a finite number of groups, then the restricted and normal direct product are the same.
For convenience, let us assume that we have a family of groups indexed by the natural numbers, so we have a $G_i$ for each $i\in\mathbb{N}$.
The usual direct product of the groups $G_i$ can be seen as the set of sequences such that the $i$'th entry of the sequence is an element of $G_i$ (we can also write these as infinite tuples $(g_1,g_2,\dots)$ with each $g_i\in G_i$).
The restricted direct product is then the subgroup of the above direct product where we only take those elements such that for some $N$, the $i$'th entry is $e_i$ whenever $i\geq N$ (I use $e_i$ to denote the identity element of $G_i$). This means that we can see the restricted direct product as the set of finite tuples $(g_1,g_2,\dots,g_n)$ (but where $n$ can be as large as we want) and where we multiply such tuples by first extending the shortest of them by adding $e_i$'s to the end, such that they get the same length, and then multiply them as we usually would do with tuples (and we identify two such tuples if the only difference between them is how many $e_i$'s they end in).
A: I assume you know what the direct product $\times_{i\in I} G_i$ (where $I$ is the indexing set) is. An arbitrary element of it looks like $(g_i)_{i\in I}$.
Now formally what they mean is that such a $(g_i)_{i\in I}$ belongs the restricted direct product iff there exists a finite subset $S\subset I$ such that $g_i=0$ for $i\notin S$ (where $0$ denotes the neutral element in each group).
A: For each $i\geq 0$, let $G_i$ be a group. You have probably already met the infinite direct product $$\prod_{i\geq 0}G_i=\{(g_0,g_1,\ldots)|g_i\in G_i\}$$ where we can choose any $g_i\in G_i$ for the $i$-th position in an element of the product. This set forms a group under pairwise multiplication of each component of two elements.
It turns out that this group has a subgroup called the restricted direct product (or direct sum if the $G_i$ are all abelian) which is the following set
$$\tilde{\prod_{i\geq 0}}G_i=\{(g_0,g_1,\ldots)|g_i\in G_i,\exists N\in\mathbb{N},(n>N\Rightarrow g_n=e_n)\}$$ where $e_n\in G_n$ is the identity of the group $G_n$. This is just the group of infinite sequences of elements in the product which are eventually always the identity. You should easily be able to show that this set forms a subgroup of $\prod G_i$.
A: Just thought I'd mention a more general notion of restricted direct product that is used in some contexts (in particular, I'm thinking of adeles). Given any collection of (perhaps topological) groups or rings or algebras or whatever objects $G_i$, and subobjects $H_i\le G_i$, indexed by $i\in I$, then the restricted product of the $\{G_i\}$ with respect to the $\{H_i\}$ is
$$\prod_{i\in I}^{\large\sf restr}G_i=\big\{(g_i)_{i\in I}:g_i\in H_i ~{\rm for~all~but~finitely~many~}i\in I\big\}\le \prod_{i\in I}G_i.$$
We say that "all but finitely many" elements of a collection satisfy a property $P$ if the number of elements that do not satisfy $P$ is finite. That is, all of the elements in the collection satisfy the property outside of only a finite number of exceptions.
In the case of rings or groups, if all of the $H_i$ are just $\{0\}$, the trivial subobject, then we recover the usual understanding of restricted direct product, which is also often (in fact more often) called the "direct sum" and denoted by the big \oplus symbol as $\bigoplus_{i\in I}G_i$.
In number theory for example we take the restricted direct product of the $p$-adic fields ${\bf Q}_p$ over all primes $p$ (with "${\bf Q}_\infty={\bf R}$" the convention for the "infinite prime $p=\infty$") with respect to the subrings ${\bf Z}_p$ for integer primes $p$ to obtain the ring of adeles ${\bf A}_{\bf Q}$.
