Definition
$1$-tuples
By convention, we define a $1$-tuple to simply be a set. This definition fits in nicely with the definition of the unary Cartesian product we put forward in our post on Cartesian products.
$2$-tuples
We define $2$-tuples, more commonly known as ordered pairs, using the Kuratowski definition:
\[(x_1,x_2)=\{\{x_1\},\{x_1,x_2\}\}\]The above definition distinguishes $x_1$ from $x_2$ in that both sets in the right set contain $x_1$ but only one contains $x_2$. This is what gives the pair order.
You’ll notice in the special case that $x_1=x_2$ we have $(x_1,x_1)=\{\{x_1\},\{x_1,x_1\}\}=\{\{x_1\}\}$.
$n$-tuples
Using the $2$-tuple, we can define all $n$-tuples recursively as an ordered pair of an $(n-1)$-tuple and another element. The $3$-tuple, for example, would be:
\[\begin{align} (x_1,x_2,x_3)&=((x_1,x_2),x_3)\\ &=\{\{(x_1,x_2)\},\{(x_1,x_2),x_3\}\}\\ &=\{\{\{\{x_1\},\{x_1,x_2\}\}\},\{\{\{x_1\},\{x_1,x_2\}\},x_3\}\}\\ \end{align}\]And in general, an $n$-tuple for $n>2$ is recursively defined as:
\[(x_1,x_2,\cdots,x_{n-1},x_n)=((x_1,x_2,\cdots,x_{n-1}),x_n)\]While the above definition is standard, there are alternate conceptions of $n$-tuples that allow for $0$-tuples. See here for one such definition.
Existence in ZFC
The existence of an ordered pair of elements in ZFC can be proved using the axiom of pairing three times. Once to prove that $ \{ a \} $ exists, another to prove $ \{ a,b \} $ exists, and one more time to pair them with each other.
And since $n$-tuples are simply nested ordered pairs, they too must exist.
Simultaneous Interpretation
A consequence of our definition is that any $n$-tuple can also be thought of as a $k$-tuple where $1\le k\le n$. This is an immediate consequence of the recursive definition:
\[(x_1,x_2,\cdots,x_n)=(\underbrace{(x_1,x_2,\cdots,x_{n-k+1})}_{1},\underbrace{x_{n-k+2}}_{2},\cdots,\underbrace{x_n}_{k})\]It is this property that will allow us to also simultaneously interpret the arity of Cartesian products and thus the arity of relations and functions.
Note that this trivially applies to the $k=1$ case as all sets are $1$-tuples by definition.
Equality
Two ordered pairs are equivalent if and only if the elements in each of their respective indices are equal. That is to say, for two $n$-tuples $X$ and $Y$:
\[\begin{align} X&=(x_1,x_2,x_3,\cdots,x_n)\\ Y&=(y_1,y_2,y_3,\cdots,y_n) \end{align}\]We have the following:
\[\begin{align} X=Y&\equiv\left(\forall k\in[1..n]\right) x_k=y_k\\ &\equiv x_1=y_1 \land x_2=y_2 \land \cdots \land x_n=y_n\\ \end{align}\]Note that this implies that tuples of different sizes will never be equal. Unless, of course, their size difference is only a matter of simultaneous interpretation.
Extraction
In order to use these tuples, we have to be sure we can produce some formula to extract the their elements. The formula for extracting the $i$th element of an $n$-tuple is called the $i$th projection.
Extracting Elements of $2$-tuples
To extract the first element $\pi_1(P)$ of an ordered pair $P=(a,b)$ we can use the following construction:
\[\pi_1(P)=\bigcup\bigcap P=a\]Proof
$$\begin{align} \pi_1(P)&=\bigcup\bigcap P\\ &=\bigcup\bigcap \{\{a\},\{a,b\}\}\\ &=\bigcup \left(\{a\}\cap\{a,b\}\right)\\ \end{align}$$ Of course the only element in common between $\{a\}$ and $\{a,b\}$ is $a$ so: $$\pi_1(P)=\bigcup \{a\}$$ And because the union of all the elements in $a$ is precisely $a$, we have: $$\pi_1(P)=\bigcup \{a\}=a$$ And indeed, $a$ is the first element of the ordered pair $P$.
The second element $\pi_2(P)$ of an ordered pair $P=(a,b)$ can be found like so:
Extracting Elements of $n$-tuples
You may have noticed that the definitions above only apply to $2$-tuples. What about $n$-tuples? Well, quite intuitively, we can extract the elements of an $n$-tuple of any size by recursively using the $\pi_1$ and $\pi_2$ functions we defined above.
The notation we’ll use is as follows: $\pi^n_i(P)$ is the $i$th element of the $n$-tuple $P=\left(x_1,x_2,x_3,\cdots,x_n\right)$.
The first element of $P$ can be found like so:
\[\pi^n_1(P)=\underbrace{\pi_1\circ\cdots\circ\pi_1}_{n-1\text{ iterations}}(P)=x_1\]For any element other than the first, we can use the following formula:
\[\pi^n_i(P)=\pi_2\circ\underbrace{\pi_1\circ\cdots\circ\pi_1}_{n-i\text{ iterations}}(P)=x_i\]This should be fairly intuitive as the repeated $\pi_1$ serve to extract the desired nested tuple and once we reach the base case of the $2$-tuple, we either want the first $\pi_1$ or second $\pi_2$ term.
Some Uses
Cartesian product
Ordered pairs are necessary in defining the Cartesian Product, which in turn are used to define relations, functions, coordinates, etc.
Mathematical Structures
Tuples are often used to encapsulate sets along with some operator or relation into a complete mathematical structure. One example is a graph which is defined as an ordered pair $G=(V,E)$ where $V$ is a set of vertices and $E$ a set of edges connecting those vertices. Another example is a group which is defined as an ordered pair $G=(S,\cdot)$ where $\cdot$ is some binary operation on the elements of $S$. Tuples are also used to encapsulate rings, fields, vector spaces, topological spaces, ordered sets, and so on.