Consider an arbitrarily given indexed family
$$F = \{X_i \ | \ i\in M\}$$
of modules $X_i$ over $R$ and denote by
$$P = \Pi_{i\in M}X_i$$
the cartesian product of the family $F$. By definition, an element of $P$ is a function
$$f:M\to U$$
from the set $M$ of indices into the union $U$ ofthe sets $X_i$ such that $f(i)\in X_i$ holds for every $i\in M$
I can understand that an element of the cartesian product is a function, and this function is from a set of indexes to $X_i$. However, when I think of simple cartesian products like $\mathbb{R}\times\mathbb{R}$ not for modules, but simply for sets, the elements are not functions, they're just sets (ordered sets). I'm trying to relate the two concepts, I don't know if they're supposed to be analogous but if not, I'd like examples of cartesian products, because my books gives none, it just uses as a basic definition for other theorems.