# Reference a single element within a set

Is there a notation to reference a single element within a set? Let's say I have a set n = {1, 2, 4, 8, 16}. If I wanted to use a single element from this set, is there a certain notation to do so? In computer programming, if I have an array int x = {1, 2, 4, 8, 16} I could reference the third element by calling on x[2], and x[2] is equal to 4 (in programming, arrays are zero indexed). Would it be the same in mathematics?

-

## migrated from mathoverflow.netJul 12 '13 at 11:53

This question came from our site for professional mathematicians.

Sets are not ordered. $\{1,2\}=\{2,1\}$. There is no "first element". If you talk about a sequence, instead, then it is indexed like an array and then you would often write $x_n$ for the $n$-th member of the sequence $x$. –  Asaf Karagila Jul 12 '13 at 11:12
Also, MathOverflow is a site for research level mathematics. This is completely off-topic for the site and I have voted to migrate it to math.SE which is a better fit for this sort of question. –  Asaf Karagila Jul 12 '13 at 11:13
I wasn't aware, I apologize. So I suppose what I am talking about is a sequence, not a set, and I could denote a single element with a subscript? Thank you –  WillumMaguire Jul 12 '13 at 11:14
If you're not sure, it's perfectly fine to write "We denote by $x_n$ the $n$-th element of the sequence $x$". Clarity is better than brevity. –  Asaf Karagila Jul 12 '13 at 11:17
Again, thank you. I'm new to the site, so I wasn't aware there were several different math related sub-domains. I found a way to calculate the sum of the elements of a diverging infinite geometric sequence, and the equation calls for the first element of the sequence –  WillumMaguire Jul 12 '13 at 11:21

## 2 Answers

Sets are not ordered. $\{1,2\}=\{2,1\}$. There is no first element. If you talk about a sequence, instead, then it is indexed like an array and then you would often write $x_n$ for the $n$-th member of the sequence $x$.

If you're unsure that everyone will understand this notation, it's perfectly fine to write "We denote by $x_n$ the $n$-th element of the sequence $x$". Clarity is better than brevity.

-

Since sets are not ordered, the only way to reference a specific element of a set is by a property that only that one element of the set has. For example in your set $S=\{1,2,4,8,16\}$, you could make use of the fact that the set contains natural numbers, and that there's a total order to the natural numbers, so you could e.g. refer to the $4$ as "the third-smallest element". Or you could refer to the $2$ as "the prime number".

Of course in your specific set, you've got powers of two, so you can just refer to the element by the value directly, e.g. by $2^n$ for the $n$-th largest element.

A typical specification of a specific element in a set is the one of the neutral element $e$ of a group $G$, which is defined as the unique element for which $eg=ge=g$ for all $g\in G$.

If you need a specific order independent of the natural properties of the elements, a set is not what you want, instead you want a sequence. A sequence is basically the mathematical equivalent to an array: You "address" each element by its index. For example, your array would correspond to the sequence $a = (2^n)_{n\in\{0,1,2,3,4\}}$. Then $a_n=2^n$ . Unlike for arrays, you don't have a memory limitation, therefore you can also define infinite sequences, like $b = (2^n)_{n\in\mathbb N}$.

-