Can betweenness be defined in terms of collinearity? Consider the space $\mathbb{R}^n$ for $n \geq 2$. We can consider two structures on that space. The first is betweenness, which is a ternary predicate that tells us when one point is strictly between two other points. The second is collinearity, which is a ternary predicate that applies precisely when three points are distinct and collinear. Now, certainly, collinearity can be defined in terms of betweenness. Can betweenness be defined in terms of collinearity?
 A: Yes. The idea is this: Using the colinearity relation, we can define the relation $R(A,B,Z)$ which says "$Z$ lies on the ray which begins at $A$ and extends through $B$". Then the betweenness relation $B(A,B,Z)$ which says "$Z$ is strictly between $A$ and $B$" is defined by $Z\neq A\land Z\neq B\land R(A,B,Z)\land R(B,A,Z)$.
To define $R$, we note that for any two points $A$ and $B$, the line $L_{AB}$ through $A$ and $B$ can be viewed (by a linear transformation) as a copy of the real line, with $A = 0$ and $B = 1$, so the ray extending from $A$ through $B$ is the positive real line. Then multiplication on this copy of $\mathbb{R}$ can be carried out by a "straightedge construction", every step of which is definable using colinearity. For this construction, we need a third point $C$ not on the line through $A$ and $B$, as an extra parameter. But any $C$ not on the line will do, so we can quantify out this parameter (incidentally, this explains why the construction doesn't work in $\mathbb{R}^1$). Because a real number is $\geq 0$ if and only it is a square, a point $Z$ satisfies $R(A,B,Z)$ if and only if it is a square for this definable multiplication operation.
Here are the details:

*

*Let $C(x,y,z)$ be the colinearity relation.


*Given distinct points $A$ and $B$, we can define the unique line $L_{AB}$ containing $A$ and $B$ by $L(A,B,x): C(A,B,x)\lor (x = A)\lor (x = B)$.


*Given four coplanar points $A$, $B$, $A'$, $B'$ with $A\neq B$ and $A'\neq B'$, we can define when the lines $L_{AB}$ and $L_{A'B'}$ are parallel by $P(A,B,A'B'): (L(A,B,A')\land L(A,B,B'))\lor \lnot\exists x\,  (L(A,B,x)\land L(A',B',x))$.


*Given five coplanar points $A,B,A',B',C$ with $A\neq B$ and $A'\neq B'$ and such that $L_{AB}$ and $L_{A'B'}$ are not parallel, we can define the (unique) point $D$ on $L_{AB}$ such that $L_{CD}$ is parallel to $L_{A'B'}$ by $I(A,B,A',B',C,x): L(A,B,x)\land P(C,x,A',B')$.


*Given distinct points $A,B$, a point $X$ on $L_{AB}$, and a point $C$ not on $L_{AB}$, note that $A,B,C,X$ are coplanar. We define $Y$ to be the point on $L_{AC}$ such that $L_{XY}$ is parallel to $L_{BC}$, and we define $Z$ to be the point on $L_{AB}$ such that $L_{YZ}$ is parallel to $L_{XC}$. $Z$ is definable by $S(A,B,C,X,z): \exists y (I(A,C,B,C,X,y)\land I(A,B,X,C,y,z))$.


*Now the point is that if $A,B,C,X,Y,Z$ are as in the above construction, then the triangle $ABC$ is similar to the triangle $AXY$, and under this similarity, the point $X$ corresponds to the point $Z$. Let's normalize to assume that the distance $AB$ from point $A$ to point $B$ is equal to $1$. Then, for example, $AX > 0$ if $X$ lies along the ray extending from $A$ through $B$, and $AX < 0$ if $X$ lies along the ray extending from $A$ away from $B$.


*It follows from the similarity that $\frac{AX}{AB} = \frac{AZ}{AX}$, so $AZ = (AX)^2$. In particular, $AZ \geq 0$. And conversely, for any point $Z$ with $AZ\geq 0$, we can obtain $Z$ from the above construction by picking $X$ so that $AX = \sqrt{AZ}$.


*Given $A\neq B$ and $C$ not on $L_{AB}$, the above discussion implies that $Z$ lies on the ray extending from $A$ through $B$ if and only if there exists $X$ on $L_{AB}$ such that $S(A,B,C,X,Z)$. But now we can observe that this condition is independent of the choice of $C$, so we can quantify it out. It follows that $R(A,B,Z)$ is definable by $A\neq B\land \exists C(\lnot L(A,B,C)\land \exists X\, S(A,B,C,X,Z))$.
