Difference between revisions of "Ordered pair"

 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
An '''ordered pair''' is a pair of two objects, usually denoted <math>(x, y)</math>, in which we consider the order of the two objects to be important.  Thus, the ordered pair <math>(2, 3)</math> is different from the ordered pair <math>(3, 2)</math>.  This should be contrasted with the notion of [[set]] (or [[multiset]]), in which we have <math>\{2, 3\} = \{3, 2\}</math>.  In general, we say two ordered pairs, <math>(x, y)</math> and <math>(a, b)</math> are the same if and only if <math>x = a</math> and <math>y = b</math>.
 
An '''ordered pair''' is a pair of two objects, usually denoted <math>(x, y)</math>, in which we consider the order of the two objects to be important.  Thus, the ordered pair <math>(2, 3)</math> is different from the ordered pair <math>(3, 2)</math>.  This should be contrasted with the notion of [[set]] (or [[multiset]]), in which we have <math>\{2, 3\} = \{3, 2\}</math>.  In general, we say two ordered pairs, <math>(x, y)</math> and <math>(a, b)</math> are the same if and only if <math>x = a</math> and <math>y = b</math>.
  
The notion of an ordered pair can be naturally extended to that of an [[ordered tuple]].
+
The notion of an ordered pair can be naturally extended to that of an [[tuple|ordered tuple]].
  
{{stub}}
+
Order is necessary, when things aren't [[commutative property|commutative]]. Also assume we have a restriction in a problem, such that <math>a>b</math> at all times. In order to efficiently test possibilities, we should order <math>b</math> after <math>a</math> (to input its value into calculating the minimum b) in any programming or math. We don't waste time, to figure out already known impossible solutions, in this implementation.
 +
 
 +
==Formal Definition==
 +
In the language of set theory, it is not trivial to define an ordered pair since the set <math>\{a,b\}</math> and <math>\{b,a\}</math> are equivalent. Thus, the definition of an ordered pair <math>(a,b)</math> is the set <math>\{\{a\}, \{a,b\}\}</math> Through this definition, the pair <math>(a,b)</math> does not equal the pair <math>(b,a)</math> since the set <math>\{\{a\}, \{a,b\}\}</math> and <math>\{\{b\}, \{b,a\}\}</math> are not equivalent. However, for the ordered pair <math>(a,a)</math> the resulting set reduces to <math>{{a}}</math> (do you see why?). Thus reversing the positions of <math>a</math> in the ordered pair does not change the resulting set.

Latest revision as of 17:15, 29 August 2024

An ordered pair is a pair of two objects, usually denoted $(x, y)$, in which we consider the order of the two objects to be important. Thus, the ordered pair $(2, 3)$ is different from the ordered pair $(3, 2)$. This should be contrasted with the notion of set (or multiset), in which we have $\{2, 3\} = \{3, 2\}$. In general, we say two ordered pairs, $(x, y)$ and $(a, b)$ are the same if and only if $x = a$ and $y = b$.

The notion of an ordered pair can be naturally extended to that of an ordered tuple.

Order is necessary, when things aren't commutative. Also assume we have a restriction in a problem, such that $a>b$ at all times. In order to efficiently test possibilities, we should order $b$ after $a$ (to input its value into calculating the minimum b) in any programming or math. We don't waste time, to figure out already known impossible solutions, in this implementation.

Formal Definition

In the language of set theory, it is not trivial to define an ordered pair since the set $\{a,b\}$ and $\{b,a\}$ are equivalent. Thus, the definition of an ordered pair $(a,b)$ is the set $\{\{a\}, \{a,b\}\}$ Through this definition, the pair $(a,b)$ does not equal the pair $(b,a)$ since the set $\{\{a\}, \{a,b\}\}$ and $\{\{b\}, \{b,a\}\}$ are not equivalent. However, for the ordered pair $(a,a)$ the resulting set reduces to ${{a}}$ (do you see why?). Thus reversing the positions of $a$ in the ordered pair does not change the resulting set.