Skip to content
Home

Tuple: ordered finite sequences in mathematics and computing

A tuple is a finite ordered list of elements. This article explains notation, properties, relations to sets and products, uses in mathematics, databases and programming, and common operations.

Overview

In mathematics, a tuple is a finite ordered collection of elements. It is often called an ordered list or finite sequence; the phrase finite sequence emphasizes that both order and length are fixed. Tuples are commonly written using parentheses, for example (1, 2) , or using angle brackets, for example ⟨1, 2⟩ , depending on context and author preference.

Notation and basic properties

An n-tuple is a tuple with exactly n components and is sometimes named by placing a numeral before the suffix "-tuple" (for example, a 2-tuple is a pair, a 3-tuple is a triple). Each position in a tuple is identified by its index, normally starting at 1 in mathematical contexts. Key properties of tuples include:

  • Order matters: (a, b) is generally different from (b, a) unless a = b.
  • Repetition allowed: the same element may appear multiple times, so (a, a, b) is a valid tuple distinct from (a, b).
  • Fixed length: an n-tuple has precisely n components; length is part of the tuple's identity.

Relation to other concepts

Tuples are closely related to Cartesian products: the Cartesian product of sets A1 × A2 × … × An is the set of all n-tuples whose i-th entry lies in Ai. This connection makes tuples useful for coordinatizing product spaces and for describing points in Euclidean space. Tuples differ from sets chiefly because sets ignore order and multiplicity, and they are distinct from multisets because multisets still disregard order; tuples are most like ordered multisets, retaining both multiplicity and sequence information (multiset captures only multiplicity).

Uses and examples

Tuples appear across mathematics and computer science. In algebra and geometry they represent coordinates, solutions of systems, and elements of product structures. In logic and type theory an n-ary relation is a set of n-tuples. In practical computing, tuples model fixed collections of values: database systems commonly call rows "tuples" (databases) and programming languages provide tuple types to group heterogenous values without creating a custom record type.

Tuples in programming and databases

Many languages support tuples in different ways. Some treat tuples as immutable, fixed-length heterogenous containers (for example, a two-element tuple of a string and a number). Others emulate tuples using arrays or record structures. In database theory a relation is defined as a set of tuples; each tuple corresponds to one row with a fixed set of attributes. Tuples therefore play a central role in schema design, query results, and constraints.

Operations, distinctions and notable facts

Common operations on tuples include indexing (access by position), projection (selecting a subtuple by specified positions), concatenation (joining two tuples to form a longer tuple), and equality testing (tuples are equal when they have equal length and equal components in corresponding positions). Tuples should not be confused with sequences that are infinite, or with lists in programming languages that may be mutable and variable in length. Historically, the idea of an ordered n-tuple grew from practices of naming pairs and triples; the general term and the notation for n-tuples provide a concise way to talk about fixed-size ordered data in both theoretical and applied contexts. For further reading on formal definitions and variants, see introductions in algebra and type theory resources (angle bracket notation and other conventions) and surveys on collection types in programming languages (mathematics, sequence).

The concise, position-aware nature of tuples makes them a fundamental construction when order and cardinality both matter.

Notation

An n-tuple is a collection of nmathematical objects x_{1},\ldots ,x_{n} in a list. Unlike sets, the objects do not necessarily have to be different from each other and their order is important. Tuples are usually represented by round brackets.

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

where two consecutive objects are separated by a comma. The object at the i ix_{i}position is called the i-th component of the tuple. Occasionally, other types of brackets, such as angle brackets or angle brackets, are used for notation:

{\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

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

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

Special designations for n-tuples with small 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, a 6-tuple also a sextuple. The series is continued analogously by Latin multiplication number words. The 0-tuple is called empty tuple and is ()notated by

Related articles

Author

AlegsaOnline.com Tuple: ordered finite sequences in mathematics and computing

URL: https://en.alegsaonline.com/art/102042

Share