You can make a list. Put things in a row. The order of the list matters. It helps us keep track. We use lists every day. Do you like making lists?
Imagine making a list of numbers. In math, this list is called a tuple. The order of the numbers is very important. If you change the order, the list changes too.
You can have a list with just one number. We call that a singleton. A list with two numbers is an ordered pair. A list with three numbers is a triple.
Some lists have no numbers at all. We call that an empty tuple. Tuples can also hold many different things. They do not have to be just numbers. Math uses these lists to keep things in order.
Imagine you are making a list of items. In math, this list is called a tuple. A tuple is a set of things in a specific order. The order is very important. If you swap the items, it becomes a new list.
Tuples can hold many different things. They do not have to be just numbers. They can hold any math objects. We call these objects elements.
A tuple with one element is a singleton. A tuple with two elements is an ordered pair. A tuple with three elements is a triple. You can even have a tuple with zero elements. We call this the empty tuple.
Tuples are different from sets. In a set, the order does not matter. In a set, you cannot have the same item twice. But in a tuple, you can repeat items. For example, a tuple could be (1, 1).
Computer scientists use tuples too. They use them to store data in a specific way. Some computer programs use records instead. Records are like tuples, but the order does not matter. In those cases, you use labels to find your items.
Imagine you are making a precise list of items. In math, this special list is called a tuple. A tuple is a finite sequence of mathematical objects. We call these objects the elements of the tuple. The order of these elements is very important. If you change the order, you change the tuple itself.
Tuples can be many different sizes. A tuple with zero elements is called an empty tuple. A tuple with one element is called a singleton. If it has two elements, it is an ordered pair. A three-element tuple is known as a triple. We use the letter n to describe a tuple with n elements. For example, a 5-tuple has exactly five elements. You usually see them written inside parentheses with commas between them.
This idea comes from old languages. The names for tuples come from Latin numbers. We use words like single, double, triple, and quadruple. These words use prefixes from Latin to show how many parts there are. The suffix -tuple is used for any number of elements. Long ago, people used the word -ple to mean "folded." This is why we say triple or quadruple today.
Tuples have rules that make them different from sets. In a set, the order does not matter. In a tuple, the order is everything. A set also cannot have the same item twice. A tuple can have many copies of the same element. For example, the tuple (1, 1) is allowed. You can also find tuples in computer science. Relational databases often call their rows tuples.
Math uses tuples to represent many complex things. A complex number can be a 2-tuple of real numbers. A quaternion is a 4-tuple of numbers. An octonion is an 8-tuple. Even a sedenion is a 16-tuple. These are all ways to group numbers together in a specific order. This helps mathematicians and computer scientists organize information clearly.
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.
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
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.