Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am learning sets. I have seen preposition like {2x|P(x)}. I wanted to ask what does 2x mean here? I would be thankful if someone could make it simple to understand. Thanks.

share|cite|improve this question
Just as a comment, you should be aware that a "collection of elements" described in such manner is not necessarily a set-- see e.g. . However, if in this case you are thinking of $x\in \mathbb{R}$, then this set exists, but to be sure it exists you should write it as $\{y\in \mathbb{R}: \exists x (x\in \mathbb{R} \wedge y=2x \wedge P(x))\}$ and use the fact that $\mathbb{R}$ exists and the comprehension axiom-- see: – Bruno Stonek Jul 11 '11 at 15:58
I don't understand your objection (the latex in it was ill-rendered). Are you objecting to the use of $x\in \dots$? Think that a priori $2x$ doesn't have a meaning. For example, if $x$ is a color, such as red, what does $2x$ mean? It does have a meaning if $x$ is an element of some mathematical structure that admits to "multiply an element by 2", for example a monoid, a group, a ring, a field, a vector space... Thus, in general set theory, a set $\{2x: P(x)\}$ (note that I am using $:$ instead of $|$: it is different notation for the same thing, see Bill's answer below) does not have.. – Bruno Stonek Jul 11 '11 at 23:58
meaning a priori, that is, unless the $x$ you are talking about are elements of a structure where "multiply by 2" makes sense: for example, the natural numbers $\mathbb{N}$, the real numbers $\mathbb{R}$, the continuous functions $\mathbb{R}\to \mathbb{R}$, etc. – Bruno Stonek Jul 11 '11 at 23:59
up vote 5 down vote accepted

This is known as set-builder notation. Here $\rm\:\{\:x\in S\::\:P(x)\:\}\:$ or $\rm\:\{\:x\in S\ |\ P(x)\:\}\:$ denotes the set of all $\rm\:x\in S\:$ satisfying $\rm\:P(x)\:.\:$ If no universe $\rm\:S\:$ is specified then it defaults to the ambient universe.

As in your example, the notation is sometimes functionally composed, e.g. in a context where $\rm\:n\:$ denotes an integer, $\rm\:\{\:n^2\::\:2\ |\ n\}\:$ is the set of all integers of the form $\rm\:n^2\:$ that are divisible by $\rm\:2\:$, i.e. the set of all even square integers. Note also the above use of $\::\:$ to avoid a possible clash with $|$ (meaning "divides") in number theory.

share|cite|improve this answer
Moreover, the "$\in S$" part is actually important. If you leave it out, you are doing unrestricted comprehension, which leads directly to Russel's paradox. – kahen Jul 11 '11 at 18:12
@kahen: unless $\{x\colon P(x)\}$ is already a set. – George Lowther Jul 11 '11 at 23:36

As it is written, I can guess that $p(x)$ is a rule on $x$ (e.g. $x^2-3x=0$). Then you take the set of all $2x$ (multiply $x$ by $2$) such that the rule holds for $x$.

share|cite|improve this answer

It might depend on what sets you're dealing with, but we can assume that we're just dealing with real numbers for now.

So suppose we are dealing only of subsets of the real numbers, and that P(x) is 'true' whenever x is of the form $4m + 1$ or $1 \mod 4$. Then whatever x satisfy that proposition, you multiply by 2. And that's your set.

So since 1, 5, 9, etc. satisfy P(x), 2, 10, 18, etc. will be the set.

share|cite|improve this answer
Should I think that first I have to check the conditions of the preposition and then mark them true for all multiples of 2? – Fahad Uddin Jul 11 '11 at 16:13
@fahad, I don't quite understand. Can you give me an example? You find the numbers that satisfy the property, and then multiply them by 2. – mixedmath Jul 11 '11 at 16:23
@fahad: No, the order in which you check the propositions is not relevant: $\{y:\exists x (y=2x \wedge P(x))\}=\{y: \exists x (P(x) \wedge y=2x\}$. In other words, conjunction is commutative. – Bruno Stonek Jul 11 '11 at 17:59

It means two times $x$. This could probably written in the context where $x$ is considered to be a number, a vector, an integer/real/complex valued polynomial/function, but not in general set theory though. I think you should just see it as an example. For instance, something like $$ \{ 2x \,|\, x > 3, x \in \mathbb R \} = \{ x \,|\, x \in \mathbb R, x > 6 \} $$ could be written and $P(x)$ would be $x > 3, x \in \mathbb R$.

share|cite|improve this answer
Hmm, tired. I actually thought about this deeply for about two minutes and reversed it. And then went to sleep. – Patrick Da Silva Jul 11 '11 at 18:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.