We know axiom of choice states that:
Given any collection $\{ S_i : i \in I \} $ of nonempty sets, there exists a choice function $f: I \to \bigcup_{i \in I} S_i $ such that $f(i) \in S_i $ for all $i \in I$.
Question: I am bit confused because in one books I saw the axiom of choice as: For any collection $\{ S_i : i \in I \} $ of nonempty sets, $\prod_{i \in I} S_i $ is non empty.
Why are they equivalent?