Primary
Tuple ○꠹|Definition|1st|20251119205401-00-⌔
Tuple
In mathematics, a tuple is a finite sequence (or ordered list) of numbers. More generally, it is a sequence of mathematical objects, called the elements of the tuple. An n-tuple is a tuple of n elements, where n is a non-negative integer. There is only one 0-tuple, called the empty tuple. A 1-tuple and a 2-tuple are commonly called a singleton and an ordered pair, respectively. The term “infinite tuple” is occasionally used for “infinite sequences”.
Tuples are usually written by listing the elements within parentheses ”()” and separated by commas; for example, (2, 7, 4, 1, 7) denotes a 5-tuple. Other types of brackets are sometimes used, although they may have a different meaning.1
An n -tuple can be formally defined as the image of a function that has the set of the first n natural numbers as its domain (1, 2,…, n). Tuples may be also defined from ordered pairs by a recurrence starting from an ordered pair; indeed, an n -tuple can be identified with the ordered pair of its (n − 1) first elements and its n th element, for example, .
In computer science, tuples come in many forms. Most typed functional programming languages implement tuples directly as product types,2 tightly associated with algebraic data types, pattern matching, and destructuring assignment.3 Many programming languages offer an alternative to tuples, known as record types, featuring unordered elements accessed by label.4 A few programming languages combine ordered tuple product types and unordered record types into a single construct, as in C structs and Haskell records. Relational databases may formally identify their rows (records) as tuples.
Tuples also occur in relational algebra; when programming the semantic web with the Resource Description Framework (RDF); in linguistics;5 and in philosophy.6
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original Footnotes
Square brackets are used for matrices, including row vectors. Braces are used for sets. Each programming language has its own convention for the different brackets. ↩
“Algebraic data type - HaskellWiki”. wiki.haskell.org. ↩
“Destructuring assignment”. MDN Web Docs. 18 April 2023. ↩
“Does JavaScript Guarantee Object Property Order?”. Stack Overflow. ↩
Matthews, P. H., ed. (January 2007). “N-tuple”. The Concise Oxford Dictionary of Linguistics. Oxford University Press. ISBN 9780199202720. Retrieved 1 May 2015. ↩
Blackburn, Simon (1994). “ordered n-tuple”. The Oxford Dictionary of Philosophy. Oxford guidelines quick reference (3 ed.). Oxford: Oxford University Press (published 2016). p. 342. ISBN 9780198735304. Retrieved 2017-06-30. ordered n-tuple[:] A generalization of the notion of an […] ordered pair to sequences of n objects. ↩
Secondary
• • •