Notation for an interval when you don't know which bound is greater

5.4k Views Asked by At

Is there a notation in English written mathematics for $$\textit{the interval of all points lying between two real numbers $a$ and $b$}$$ when you don't know which of $a$ and $b$ is greater?

Which one is greater is completely irrelevant for what I am writing, and I would like to avoid making the text heavier as much as possible.


Suggestions that have been made so far that rely on external notions: $$[\min\{a,b\}, \max\{a,b\}]\qquad \operatorname{Conv}(a,b)$$

Suggestions for a brand new notation: $$(a,b]^*\qquad (\{a,b\}]\qquad (a\nearrow b]\qquad /a,b/\qquad \left(\begin{matrix}a\\b\end{matrix}\right]^\star$$

$^\star$ intervals open at the lower bound and closed at the higher bound, whichever of $a$ and $b$ they are.

Some other options:

  • Assume wlog that $a<b$
  • Make explicit that the notation $[a,b]$ doesn't imply $a<b$.
13

There are 13 best solutions below

8
On

Assuming you're meaning the closed interval for the notation I'm going to write, something that will always work is

$$[\min\{a,b\}, \max\{a,b\}]$$

Another possibility is

$$[a,b] \cup [b,a]$$

But I think that there is no standard notation, so you could create yours explaining it.

11
On

One possibility is $\operatorname{Conv}(a,b)$: the convex hull of $a$ and $b$. Maybe this should really be $\operatorname{Conv}(\{a,b\})$, but I think it is forgivable to omit the curly braces - or even to write $\operatorname{Conv}\{a,b\}$, which keeps it clear that order does not matter.

When $a,b \in \mathbb R$, this just gives us the closed interval $[a,b]$ or $[b,a]$; for points $a,b \in \mathbb R^n$, this gives us the line segment from $a$ to $b$.

It generalizes to $\operatorname{Conv}\{a,b,c\}$ which is the smallest closed interval containing all three of $a,b,c \in \mathbb R$, and so on.

1
On

When no convenient standard notation exists for something you need to use repeatedly, you are entitled to make up a new notation for it, for example $(a\nearrow b)$ or $[a\nearrow b]$. Another suggestion is $(\{a,b\})$ or $[\{a,b\}]$. The idea behind the first notation is that $a$ and $b$ are placed in a "rising" sequence, while in the second the braces indicate a neglect of the existing order of $a$ and $b$. Be warned, though, that people are critical of new notation; so choose it carefully!

7
On

Without loss of generality, let's assume $a<b$. Consider the interval $[a,b]$...


If that's not working, define some intuitive variable names like $m:=\min(a,b) , M:=\max(a,b)$, where $m$ stands for min, and $M$ stands for max.
Or use $l$ and $u$ for lower and upper, or $l$ and $h$ for low and high. As long as you couple it with a sentence, people will see the variables as acronyms for their intuitive meaning.

0
On

I have also seen, for example, $$\left(\begin{matrix}a\\b\end{matrix}\right]$$

used to before to denote an interval between $a$ and $b$, open for the lower limit, and closed for the upper limit, where either $a$ or $b$ could be larger.

Obviously it is not standard, and there are issues with open and closed intervals being confused with other meanings of the notations. But where the notation is explained and the context does not lead to confusion, it works.

1
On

Given you define your notation clearly and given you only need one type of these intervals (w.r.t. inclusion of the endpoints) and given you need it quite a lot, you can use $\mathopen{/}a,b\mathclose{/}$. While I haven't seen it in scientific papers, I saw it several times in lecture notes.

If you need it only couple times, spell things out properly as it doesn't make sense to use any special notation. Because frankly, there is no standard notation so any notation you "develop" will be special and strange for the readers.

0
On

You could use set comprehension, but be careful. English is ambiguous about which endpoint is smaller in a way that’s helpful here, but also about whether an interval is open or closed.

$$S = \left\{ x \in \mathbb{R} \mid \text{\(x\) is between \(a\) and \(b\), excluding[/including] the endpoints} \right\}$$

4
On

Intervals don't need to be ordered following the convention of the smaller number first and the larger second.

Often it is assumed that $y > x$. For purposes of mathematical structure, this restriction is discarded, and 'reversed intervals' where $y − x < 0$ are allowed.

https://en.wikipedia.org/wiki/Interval_(mathematics)
Also...

In mathematics, a (real) interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set.

The condition of "x lies between a and b" IS satisfied even when a > b.

So you can simply write $\{x : x ∈ [a,b]\}$

1
On

Probably, the simplest notation in this case is $I$ (together with some words):

Let $I$ be the interval of all points lying between $a$ and $b$. Then...

... Then, the interval $I$ of all points lying between $a$ and $b$ satisfies...

... Then ... where $I$ is the interval of all points lying between $a$ and $b$.

None of these sentences seems heavy. Instead, they seem are very simple and clear (in my opinion).

1
On

I would use simply $[a,b]$. Somewhere in your article (or whatever it is you are writing), you should write something to the effect of:

When $a\leq b$, we denote by $[a,b]$ the closed interval as usual. When $a>b$, our $[a,b]$ is what is typically denoted $[b,a]$. That is, in our notation $[a,b]=[b,a]\neq\emptyset$ for all $a,b\in\mathbb R$. (Or with $\mathbb R\cup\{-\infty,\infty\}$ if you want.)

It is good to have some redundancy to make the message go through. If you want have half-closed intervals or want the intervals to carry orientation (in addition to being sets) or something, you need to explain that as well.

There is no sufficiently universal standard, so you have to pick something reasonable and explain it. This is actually quite often the case in mathematics in my experience: you have to come up with new notations.

5
On

Define a mapping from points to intervals in the preliminary:

Let $I \colon \Bbb R^2 \to \mathcal{P}(\Bbb R)$ be defined as

$$I[a,b]=\begin{cases} [a,b] & \text{ if }a\leq b \\ [b,a] & \text{ otherwise.}\end{cases}$$

This is light in terms of notation, and it kind of speaks for itself. I believe that in most contexts, the majority of readers will understand what is meant even without going to check the precise definition in the preliminaries.

3
On

Coppel simply denotes it $[a,b]$, and defines this notation to mean the convex closure of $\{a,b\}$ as in Misha's answer. So I agree with Joonas Ilmavirta that this is a good option; just explain to the reader how you're using the notation and it'll all be fine.

Further comments:

There's an interesting connection here to the distance function

$$\mathbb{R} \times \mathbb{R} \rightarrow [0,\infty)$$ $$a,b \mapsto d(a,b) =|b-a|$$

and the "monus" function

$$\mathbb{R} \times \mathbb{R} \rightarrow [0,\infty)$$ $$a,b \mapsto b \mathbin{\dot -} a =\mathrm{max}(b-a,0).$$

In particular, under the usual definition where $$[a,b] = \{x \in \mathbb{R} : a \leq x \leq b\},$$ we have $$\int_{[a,b]} 1 = b \mathbin{\dot -} a.$$

Whereas under the convex hull definition where $$[a,b] = \{ax+by : x+y = 1, x \geq 0, y \geq 0\},$$ we have $$\int_{[a,b]} 1 = d(a,b).$$

I remark that there's a third possible definition of $[a,b]$ in which it's an oriented $1$-simplex (and consequently not a subset at all, but rather an equivalence class of functions $[0,1] \rightarrow \mathbb{R}$. This viewpoint on $[a,b]$ is used in some accounts of integration over differential forms. If $[a,b]$ is an oriented $1$-simplex, we find that $$\int_{[a,b]} 1 = b - a.$$ So this is closest to the high-school viewpoint in which switching the order of $a$ and $b$ switches the sign of the integral.

1
On

While I appreciate your goal to avoid sophistication than necessary, you might be a typical victim of obscurity. Because while you are trying to prevent a needless assumption on the ordering you are introducing a mental load on the reader with "an interval defined by two endpoints with no known preference".

However this is already the default stance of the reader. Nobody sets out to read $[a,b]$ as I wonder whether $a>b$?. In fact this is the reason why we use consecutive letters. Consider $[\beta, \Phi]$ it doesn't have the same effect does it? It has more certainty attached to it as if they were defined somewhere else and we are reading from the middle of a paragraph.

Hence if you want to keep things simple just use $\{a,...,b\}$ it is a set notation thus no ordering is needed per se and also it is a common enough construct which implies continuation from one to the other in some sense regardless of the order.