In a Mercator Projection the point on the sphere (of radius R) with longitude \(L\) (positive East) and latitude \(\lambda\) (positive North) is mapped to the point in the plane with coordinates \(x, y:\)

\[

\begin{gathered}

x=R L \\

y=R \ln \left(\tan \left(\frac{\pi}{4}+\frac{\lambda}{2}\right)\right)

\end{gathered}

\]

The Mercator projection satisfies two important properties: it is conformal, that is it preserves angles, and it maps the sphere's parallels into straight line segments of length \(2 \pi R\). (A parallel of latitude means a small circle comprised of points at a specified latitude).

Starting from these two properties we can derive the Mercator Projection. First note that a parallel of latitude \(\lambda\) has length \(2 \pi R \cos (\lambda)\). To make the projections of the parallels all the same length a stretching factor in longitude of \(\frac{1}{\cos (\lambda)}\) will have to be applied. For the mapping to be conformal, the same stretching factor must be applied in latitude also. Note that the stretching factor varies with \(\lambda\) so to map a specified latitude \(\lambda_{0}\) to an ordinate \(y\) we must evaluate an integral.

\[

y=\int_{0}^{\lambda_{0}}(1 / \cos (\lambda)) d \lambda

\]

Early mapmakers such as Mercator evaluated this integral numerically to produce what is called a Table of Meridional Parts that can be used to map \(\lambda_{0}\) into y. Later it was noticed that the integral of one over cosine actually has a closed form, leading to the expression for \(y\) shown above.