How does Riemannian geometry yield the postulates of Euclidean Geometry? I am reading The Variational Principles of Mechanics by Cornelius Lanczos; here is the concerned excerpt:

The fact that geometry can be established analytically and independently of any special reference system is only one of the merits of Riemannian geometry. Even more fundamental is the discovery by Riemann that the definition $$\bar{\mathrm ds}^2= \sum_{i,~k~=~1}^n \, g_{ik}\,\mathrm dx_i\mathrm dx_k\, \tag {15.7}$$ of line element gives not only a new, but a much more general, basis for building geometry than the older basis of Euclidean postulates. The $g_{ik}$have to belong to a certain class of functions in order to yield the Euclidean type of geometry. 

So, how does the Riemannien geometry yield the postulates of Euclidean Geometry? What certain class of functions, mentioned by the author, do yield the old postulates?
 A: A topological space $M$ and metric $g$ can define completely wild things but among them one can define in this way the usual $\mathbb{R}^n$. However a lot of investigation has been going on trying to understand these objects, a lot of it is related to the postulates as examples. I try to answer you question by relating the postulates to objects, quantities and theorems of Riemannian geometry.
In order to exclude patological cases we assume that $M$ is connected.

  
*
  
*A straight line segment can be drawn joining any two points.
  

This is the case if the Riemann manifold defined is geodesically convex. Several Theorems consider sufficient conditions for $X,g$ to have this property. 


  
*Any straight line segment can be extended indefinitely in a straight line.
  

This is an equivalent definition of a complete manifold. This is also subject to several Theorems, the most prominent is the Hopf-Rhinow theorem.


  
*Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.
  

This could be a consideration about the injectivity radius of the manifold, as an example hyperbolic spaces have everywhere infinite injectivity radius and hence for all of them this postulate holds.


  
*All right angles are congruent.
  

I must say that I have troubles whit that one, however since we define angles on the Tangent plane this should be fine for all Riemann manifolds, maybe there are problems with general metric spaces but I'm not sure.


  
*If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect each other on that side if extended far enough. This postulate is equivalent to what is known as the parallel postulate. 
  

In Riemann geometry this is what the curvature deals with. Except that the curvature tells us what happens in an infinitesimal small neighborhood. A result which threats this globally would be: If all sectional curvatures are non negative this is true, but it might be true in other cases.
A: $\newcommand{\Reals}{\mathbf{R}}$Euclidean plane geometry can be constructed analytically by starting with the Cartesian plane $(\Reals^{2}, +, \cdot)$ (the set of ordered pairs of real numbers with the usual operations of vector addition and scalar multiplication) and equipping it with the distance function coming from the Pythagorean theorem,
$$
d\bigl((x_{1}, x_{2}), (y_{1}, y_{2})\bigr)
  = \sqrt{(y_{1} - x_{1})^{2} + (y_{2} - x_{2})^{2}},
\tag{1}
$$
or $(\Delta s)^{2} = (\Delta x)^{2} + (\Delta y)^{2}$.


*

*A point is an element of $\Reals^{2}$.

*A line is the zero locus of a first-degree polynomial, $ax + by = c$ with $(a, b) \neq (0, 0)$.

*Two lines $a_{1}x + b_{1}y = c_{1}$ and $a_{2}x + b_{2}y = c_{2}$ are parallel if $a_{1}b_{2} - a_{2}b_{1} = 0$.

*Two lines $a_{1}x + b_{1}y = c_{1}$ and $a_{2}x + b_{2}y = c_{2}$ are perpendicular if $a_{1}b_{1} + a_{2}b_{2} = 0$.

*A circle is the locus of $(x - x_{0})^{2} + (y - y_{0})^{2} = r^{2}$.

*A rigid motion is a transformation of the form
$$
\left[\begin{array}{@{}c@{}}
    x \\
    y \\
  \end{array}\right] \mapsto
\left[\begin{array}{@{}rr@{}}
    C & -S \\
    S &  C \\
  \end{array}\right]\left[\begin{array}{@{}c@{}}
    x \\
    y \\
  \end{array}\right] + \left[\begin{array}{@{}c@{}}
    x_{0} \\
    y_{0} \\
  \end{array}\right],\quad
C^{2} + S^{2} = 1.
$$

*Two angles are congruent if there exists a rigid motion taking one to the other.
And so forth. (These claims are doubtless familiar, but it requires rather extensive work to establish carefully that they model the Euclidean postulates. Patrick Ryan's Euclidean and Non-Euclidean Geometry, for example, is a nice reference.)

If you'll forgive my putting words in the mouths of great mathematicians:
To Riemann, the Euclidian plane is not merely a rigid, algebraic structure. Instead, we may think of the Euclidean plane as having a tangent space at each point.
Thanks to parallelism (the existence of a "global compass", the orthonormal frame whose value at each point is the standard basis of $\Reals^{2}$), any two tangent spaces to the Euclidean plane may be canonically identified. The tangent bundle therefore trivializes canonically as soon as we pick a distinguished orthonormal basis at one point. (This is tantamount to introducing Cartesian coordinates in the Euclidean plane, i.e., to fixing an origin, a distinguished pair of oriented lines, and the metric (1) with respect to the resulting coordinate system.)
The Pythagorean theorem now acquires an infinitesimal character:
$$
ds^{2} = dx^{2} + dy^{2},
$$
which is precisely Lanczos's equation (15.7) with $g_{ik} = \delta_{ik}$, the Kronecker delta.
In Riemann's view, for every ordered triple $(E, F, G)$ of (suitably smooth) functions with $EG - F^{2} > 0$ everywhere, we may consider the "variable" inner products
$$
g = E\, dx^{2} + F\, (dx\, dy + dy\, dx) + G\, dy^{2},
$$
and use these to do "infinitesimally Euclidean geometry", in the sense that each tangent space acquires the structure of the Euclidean plane, but these structures vary (smoothly) from point to point.
Riemann therefore sees Euclidean plane geometry as something like a two-dimensional continuum of Euclidean geometries that happen to be globally mutually-consistent (from the perspective of internal measurements).
The "certain class of functions" Lanczos mentions presumably refers to ordered triples $(E, F, G)$ for which:


*

*The Gaussian curvature vanishes (a second-order fully-non-linear PDE, see the Brioschi formula).

*The metric is complete (geodesics are defined for all time) and the universe simply-connected (to avoid topological issues, such as cylinders and flat tori, in which geodesics extend forever, but not the way they "should" for Euclidean geometry).
The functions $E = G = 1$, $F = 0$ are the simplest example. The most general example is to let $\Phi:\Reals^{2} \to \Reals^{2}$ be a diffeomorphism. The functions
$$
E = \Phi_{x} \cdot \Phi_{x},\qquad
F = \Phi_{x} \cdot \Phi_{y},\qquad
G = \Phi_{y} \cdot \Phi_{y}
$$
also define Euclidean geometry, via the global change of coordinates $\Phi$.
