We say that a group $(A, \cdot)$ is bi-orderable if there exists a total order $\preceq$ on $A$ such that $xz \prec yz$ and $zx \prec zy$ for all $x,y,z \in A$ with $x \prec y$.
Let $m,n$ be non-zero integers, and let ${\rm BS}(m,n)$ denote the Baumslag-Solitar group $\langle a, b \mid a^{-1} b^m a = b^n\rangle$. I was happily surprised to learn from Yves Cornulier (see herehere) that ${\rm BS}(1,n)$ is bi-orderable for $n \ge 1$, which naturally leads to the following:
Q1. Is there a ``nice'' characterization of those pairs $(m,n)$ such that ${\rm BS}(m,n)$ is bi-orderable?
E.g., ${\rm BS}(m,n)$ is not bi-orderable if $mn < 0$ (wlog, say that $1 \prec b$. Then, $b^{-1} \prec 1$, with the result that $ 1 \prec a^{-1} b^m a$ and $b^n \prec 1$ for $m > 0$, and dually $a^{-1} b^m a \prec 1$ and $1 \prec b^n$ otherwise) or $m = n \ge 2$ (wlog, say that $ab \prec ba$. Then, $a^n b \prec a^{n-1} b a \prec \cdots \prec aba^{n-1} \prec ba^n$). But what about the other cases?
Update on Q1. The question has been completely answered: ${\rm BS}(m,n)$ is bi-orderable if and only if $mn > 0$ and $\min(|m|,|n|) = 1$. For details, see Yves' answer belowYves' answer below.
On a related note, let ${\rm D}(m,n)$ be the two-generator one-relator group $\langle a, b\mid a^{-1} b a^m = b^n\rangle$. This is sort of a variant of ${\rm BS}(m,n)$, and, while different in many ways, I'd like to know if both have a similar behavior as for orderability (by the way, does ${\rm D}(m,n)$ have a conventional name, so that I can look for references by myself?). In particular:
Q2. Is there a ``nice'' characterization of those pairs $(m,n)$ such that ${\rm D}(m,n)$ is bi-orderable?
In fact, ${\rm BS}(1,n) = {\rm D}(1,n)$, so the above (and, especially, Yves' argument) proves that ${\rm D}(1,n)$ is bi-orderable if and only if $n \ge 1$. But what about the other cases? E.g., is ${\rm D}(n,n)$ bi-orderable for $n \ge 2$?
HereHere is a question similar to Q1 (with total orders replaced by partial ones).