It is well-known that the direct product of any family of abelian groups
 is an elementary extension of the direct sum of the family
(see e.g. Lemma A.1.6 in the book `Model Theory' by W. Hodges,
where this is proven for modules).
Can this result be generalized to some other classes of groups? 
More concrete questions:


(1) Is there a family of groups such that its direct product
is not elementarily equivalent to its direct sum?
Are there a group $G$ (a finite group $G$) and a cardinal $\kappa$ such that $G^{\kappa}$
is not elementarily equivalent to $G^{(\kappa)}$?


(2) Is there a family of groups such that its direct product is
elementarily equivalent to its direct sum but is not
an elementary extension of it? 
Are there a group $G$ (a finite group $G$) and a cardinal $\kappa$ such 
that $G^{\kappa}$ is elementarily equivalent to $G^{(\kappa)}$ but is not
an elementary extension of it?


(3) Are there classes of groups, becides the classes of abelian groups, 
in which direct products are elementary extensions of direct sums?



Elementary equivalence of the direct product and direct sum of groups
Consider the sentence $P:\forall x\exists y:y^3=1\neq y,yx=xy$. Let $(F\_i)$ be an infinite family of groups, each of which possesses an element of order 3. Then $\bigoplus F\_i$ satisfies $P$. 


Now assume that each $F\_i$ is non-abelian of order 6: in $F\_i$, elements of order 2 never commute to elements of order 3. Thus in the direct product, an element all of whose components have order 3 commutes with no element of order 2. This answers (1).


Also when each $F\_i$ is non-abelian of order 8, the direct sum satisfies ``each element has a non-abelian centralizer" (which can be made 1st order), but not the direct product.


More generally, if there exists $n\_0$ such that in each $F\_i$, there exists a family of $n\_0$ elements whose centralizer in $F\_i$ is abelian (this obviously holds if $F\_i$ has bounded cardinal, but also more generally if $F\_i$ has finite generating rank (e.g. if $F\_i$ is simple since then it is generated by 2 elements). Then the direct product $\prod F\_i$ contains a finite family whose centralizer is abelian; while the direct sum $\bigoplus F\_i$ has such a finite family only if all but finitely many $F\_i$'s are abelian. In this very general case again, the direct sum and the direct product are not elementary equivalent, and when $F$ is finite non-abelian no infinite $F^{(\alpha)}$ can be elementary equivalent to any $F^\kappa$.


Since I don't know a single case for which infinitely of the $F\_i$'s are non-abelian and I know the direct sum to be elementary equivalent to the direct product, I have no idea about (2).




---


*Edit:* It took me some time to struggle until I solved the following: in a group $F$, let $m(F)$ be the smallest cardinal of a subset of $F$ whose centralizer is abelian. **Find finite groups with $m(F)$ arbitrary large** (even finding $F$ with $m(F)\ge 3$ did not seem immediate). Note that $m(A\times B)=\max(m(A),m(B))$, so direct products do not help; $m(F)$ is bounded above by the minimal number of generators, and is 0 for abelian groups. Actually, if we fix a prime $p$ and consider the product of a large family of $n$ non-abelian groups of order $p^3$ and glue their center, so that the resulting group $G$ has order $p^{2n+1}$ and has both its center and its derived subgroup of order $p$, then the centralizer of any noncentral element has index $p$, and hence the centralizer of any family of $k$ elements has index $\le p^k$; on the other hand this group has no abelian subgroup of order $>p^{n+1}$, so $m(G)\ge n+1$ (actually it's an equality). This provides families of $(F\_i)$ for which the previous argument does not work.


