Textbooks write things like \{x : x > 0\} and expect you to picture the positive real line immediately. The notation is compact but genuinely unfamiliar the first time you meet it — you have to read "the set of all x such that…" and then hold the shape of the resulting region in your head. This page makes the jump visual: for every common set-builder rule, here is the slice of the number line it describes, shaded and labelled.

What the notation says

Set-builder notation has two parts separated by a colon (or a vertical bar in some textbooks):

\{x : P(x)\}

The left of the colon names a variable. The right states a condition P(x) — any statement with x in it that is either true or false. The notation reads as "the set of all x such that P(x) is true." The set it builds contains exactly those x for which the condition holds, and nothing else.

So \{x : x > 0\} is "the set of all real numbers x such that x is greater than zero" — the positive reals, the open ray from 0 to +\infty.

Rule → region: the gallery

The diagram below shows six common rules and the number-line region each one picks out. For each rule, an open circle (\circ) marks a boundary point that is excluded from the set; a filled circle (\bullet) marks one that is included.

Six set-builder rules translated into shaded regions of the number line Six horizontal number-line strips stacked vertically. Each strip is labelled with a set-builder expression on the left and shades the subset of the real line that the expression describes. Open circles mark boundary points that are excluded; filled circles mark boundary points that are included. {x : x > 0} 0 {x : x ≥ 0} 0 {x : −2 < x < 5} −2 5 {x : x² < 4} −2 2 {x : |x| ≥ 3} −3 3 {x : x ∈ ℤ, 0 ≤ x ≤ 4} 0 1 2 3 4 solid dot = included · open circle = excluded
Six rules, six regions. The last one is discrete — $\{0, 1, 2, 3, 4\}$ — because the condition "$x \in \mathbb{Z}$" restricts the variable to integers, so the set is five isolated points, not a continuous interval.

Decoding each line

\{x : x > 0\}. Every real x strictly greater than zero. This is the open ray (0, \infty). The circle at 0 is open because 0 itself does not satisfy x > 0.

\{x : x \geq 0\}. Every real x at or above zero. This is the closed ray [0, \infty). The circle at 0 is filled because the condition now allows equality.

\{x : -2 < x < 5\}. Every real x strictly between -2 and 5 — the open interval (-2, 5). Both boundary circles are open.

\{x : x^2 < 4\}. Every real x whose square is less than 4. Solving: x^2 < 4 \iff |x| < 2 \iff -2 < x < 2. So the set is the open interval (-2, 2). Why: taking square roots of the inequality x^2 < 4 introduces the absolute value because \sqrt{x^2} = |x|. Then |x| < 2 unpacks as -2 < x < 2.

\{x : |x| \geq 3\}. Every real x whose absolute value is at least 3. Unpacking: |x| \geq 3 \iff x \geq 3 or x \leq -3. So the set is the union (-\infty, -3] \cup [3, \infty) — two closed rays, with a gap in the middle.

\{x : x \in \mathbb{Z}, 0 \leq x \leq 4\}. An example with two conditions joined by a comma (read as "and"): x is an integer and x is between 0 and 4 inclusive. The result is the five-element set \{0, 1, 2, 3, 4\}. The extra "x \in \mathbb{Z}" filters the continuous interval down to integer lattice points.

The structure of every rule

Every set-builder expression has the same three ingredients, and once you name them the rest is translation:

  1. The variable. Usually x, sometimes y, n, or something else. It is a placeholder that ranges over some universe.
  2. The universe. What type of object can x be? Real numbers, integers, complex numbers, pairs, points in a plane, other sets? The universe is either declared explicitly (as in "x \in \mathbb{Z}") or implied by context (an algebra chapter usually means x \in \mathbb{R}).
  3. The condition. The predicate P(x) that picks out which x belong to the set. Any unambiguous statement with x in it is legal.

Read a set-builder expression in three steps: "Take all x from the universe. Keep the ones where the condition is true. Throw the rest away." What is left is the set.

Why set-builder is worth learning precisely

It is compact. It is language-independent. It works for sets whose elements cannot be listed — \{x : x > 0\} has uncountably many elements, and you cannot write them one at a time, but a single rule captures all of them cleanly.

More importantly, it is how every serious mathematical definition is written once you leave early chapters of school algebra. Solutions to an equation are often phrased "the set of all x such that…" Fields, vector spaces, probability events — all are defined with the same pattern. Learning to read the notation fluently is learning to read mathematics.

A quick check

What does \{n \in \mathbb{N} : n \text{ is even}\} mean? Read it: "The set of all natural numbers n such that n is even." That is \{2, 4, 6, 8, \ldots\} — infinitely many elements, but describable in a single rule.

What about \{x \in \mathbb{R} : x^2 = -1\}? Read it: "The set of all real x such that x^2 = -1." But no real number squared is negative, so no x satisfies the condition. The set is the empty set, written \varnothing or \{\}. The notation still works — it just produces a set with zero elements.

Set-builder is not scary once you see it as a recipe. Name the variable, state the universe, write the condition, trust the rule. The result is exactly the set you asked for.

Related: Sets - Introduction · Nested Number Sets: The Russian Doll of N ⊂ Z ⊂ Q ⊂ R · Number Systems · Absolute Value Inequalities