The Pythagorean theorem states a relationship between the three sides of a right-angled triangle where $a$ and $b$ represent the sides that form the right angle and $c$ is the longest side.
$a^2+b^2=c^2$ if and only if the triangle is a right triangle
Pythagoras’s Theorem, $$(ds)^2 = (dx)^2 + (dy)^2 $$
Riemann realized some fundamental things:
Pythagoras’s Theorem not only told of the properties of right-angled triangles, but the function $(ds)$ (the positive square root of $(ds)^2$), was the ‘distance’ between two points; (ii) more than that, it was the shortest ‘distance’ between two points; (iii) most amazing of all, Pythagoras’s $(ds)^2$ was but one possibility - more generally, it could be written as:$$(ds)^2 = g_{xx}(dx)(dx) + +g_{xy}(dx)(dy) + g_{yx}(dy)(dx) + g_{yy}(dy)(dy) ,$$ where the $g_{ij}$ are coefficients to be determined. In Pythagoras’s Theorem, it just so happens that we have the values $g_{xx}=1$, $g_{xy}=0$, $g_{yx}=0$, and $g_{yy}=1$.
In other cases (other spaces),the $g_{ij}$ need not have these particular values, and need not be constants - they could even be functions of x and y. This discussion has, so far, been in a space of only two dimensions, but Riemann generalized his ‘distance function’ still further to n dimensions. […] Most remarkable of all, Riemann showed that all the geometric properties of an n-dimensional space can be completely determined by just this ‘distance’, $ds$ (the square root of the above equation. For example, if any of the coefficients, $g_{ij}$ , are not constant but are functions of the coordinates, then the corresponding space is not ‘flat’ (Euclidean) but ‘curved’. This, finally, is what ‘curved’ means: it is a measure of the departure from Euclidean space, and is determined by certain functions (Riemann’s ‘curvature functions’) of the $g_{ij}$ -coefficients. While the ‘distance’ is specific to the given space, its value is invariant as regards which coordinate representation has been adopted.
The Lazy Universe by Coopersmith
The Pythagorean theorem enables us to draw accurate maps. This is achieved by covering the area that should be mapped with a virtual network of triangles. These triangles, via the Pythagorean theorem, allow us to measure distances and angles between stretches of land. This method is known as triangulation.
It is still used today, for example, to deduce the locations from given satellite data.