What is straight line?
I have found the definition of line in metric space.
It is general but has two problems. Considering about $\mathbb R^2$ equipped rectilinear distance, every line by this definition contains a rectangle and is not a string. Besides, it is possible 3 points in a line not collinear.
Here is what I have thought.
Let $<X,d>$ be any metric space.
Definition 0 Point $b$ is said between $a,c$ iff $d(a,b)+d(b,c)=d(a,c)$
Definition 1 A subspace $S$ of $X$ is collinear iff $\forall x\forall y \forall z[\mbox{exist one between the other two}]$
Definition 2 A subspace $L$ is called a line iff it is a maximal collinear subspace in $X$
Definition of collinear set is same as the previous if $|S|\le 3$ but different in otherwise. By this definition a collinear set is a collinear set by the previous definition but the converse is not valid.
According to this definition, it has 2 theorems.
Theorem 1 Every subset of a collinear set is collinear.
Theorem 2 Every collinear set can be extended to a line.
1 holds by definition whereas it does not hold by the previous definition.
2 also holds by the previous definition but requires Zorn's lemma by the current definition.
Hence a Corollary 3 Every set is collinear iff it is included in a line
Finally, by the current definition every line in $\mathbb R^2$ equipped rectilinear distance is actually a curve, no longer contains proper rectangles.
It looks better now. My question:Is it a precise definition?
It is a precise definition, but a global definition based on distance disagrees with the local concept of geodesic:
in spaces that are not geodesically complete (like the line or plane with some points removed), the line can have holes
the hole can be so large that a line contains only its two endpoints, as in the Euclidean upper half plane $y>0$ with with two $y=0$ points added on the boundary . The "line" between the two boundary points is those points and nothing else.
in spaces that have more than one geodesic between two points, such as a cylinder or torus, the collinearity requirement excludes geodesics that wrap many times
unions of line segments (with nonempty overlap between any two segments) do not satisfy collinearity for the multiply wrapped geodesics on a cylinder
geodesic loops, such as great circles on a sphere or latitudes on a cylinder, present the same problem, where all short enough arcs are metric lines, but the whole loop does not have the collinearity property.
So you say metric space and I think topology. lines in topology are usually defined by a function from the unit interval to the space. then you can say for any $x_{i}$ the same thing you said for b in defintion 0. I hope that helps.
The definition is valid. However, there are still some “very unusual” lines in the space ${\mathbb R}^2$ equipped with the rectilinear distance. For example, the set $\{(0,0),(1,0),(0,1),(1,1)\}$ is a line according to this definition (it is a maximal collinear set).
We can make your definition stronger as follows.
Definition 1. Let us say that a subspace $S$ of a metric space $(X, d)$ satisfies the $k$-collinear condition if for every points $x_1, \dots, x_k$ in $S$ there exist a permutation $\pi$ such that $$\sum_{i=1}^{k-1}d(x_{\pi(i)},x_{\pi(i+1)}) = d(x_{\pi(1)},x_{\pi(k)}).$$
Trivially, every set $S$ satisfies the 2-collinear condition. A set $S$ satisfies the 3-collinear condition precisely when it is collinear according to your definition. Clearly, if a set satisfies the $k$ collinear condition than it also satisfies the $k+1$-collinear condition (we can just let $x_{k+1} = x_k$). However, the set $\{(0,0),(1,0),(0,1),(1,1)\}$ satisfies the 3-collinear condition but not the 4-collinear condition. So in general the 4-collinear condition is strictly stronger than the 3-collinear condition.
Question. Can we get stronger and stronger conditions by increasing $k$? E.g., is 5-collinear condition even stronger than 4-collinear condition?
It turns out that $4$-collinear condition implies $k$-collinear conditions for all $k$. This, in particular, follows from the four-point characterization of tree metrics. This result can be restated as follows:
A set $S$ satisfies the 4-collinear condition if and only if there is an isometric embedding $$\phi:S \hookrightarrow{\mathbb R},$$ i.e. there is a map $\phi:S\to\mathbb R$ s.t. $d(x,y) = |\phi(x) - \phi(y)|$ for every $x$ and $y$ in $S$.
Similarly to your definition, we give the following definition of a line.
Definition 2. A subspace $S$ of a metric space $(X, d)$ is a line if it is a maximal subspace of $(X,d)$ satisfying the 4-collinear condition.
Now every line $S$ in a Banach space (in particular, in ${\mathbb R}^2$ equipped with the rectilinear distance) is a curve. Moreover, there is a natural parametrization $\gamma(t)$ of $S$ ($\gamma:{\mathbb R} \to S$) such that $d(\gamma(s), \gamma(t)) = |s-t|$ for every $s,t\in \mathbb R$.