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

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$.
• I don't believe there's a standard notation for this - I've often wished there were. – David C. Ullrich Jun 8 '18 at 15:25
• If it is irrelevant which one is greater, why don't you just assume $a \leq b$ (without loss of generality)? – Ricardo Buring Jun 8 '18 at 15:42
• @RicardoBuring they are not just variables, I used $a$ and $b$ here for the sake of simplicity, but they are defined independently. But yes in some contexts that would be a good option. – Arnaud Mortier Jun 8 '18 at 15:48
• I guess that $\,\{\lambda a + (1-\lambda)b \mid \lambda \in [0,1]\}\,$ would also count as too heavy. – dxiv Jun 8 '18 at 16:11
• @dxiv Your guess is correct :-) – Arnaud Mortier Jun 8 '18 at 16:18

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.

• Also nice, especially when you have a lot of points. But for two points there ought to be something shorter, like $\left<a,b\right>$. – Arnaud Mortier Jun 8 '18 at 15:54
• In my experience, $\langle a,b\rangle$ refers to the inner product of $a$ and $b$, which $(a,b)$ also gets used for sometimes. (Or, in other context, to the ideal generated by $a$ and $b$, which $(a,b)$ also gets used for sometimes.) We just don't have enough kinds of brackets to be collision-free. If I were going to pick a bracket to use here, I'd just redefine $[a,b]$. – Misha Lavrov Jun 8 '18 at 18:21
• @MishaLavrovand $(a,b)$ is also the gcd. And the inner product is also $\langle a|b\rangle$ or $a^{\mathsf T}b$. Also $(a,b)$ could be simply the vector. Or a tuple. Or wait, the vector could also be $[a,b]$. Nono, that's the interval. Or was it something else? – yo' Jun 9 '18 at 7:03
• It would need to be $\operatorname{int}\operatorname{conv}\{a,b\}$ for the open interval. But how would you adapt this approach to a half-open interval? – John Bentin Jun 9 '18 at 8:17
• You might know (say) that the right (upper) end is open, without knowing whether that end is the location of $a$ or of $b$. – John Bentin Jun 9 '18 at 21:01

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.

• (+1) It does work, but it still feels heavier than necessary. – Arnaud Mortier Jun 8 '18 at 15:27
• How about $[a,b] \cup [b,a]$? – Santiago Canez Jun 8 '18 at 15:32
• @SantiagoCanez That is a bit confusing - I'd spend time wondering what you meant with that – Ant Jun 8 '18 at 16:36
• @Javi Be careful, in the projective space, $[b,a]=\overline{\mathbb{R}}\setminus (a,b)$, so this is ambiguous to some extent. – yo' Jun 8 '18 at 18:03
• @ArnaudMortier A little heaviness might be appropriate here because it's an uncommon thing to express and you don't want the reader to miss it. – Owen Jun 10 '18 at 4:01

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.

• This was suggested in the comments; unfortunately, you can't always do this, for instance when $a$ and $b$ are defined externally and assuming wlog that $a<b$ doesn't really make sense. – Arnaud Mortier Jun 8 '18 at 16:50
• @ArnaudMortier It's fine, isn't it? The point is that if, in fact, $a>b$, the argument is identical except for swapping the roles of $a$ and $b$. That's exactly why it's without loss of generality. – David Richerby Jun 10 '18 at 12:35
• @DavidRicherby I guess it would be fine in a number of situations, but sometimes you're in the middle of a technical argument and it doesn't feel natural that you need to pause that much for a point that is by nature irrelevant. – Arnaud Mortier Jun 10 '18 at 13:13
• @ArnaudMortier you said ‚Which one is greater is completely irrelevant...‘. If it is irrelevant you can assume WLOG a<b (it is just renaming). And in case it is not irrelevant you‘ll have to go through the case distinction anyway. If you think it is non-obvious why it is irrelevant, you can throw in why the argument is symmetrical for b<a. Anyway: for the question as asked this is clearly the answer. WLOG a<b is exactly like saying ‚it is irrelevant‘. If the names a and b where already used (‚defined externally‘ as you say) then consider using new variable names to avoid confusion. – dingalapadum Jun 10 '18 at 13:27
• @dingalapadum The argument does not depend on which of $a$ and $b$ is greater. Nothing depends on that. Which is why it feels wrong to spend any amount of time discussing it. The dream would be to have something like $/a,b/$ that was suggested which anyone would understand and wouldn't require unnecessary reading time, but apparently this is just a dream. – Arnaud Mortier Jun 10 '18 at 13:35

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!

• Thanks. I like these suggestions for their clarity and concision. – Arnaud Mortier Jun 8 '18 at 16:10

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.

• This is absolutely what I would do. If I were working in something other than $\mathbb{R}$ the suggestion $\{ta + (1-t)b\}$ would work, but here there is already a notation for an interval, and if $b>a$ the notation $[a, b]$ has only two reasonable meanings: either it's $[b, a]$ or is the empty set. In most contexts I imagine it's already clear which of the meanings is intended, and an explanation will clear up any potential ambiguity if needed. – Brevan Ellefsen Jun 9 '18 at 18:31

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).

• This would work in other cases but sometimes, incl. the situation I'm in, you just don't want to spend time discussing a notation that should be straightforward in the middle of a computation that is already complicated, to focus on what really matters. – Arnaud Mortier Jun 8 '18 at 22:33

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.

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.

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.

• Defining $[a,b]$ as an equivalence class of functions $[0,1] \to \mathbb R$ seems a tad upsetting when someone asks "so what is $[0,1]$?" – Misha Lavrov Jun 15 '18 at 14:17
• @MishaLavrov haha good point. – goblin Jun 16 '18 at 4:23
• Perhaps the correct answer is "overloaded notation" :) – goblin Jun 16 '18 at 4:23

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.

• Depending on your audience, you may as well define $I(a,b)=\{t \, a + (1-t) \,b\}$ where $a,b$ are elements of the same vector space. So you catch directly the general case. – Hello Jun 9 '18 at 18:02
• I'd prefer the other arrow between the sets, though. – Andreas Rejbrand Jun 9 '18 at 21:58
• @AndreasRejbrand Yes, $\to$ instead of $\mapsto$ is the correct version in such a case. – Arnaud Mortier Jun 9 '18 at 22:50
• I like this idea, although I think I would prefer to use $I[a,b]$, leaving open the possibility of using $I(a,b)$ for the corresponding open interval. – Especially Lime Jun 10 '18 at 8:27
• @ArnaudMortier Of course, this is a typo.... – Hello Jun 10 '18 at 8:30

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.

• Nice one. It was not my intention here to develop something new, I was more hoping for an existing notation. – Arnaud Mortier Jun 8 '18 at 18:05

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.

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]\}$

• As I understand it, this is rather used when considering the set of all intervals as a whole endowed with a mathematical structure, in which case it does not necessarily seem natural to restrict to one half of the plane $\Bbb R\times \Bbb R$. – Arnaud Mortier Jun 8 '18 at 18:27
• I've had professors who simply used the same notation $[a,b]$, regardless of which one of $a$ or $b$ was greater; so for example $[5,3]$ was considered as totally acceptable and equivalent to $[3,5]$. I don't know if they used this anywhere other than lecture notes though. – Arnaud D. Jun 8 '18 at 19:25
• This. It doesn't really matter which externally defined a or b is larger, the notation [a,b] implies that the interval exists and that, so far as expressing the interval is concerned, the local ab. That is, you may reorder in your head to instruct a proper interval. You would only need to be more pedantic if you were actually constructing the interval with a dumb processing object, like a computer. – Dúthomhas Jun 8 '18 at 19:52
• The article is saying that writing $[a,b]$ when $a<b$ is allowed; it later goes on to say "when $a>b$, [this notation is] usually taken to represent the empty set". That's the usual convention. You can always declare that you're going against this convention and define $[a,b] = [b,a]$ to be the same interval, but this is not too different from defining new notation. – Misha Lavrov Jun 8 '18 at 20:08

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.

• I have to say I'm not convinced by $\{a,\ldots,b\}$, because it feels a lot like a finite set, maybe even more than $[a,b]$ makes you feel like $a<b$. But I take your point that you don't want to put extra mental load on the reader. – Arnaud Mortier Jun 11 '18 at 13:04

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\}$$