What Is Tuple? - Definition From - TechTarget

Tuples in mathematics

In mathematics, a tuple is an ordered sequence of values. The values can be repeated, but their number is always finite. A tuple is often represented by a comma-delimited list whose values are enclosed in parentheses, although they're sometimes enclosed in square brackets or angle brackets. The following tuple uses parentheses and contains four values, with one value repeated.

(6, 12, 6, 4)

Because the tuple includes four values, it is sometimes referred to as a 4-tuple or a quadruple. Tuples are often referred to by these types of specific names, particularly the ones with fewer values. For example, tuples that contain one through six values might be referred to by the following names:

  • 1-tuple or monad.
  • 2-tuple or pair.
  • 3-tuple or triple.
  • 4-tuple or quadruple.
  • 5-tuple or quintuple.
  • 6-tuple or sextuple.

These are not the only names given to tuples that contain one to six values. In addition, names are often given to tuples that contain more than six values. A tuple might also be referred to as an n-tuple, where n is the potential number of values within the tuple. An n-tuple can be represented by the following expression.

(x1, ..., xn)

A tuple is considered ordered because that order uniquely defines the tuple, in terms of comparing it with other tuples. For example, the following statement is true only if a1 equals b1, a2 equals b2, a3 equals b3 and so on.

(a1, a2, a3, ..., an) = (b1, b2, b3, ..., bn)

If the individual values are not equal according to the specified order, the statement is false. If a1 equals b2 and a2 equals b1, but a1 does not equal b1 and a2 does not equal b2, the statement is false.

Tuples can be used together as part of larger calculations. A simple example of this is shown in the following equation, which adds two 4-tuples together.

(3, 1, 17, 7)+ (6, 12, 6, 4)= (3 + 6, 1 + 12, 17 + 6, 7 + 4)= (9, 13, 23, 11)

The values are added together based on their position within the tuple, with each position being calculated together but independently of the values in the other positions. The first value in the first tuple is 3, and the first value in the second tuple is 6. When added together, they total 9, which becomes the first value in the tuple returned by the calculation. The same process is repeated for each position within the tuple.

In mathematics, a tuple might also be represented in a column format rather than as a single row of elements. When a column format is used, the values are enclosed in brackets, without commas, as in the following example.

Example of a column format tuple.

Tuples in this format can also be added together, taking a similar approach as in the earlier example.

Example of column format tuples added together.

The values are added together based on their position within the tuples. Because each tuple has four values, the equation returns a 4-tuple with the sum of each position.

Tuples can be used in a variety of ways in mathematics. For example, they might be used to track a list of values, such as all the prime numbers between 1 and 100. They might also be used for vectors in two-dimensional and three-dimensional space or in calculations that involve sets and functions.

Tag » What Are Tuples In Database