Essentially I'd like to know the formal definition of the object $\{A_{i}|i\in I\}$ .This is my context:
1.- From Wikipedia (Here) I understand that a family of elements in $S$ indexed by $I$ and denoted by $\{A_{i}|i\in I\}$ is a function $A:I\longrightarrow S$.
2.- From Hrbacek's book (Introduction to set theory): "We say that $A$ is indexed by $S$ if $A=\{S_{i}|i\in I\}=Ran(S)$, where $S$ is a function on $I$". Here I understand that I have the function $S:I \longrightarrow A$ and $\{S_{i}|i\in I\}$ is defined as the range of $S$.
3.- From Hagen von Eitzen's answer (Here), I understand that a family $\{A_{i}|i\in I \}$ is a function $S:I\longrightarrow A$ and we write $A_{i}$ instead of $S(i)$.
So, I'm very confused because these definitions seems to be different to me, or maybe I'm missing something. I don't know. Could you guys help me clarify this?
Edit: I intuitively understand the concept. My problem basically is that there are some "inconsistencies" that I just don't get in the defintions:
In definition $1)$ if $A=\{A_{i}|i\in I\}$ is a function then $\bigcup A=\bigcup \{A_{i}|i\in I\} $. But formally the elements of a function are order pairs and then $\bigcup A$ is a set that doesn't equal the union of all the sets $A_{i}$.
In definition $2)$ It's been said that $A$ is indexed by $S$. So here I always thought that a $I$ is the set that index funtions, though here it does make sense to say $\bigcup \{A_{i}|i\in I\}$ because we are talking about the union of all the sets $A_{i}$.
When we are talking about sets, the object $\{A_{i}:i\in I\}$ cannot contain repeated elements, but if we talk about a function it does matter the order and repeatition of elements. So, it's confusing.