This is a [cross-post](https://math.stackexchange.com/questions/4148059/if-any-two-triangles-of-equal-area-can-be-mapped-via-affine-maps-what-can-we-sa).


Let $(M,g)$ be a two-dimensional compact surface, endowed with a Riemannian metric.


Fix $s>0$, and suppose that **for any** two geodesic triangles $A,B$ **having area $s$**, there exists an affine onto map $f:A \to B$, where I say $f$ is affine if $\nabla df=0$. (equivalently, $f$ maps parametrized geodesics to parametrized geodesics.
Here $\nabla=\nabla^{T^\*M} \otimes \nabla^{f^\*TM}$).


I assume $s<<\text{Area}(M)$ is very small, so there are a lot of triangles of area $s$.


What can we say about the metric $g$? Does it have to be flat? Are there any restrictions on its curvature?


I do not require $f$ to be the restriction of an affine map $M \to M$;
(I think this is a stronger requirement than the existence of "local" or piece-wise affine maps. e.g. for the flat torus, globally we only have $SL\_2(\mathbb{Z})$.)


I believe that the assumption means that that there a lot of affine maps locally $M \to M$; perhaps we can translate this into showing $M$ is flat.


If $\nabla^{T^\*M} \otimes \nabla^{f^\*TM}$ has zero curvature, then $M$ is flat. And 'many affine maps' means roughly 'many parallel sections of $T^\*M \otimes TM$ '-- although not exactly, since for every $f$, $df$ is a section of a vector bundle which depends on $f$, i.e. $T^\*M \otimes f^\*TM$.



If any two triangles of equal area can be mapped via affine maps, what can we say about the geometry?
Using the structure equations, it is not difficult to show that, if $f:(M,g)\to(N,h)$ is a diffeomorphism of (not necessarily complete) connected surfaces that is affine in the OP's sense, i.e., $\nabla(\mathrm{d}f)=0$, then $f$ has constant singular values and $L\bigl(f(p)\bigr) = K(p)/|\det(f)|$ for any $p\in M$, where $K:M\to\mathbb{R}$ and $L:N\to\mathbb{R}$ are the Gauss curvatures of $g$ and $h$ respectively, and $\det(f)$ is the product of the singular values of $f$ (and thus is constant).


Moreover, if we restrict attention to the open sets $M^\*$ and $N^\* = f(M^\*)$ where the respective Gauss curvatures are nonvanishing, then $f:M^\*\to N^\*$ is a homothety, i.e., an isometry up to a (constant) scale factor.


Thus, the only situation in which the OP's desired flexibility holds is for a flat surface.


Here is a little bit more detail: It's a local calculation, so choose a $g$-orthonormal coframing $g={\omega\_1}^2+{\omega\_2}^2$ on $U\subset M$ and an $h$-orthonormal coframing $h={\eta\_1}^2+{\eta\_2}^2$ on $V = f(U)\subset N$. Let $\omega\_{12}$ on $U$ and $\eta\_{12}$ on $V$ satisfy
$$
\mathrm{d}\omega\_1=-\omega\_{12}\wedge\omega\_2\quad
\mathrm{d}\omega\_2=+\omega\_{12}\wedge\omega\_1\quad
\mathrm{d}\omega\_{12}=-L\,\omega\_1\wedge\omega\_2
$$
and
$$
\mathrm{d}\eta\_1=-\eta\_{12}\wedge\eta\_2\quad
\mathrm{d}\eta\_2=+\eta\_{12}\wedge\eta\_1\quad
\mathrm{d}\eta\_{12}=-K\,\eta\_1\wedge\eta\_2\,.
$$
There will exist functions $a\_{ij}$ on $U$ such that
$f^\*(\eta\_i) = a\_{ij}\,\omega\_j$. The condition $\nabla(\mathrm{d}f) = 0$ then translates into the equations
$$
\mathrm{d}
\begin{pmatrix}a\_{11}&a\_{12}\\a\_{21}&a\_{22}\end{pmatrix}
= \begin{pmatrix}a\_{11}&a\_{12}\\a\_{21}&a\_{22}\end{pmatrix}
\begin{pmatrix}0&\omega\_{12}\\-\omega\_{12}&0\end{pmatrix}
-\begin{pmatrix}0&\bar\eta\_{12}\\-\bar\eta\_{12}&0\end{pmatrix}
\begin{pmatrix}a\_{11}&a\_{12}\\a\_{21}&a\_{22}\end{pmatrix}
$$
where $\bar\eta\_{12} = f^\*\eta\_{12}$. This immediatly implies the equations
$$
\mathrm{d}(a\_{11}a\_{22}-a\_{12}a\_{21}) = 
\mathrm{d}(a\_{11}^2+a\_{12}^2+a\_{21}^2+a\_{22}^2) = 0,
$$
so the singular values of the matrix $a$ are constant.


If the singular values are equal, it follows that $f$ is either the constant map or else $f$ is a homothety. If they are not equal, we can choose our coframings so that $0<a\_{11}<a\_{22}$ and $a\_{12}=a\_{21}=0$. Now, the constancy of the $a\_{ij}$ together with the above equations implies that we must have
$$
a\_{11}\omega\_{12}-a\_{22}\bar\eta\_{12} = a\_{22}\omega\_{12}-a\_{11}\bar\eta\_{12} = 0.
$$
In other words $\omega\_{12} \equiv \bar\eta\_{12} \equiv 0$. Now the above structure equations imply that $K \equiv L \equiv 0$.


