# Tuple

Tuple (separated from Medieval-. Quintuplus , five times', septuplus sevenfold, ' centuplus hundredfold', etc.) are in the math beside quantities an important way in which mathematical objects together. A tuple consists of a list of finitely many objects that are not necessarily different from one another. In contrast to quantities, the order of the objects plays a role. There are different ways of representing tuples formally as sets. Tuples are used in many areas of mathematics, for example as coordinates of points or as vectors in multi-dimensional vector spaces .

Tuples, regardless of their length, are seldom mentioned. Rather, one uses the word tuple and the special cases of it mentioned in the next section, if the context results in the length as a fixed number or as a named constant as . If, on the other hand, one considers many finite sequences of different lengths of elements of a basic set, one speaks of finite sequences or defines a new term that is often composed of "chain", e.g. B. string , addition string . ${\ displaystyle n}$${\ displaystyle n}$

In computer science , the term tuple is also used as a synonym for a data set . In various programming languages such as Python , tuples are immutable records.

## notation

A tuple is a collection of mathematical objects in a list. In contrast to sets, the objects do not necessarily have to be different from one another and their order is important. Tuples are usually written using round brackets${\ displaystyle n}$${\ displaystyle n}$${\ displaystyle x_ {1}, \ ldots, x_ {n}}$

${\ displaystyle (x_ {1}, \ ldots, x_ {n})}$

noted, where two consecutive objects are separated by a comma . The object in the -th position is called the -th component of the tuple. Occasionally, however, other types of brackets , such as pointed or square brackets, are also used for the notation : ${\ displaystyle i}$${\ displaystyle x_ {i}}$${\ displaystyle i}$

${\ displaystyle \ langle x_ {1}, \ ldots, x_ {n} \ rangle}$ or ${\ displaystyle [x_ {1}, \ ldots, x_ {n}]}$

Other separators, such as semicolons or vertical bars, are also common. Other notation variants are

${\ displaystyle (x_ {i}) _ {i = 1, \ ldots, n}, (x_ {i}) _ {i \ in \ {1, \ ldots, n \}}, (x_ {i}) _ {i = 1} ^ {n}}$

or short if the length of the tuple is clear from the context. ${\ displaystyle (x_ {i})}$

## Special names for n-tuples with a lowercase n

A 2-tuple is also called an ordered pair or duple , a 3-tuple also a triple , a 4-tuple also a quadruple , a 5-tuple also a quintuple . The series is continued analogously by means of duplicate Latin numerals . The 0-tuple is called the empty tuple and is noted by. ${\ displaystyle ()}$

## Examples

Tuples of similar objects:

• ${\ displaystyle (a)}$and are two 1-tuples of elements of a set${\ displaystyle (b)}$${\ displaystyle a, b}$${\ displaystyle A}$
• ${\ displaystyle (1,3)}$, and are three different 2-tuples of integers${\ displaystyle (2.2)}$${\ displaystyle (3,1)}$
• ${\ displaystyle (\ {1,2 \}, \ {3,4,5 \}, \ {6 \})}$ is a 3-tuple of sets
• ${\ displaystyle (\ sin, \ \ cos, \ \ tan, \ \ cot)}$ is a 4-tuple of trigonometric functions

Tuples of different objects:

• A directed graph is a pair consisting of a set of nodes and a set of directed edges .${\ displaystyle (V, E)}$ ${\ displaystyle V}$ ${\ displaystyle E \ subseteq V \ times V}$
• A body is a triple consisting of a set and two two- digit links and , which have certain properties.${\ displaystyle (K, +, \ cdot)}$${\ displaystyle K}$ ${\ displaystyle +}$${\ displaystyle \ cdot}$
• A probability space is a triple consisting of a result set , a σ-algebra and a probability measure .${\ displaystyle (\ Omega, \ Sigma, P)}$ ${\ displaystyle \ Omega}$ ${\ displaystyle \ Sigma}$ ${\ displaystyle P}$

## Equality of tuples

Two tuples and are equal if and only if they are of equal length and their corresponding components are equal, that is ${\ displaystyle (x_ {1}, \ ldots, x_ {n})}$${\ displaystyle (y_ {1}, \ ldots, y_ {m})}$

${\ displaystyle (x_ {1}, \ ldots, x_ {n}) = (y_ {1}, \ ldots, y_ {m}) ~ \ Longleftrightarrow ~ n = m}$and for .${\ displaystyle x_ {i} = y_ {i}}$${\ displaystyle i = 1, \ ldots, n}$

## Representation as a crowd

Tuples can also be represented as sets. A simple representation of tuples is: ${\ displaystyle n}$

${\ displaystyle n = 0: \; (): = \ emptyset}$
${\ displaystyle n> 0: \; (x_ {1}, \ ldots, x_ {n}): = \ {(x_ {1}, \ ldots, x_ {n-1}), \ {x_ {n} \} \}}$

With this representation, the ordered pair is the set . ${\ displaystyle \, (x, y)}$${\ displaystyle \ {\ {\ emptyset, \ {x \} \}, \ {y \} \}}$

Another representation is based on the idea that tuples are finite sequences or families , i.e. functions with a possibly empty section of the set of positive natural numbers as an index range (ordered pairs here in square brackets):

${\ displaystyle n = 0: \; (): = \ emptyset}$
${\ displaystyle n> 0: \; (x_ {1}, \ ldots, x_ {n}): = \ {[1, x_ {1}], \ ldots, [n, x_ {n}] \} = (x_ {i}) _ {i \ in \ {1, \ ldots, n \}}}$

Non-empty tuples can also be represented recursively on the basis of ordered pairs (ordered pairs also here in square brackets):

${\ displaystyle n = 1: \; (x): = x}$
${\ displaystyle n> 1: \; (x_ {1}, \ ldots, x_ {n}): = [(x_ {1}, \ ldots, x_ {n-1}), x_ {n}]}$

However, only a weaker form of the axiom of equality applies to tuples represented in the latter way: Two tuples of equal length are equal if and only if their corresponding components are equal .

Regardless of how tuples are represented as sets, 2-tuples behave in exactly the same way as ordered pairs and can be used like these, even if, as with the tuple representation as a finite sequence, 2-tuple and pair representations differ.

The last of the three definitions above has the advantage that it is also defined for real classes , provided that the ordered pair is defined for real classes. That is, you can z. B. Define the monoid of ordinal numbers with addition and neutral element as a tuple , although the ordinal numbers are not a set, but a real class. ${\ displaystyle [a, b]}$ ${\ displaystyle \ Omega}$${\ displaystyle +}$${\ displaystyle 0}$${\ displaystyle (\ Omega, +, 0)}$

## use

Tuples are used in mathematics, for example, as coordinates of points or vectors in dimensional spaces and in computer science as data fields and structures. Consequently, rows or columns of matrices are also treated and treated as tuples. ${\ displaystyle n}$