Local fundamental theorem of affine geometry The fundamental theorem of affine geometry implies that a bijection $f \colon \mathbb R^n \to \mathbb R^n$ is affine if $n \geq 2$ and $f$ maps lines to lines. I was wondering, does this hold locally? Suppose $\Delta$ is a (non-degenerate) simplex of dimension $n$, $f \colon \Delta \to \Delta$ a bijection mapping each vertex to itself, and mapping segments to segments, can we readily say that $f = \textrm{id}_\Delta$? (I chose a simplex as there exists a unique affine map mapping vertices to themselves, namely $\textrm{id}_\Delta$.)
 A: No, this is not true.  Let us say $\Delta=\{(x_0,\dots,x_n)\in[0,1]^{n+1}:\sum_i x_i=1\}$.  Let $a_0,\dots,a_n>0$ be any sequence of positive constants and define $g(x_0,\dots,x_n)=(a_0x_0,\dots,a_nx_n)$.  Then there is a bijection $f:\Delta\to\Delta$ given by $f(x)=g(x)/s(g(x))$ where $s(g(x))$ denotes the sum of the entries of $g(x)$.  This bijection fixes the vertices of $\Delta$ and is not the identity unless all the $a_i$ are the same.  However, I claim that it sends segments to segments.
To prove this, let $x,y\in\Delta$ and let $t\in[0,1]$.  We wish to show that $f(tx+(1-t)y)$ is on the line segment between $f(x)$ and $f(y)$.  But now observe that since $g$ is linear,
\begin{align*}f(tx+(1-t)y)&=\frac{tg(x)+(1-t)g(y)}{ts(g(x))+(1-t)s(g(y))} \\
&=\frac{ts(g(x))}{ts(g(x))+(1-t)s(g(y))}f(x)+\frac{(1-t)s(g(y))}{ts(g(x))+(1-t)s(g(y))}f(y)
\end{align*}
which is evidently a convex combination of $f(x)$ and $f(y)$.
However, these are the only examples of such maps if $n\geq 2$.  To sketch the proof, observe that by starting with the barycenter and the vertices and repeatedly taking intersection points of segments between the points you have, you can generate a dense subset of each boundary edge of $\Delta$.  It follows that a segment-preserving bijection $\Delta\to\Delta$ which fixes the vertices is uniquely determined by where it sends the barycenter.  But now note that $a_0,\dots,a_n$ may be chosen so that $f$ as constructed above maps the barycenter of $\Delta$ to any other point in its interior.

Here is a more geometric perspective on what's going on.  Note that if we think of $\Delta$ as sitting inside an affine space $\mathbb{A}^n$ which in turn sits inside a projective space $\mathbb{P}^n$, then these bijections do extend to automorphisms of the projective space (but not the affine space).  So a "local collineation" on an open subset of projective space still must be "linear" in the sense of projective geometry (i.e., in homogeneous coordinates).  It's just that if your open subset happens to be contained in an affine space, it may not look linear in those particular affine coordinates.
Moreover, note that while an automorphism of $\mathbb{A}^n$ is determined uniquely by where it sends $n+1$ points, an automorphism of $\mathbb{P}^n$ is only determined uniquely by where it sends $n+2$ points.  So considering automorphisms of projective space exactly gives you one more "degree of freedom" beyond just fixing the $n+1$ vertices of a simplex (as seen above where the barycenter can be mapped anywhere in the interior of the simplex).
