Nepedia
Back to Discover
Advanced Reader
🔢

Tuple

math Maturity 11-13 Next article →

In mathematics, a tuple is a finite sequence of mathematical objects. These objects are known as the elements of the tuple. You can think of a tuple as an ordered list where the position of each item matters. Because the order is strict, a tuple is different from a set. In a set, the order of items does not change the set itself. In a tuple, changing the order creates a brand new tuple.

Tuples are categorized by the number of elements they contain. A tuple with zero elements is called an empty tuple, or sometimes a null tuple. A tuple with one element is called a singleton. A 2-tuple is commonly known as an ordered pair. A 3-tuple is called a triple or a triplet. The number of elements in a tuple is denoted by the letter n. Therefore, an n-tuple is a sequence containing n elements.

Mathematicians use several ways to define a tuple formally. One method defines an n-tuple as the image of a function. This function uses the set of the first natural numbers as its domain. Another method uses set theory to build tuples from nested ordered pairs. This approach is recursive, meaning it builds larger tuples from smaller ones. For example, an n-tuple can be seen as an ordered pair consisting of its first entry and an (n-1)-tuple.

The history of the term involves Latin and Greek linguistic roots. The names for different sized tuples come from Latin prefixes for numbers. We use words like single, double, triple, quadruple, and quintuple. Originally, these used the suffix -ple, which meant "folded." This comes from the Latin word "plus," meaning "more." Over time, the suffix changed to -tuple to create a general way to describe any number of elements.

Tuples are essential for representing complex number systems. A complex number can be represented as a 2-tuple of real numbers. Quaternions are represented as 4-tuples. Octonions are 8-tuples, and sedenions are 16-tuples. In discrete mathematics, n-tuples are used in counting problems. If you have a set with k elements, the number of possible n-tuples is k to the power of n.

In the field of computer science, tuples appear in many different forms. Most typed functional programming languages implement tuples as product types. These are closely linked to algebraic data types and pattern matching. Many languages also offer record types as an alternative to tuples. While tuples are ordered, record types contain unordered elements that are accessed by labels. Some languages, like C or Haskell, combine both into a single construct.

Beyond pure math and coding, tuples are used in many other disciplines. Relational databases formally identify their rows, or records, as tuples. This concept is also used in relational algebra. In the digital world, tuples appear when programming the semantic web using the Resource Description Framework (RDF). They are also studied in the fields of linguistics and philosophy to organize structured information.

499 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.