Here is the rule, the one you want stuck in your head before any example, diagram, or edge case:

Square bracket [ or ] = the endpoint is in the set. Round bracket ( or ) = the endpoint is out of the set.

That is the whole story. Every subtlety below is a consequence of that. If you get stuck, fall back here and re-derive.

Read the bracket, decide the endpoint

When you see an interval, read it left to right and check each bracket separately — they are independent.

Each side of an interval answers a yes-or-no question: "is this number itself in the set?" The bracket is the answer.

The four combinations, concretely

Let us use the endpoints 2 and 5 so we can check whether specific numbers belong.

In all four cases the "body" of the interval — every number strictly between 2 and 5 — is the same. Only the fate of the endpoints 2 and 5 differs.

The number-line picture: filled circle vs hollow circle

Interval notation has a one-to-one translation to a drawing on the number line. Brackets map to circle styles:

This picture is the one that carries the intuition. A filled dot is a stop sign saying "you are here, you belong." A hollow dot is a warning saying "you may approach but not enter."

Four intervals between 2 and 5 with the bracket and circle conventionsFour horizontal number lines stacked vertically, each showing the interval from 2 to 5. Row one is closed 2 to 5, both endpoints drawn as filled circles with a thick segment between. Row two is open 2 to 5, both endpoints drawn as hollow circles. Row three is 2 inclusive to 5 exclusive, filled circle at 2 and hollow circle at 5. Row four is 2 exclusive to 5 inclusive, hollow circle at 2 and filled circle at 5. The interval notation is labelled at the left of each row. [2, 5] 2 5 (2, 5) 2 5 [2, 5) 2 5 (2, 5] 2 5
Filled circle = square bracket = endpoint included. Hollow circle = round bracket = endpoint excluded. The segment between them is the same in all four rows; only the endpoints change character.

Infinities always get a round bracket

One extra rule, the one that trips up almost everyone at some point:

\infty and -\infty always get a round bracket. Never a square one.

So you write (-\infty, 3], not [-\infty, 3]. You write [7, \infty), not [7, \infty].

The reason: a square bracket means the endpoint is included in the set, and for that to make sense the endpoint must be an actual real number. \infty is not a real number — it is shorthand for "no bound on this side, the interval just keeps going." There is nothing to include. Writing [\infty] would claim you are including the number infinity, and no such number exists on the real line.

So (-\infty, 3] reads: "x can be as negative as you like — no lower wall — and on the right, x is at most 3, including 3." That is x \le 3.

The interval from negative infinity to 3 inclusiveA number line with an arrow pointing left from the leftmost point to indicate it continues forever, and a filled circle at 3 on the right with a thick segment connecting the arrow to the filled circle. The interval notation negative infinity comma 3 closed is labelled above, and below it the inequality x less than or equal to 3. (−∞, 3] means x ≤ 3 3 −∞
$(-\infty, 3]$: the left side is a round bracket because $-\infty$ is not a real number you can include. The right side is a square bracket because $3$ is a real number and the inequality $\le$ does include it. On the picture, the arrow never ends (hence round bracket) and the $3$ is a filled dot (hence square bracket).

Does the inequality tell me which bracket?

Yes — the bracket is the notation version of the inequality symbol. The translation is tight:

Inequality Bracket on that side Circle
< or > (strict) round ( or ) hollow
\le or \ge (non-strict, "or equal") square [ or ] filled

If you can write the solution of an inequality as a phrase — "x is strictly less than 5" versus "x is less than or equal to 5" — you can read off the bracket. The word strictly is your round-bracket word. The phrase or equal to is your square-bracket phrase.

So x \ge 2 becomes [2, \infty): the 2 is included (square), and there is no finite upper endpoint (round, round — against infinity, always round).

And -1 < x \le 4 becomes (-1, 4]: strict on the left (round), non-strict on the right (square).

A quick self-test

If any of those slipped, re-read the one-line rule at the top and try again.

Why the convention is this way

A square bracket [ has a vertical bar — a solid wall that includes the point sitting against it. A round bracket ( is smooth and open at the end — a curtain the endpoint slips past. The shape mimics the behaviour.

For a hands-on feel — drag the endpoints, toggle each bracket, watch the notation update live — open Interval Builder: Drag Endpoints, Toggle Open-Closed, Watch the Notation. And for the full theory of solving inequalities, head back to Intervals and Inequalities Preview.