Riemann was born on September 17, 1826 in Breselenz, a village near Dannenberg in the Kingdom of Hanover in what is the Federal Republic of Germany today. His father, Friedrich Bernhard Riemann, was a poor Lutheran pastor in Breselenz who fought in the Napoleonic Wars. His mother, Charlotte Ebell, died before her children had reached adulthood. Riemann was the second of six children, shy and suffering from numerous nervous breakdowns. Riemann exhibited exceptional mathematical skills, such as calculation abilities, from an early age but suffered from timidity and a fear of speaking in public.

During 1840, Riemann went to Hanover to live with his grandmother and attend lyceum (middle school). After the death of his grandmother in 1842, he attended high school at the Johanneum Lüneburg. In high school, Riemann studied the Bible intensively, but he was often distracted by mathematics. His teachers were amazed by his adept ability to perform complicated mathematical operations, in which he often outstripped his instructor's knowledge. In 1846, at the age of 19, he started studying philology and Christian theology in order to become a pastor and help with his family's finances.

During the spring of 1846, his father, after gathering enough money, sent Riemann to the renowned University of Göttingen, where he planned to study towards a degree in Theology. However, once there, he began studying mathematics under Carl Friedrich Gauss (specifically his lectures on the method of least squares). Gauss recommended that Riemann give up his theological work and enter the mathematical field (but he remained a devout Christian throughout his life); after getting his father's approval, Riemann transferred to the University of Berlin in 1847.[1] During his time of study, Jacobi, Lejeune Dirichlet, Steiner, and Eisenstein were teaching. He stayed in Berlin for two years and returned to Göttingen in 1849.

Riemann fled Göttingen when the armies of Hanover and Prussia clashed there in 1866.[3] He died of tuberculosis during his third journey to Italy in Selasca (now a hamlet of Verbania on Lake Maggiore) where he was buried in the cemetery in Biganzolo (Verbania). Riemann was a dedicated Christian, the son of a Protestant minister, and saw his life as a mathematician as another way to serve God. During his life, he held closely to his Christian faith and considered it to be the most important aspect of his life. At the time of his death, he was reciting the Lord’s Prayer with his wife and died before they finished saying the prayer.[4] Meanwhile, in Göttingen his housekeeper discarded some of the papers in his office, including much unpublished work. Riemann refused to publish incomplete work and some deep insights may have been lost forever.[3]

Riemann's tombstone in Biganzolo (Italy) refers to Romans 8:28 ("And we know that all things work together for good to them that love God, to them who are the called according to his purpose"):

Riemann's idea was to introduce a collection of numbers at every point in space (i.e., a tensor) which would describe how much it was bent or curved. Riemann found that in four spatial dimensions, one needs a collection of ten numbers at each point to describe the properties of a manifold, no matter how distorted it is. This is the famous construction central to his geometry, known now as a Riemannian metric.

In his dissertation, he established a geometric foundation for complex analysis through Riemann surfaces, through which multi-valued functions like the logarithm (with infinitely many sheets) or the square root (with two sheets) could become one-to-one functions. Complex functions are harmonic functions (that is, they satisfy Laplace's equation and thus the Cauchy–Riemann equations) on these surfaces and are described by the location of their singularities and the topology of the surfaces. The topological "genus" of the Riemann surfaces is given by g=w/2−n+1{\displaystyle g=w/2-n+1}, where the surface has n{\displaystyle n} leaves coming together at w{\displaystyle w} branch points. For g>1{\displaystyle g>1} the Riemann surface has (3g−3){\displaystyle (3g-3)} parameters (the "moduli").

His contributions to this area are numerous. The famous Riemann mapping theorem says that a simply connected domain in the complex plane is "biholomorphically equivalent" (i.e. there is a bijection between them that is holomorphic with a holomorphic inverse) to either C{\displaystyle \mathbb {C} } or to the interior of the unit circle. The generalization of the theorem to Riemann surfaces is the famous uniformization theorem, which was proved in the 19th century by Henri Poincaré and Felix Klein. Here, too, rigorous proofs were first given after the development of richer mathematical tools (in this case, topology). For the proof of the existence of functions on Riemann surfaces he used a minimality condition, which he called the Dirichlet principle. Weierstrass found a hole in the proof: Riemann had not noticed that his working assumption (that the minimum existed) might not work; the function space might not be complete, and therefore the existence of a minimum was not guaranteed. Through the work of David Hilbert in the Calculus of Variations, the Dirichlet principle was finally established. Otherwise, Weierstrass was very impressed with Riemann, especially with his theory of abelian functions. When Riemann's work appeared, Weierstrass withdrew his paper from Crelle and did not publish it. They had a good understanding when Riemann visited him in Berlin in 1859. Weierstrass encouraged his student Hermann Amandus Schwarz to find alternatives to the Dirichlet principle in complex analysis, in which he was successful. An anecdote from Arnold Sommerfeld[6] shows the difficulties which contemporary mathematicians had with Riemann's new ideas. In 1870, Weierstrass had taken Riemann's dissertation with him on a holiday to Rigi and complained that it was hard to understand. The physicist Hermann von Helmholtz assisted him in the work over night and returned with the comment that it was "natural" and "very understandable".

Other highlights include his work on abelian functions and theta functions on Riemann surfaces. Riemann had been in a competition with Weierstrass since 1857 to solve the Jacobian inverse problems for abelian integrals, a generalization of elliptic integrals. Riemann used theta functions in several variables and reduced the problem to the determination of the zeros of these theta functions. Riemann also investigated period matrices and characterized them through the "Riemannian period relations" (symmetric, real part negative). By Frobenius and Lefschetz the validity of this relation is equivalent with the embedding of Cn/Ω{\displaystyle C^{n}/\Omega } (where Ω{\displaystyle \Omega } is the lattice of the period matrix) in a projective space by means of theta functions. For certain values of n{\displaystyle n}, this is the Jacobian variety of the Riemann surface, an example of an abelian manifold.

Many mathematicians such as Alfred Clebsch furthered Riemann's work on algebraic curves. These theories depended on the properties of a function defined on Riemann surfaces. For example, the Riemann–Roch theorem (Roch was a student of Riemann) says something about the number of linearly independent differentials (with known conditions on the zeros and poles) of a Riemann surface.

According to Laugwitz,[7] automorphic functions appeared for the first time in an essay about the Laplace equation on electrically charged cylinders. Riemann however used such functions for conformal maps (such as mapping topological triangles to the circle) in his 1859 lecture on hypergeometric functions or in his treatise on minimal surfaces.

In his habilitation work on Fourier series, where he followed the work of his teacher Dirichlet, he showed that Riemann-integrable functions are "representable" by Fourier series. Dirichlet has shown this for continuous, piecewise-differentiable functions (thus with countably many non-differentiable points). Riemann gave an example of a Fourier series representing a continuous, almost nowhere-differentiable function, a case not covered by Dirichlet. He also proved the Riemann–Lebesgue lemma: if a function is representable by a Fourier series, then the Fourier coefficients go to zero for large n.

Riemann's essay was also the starting point for Georg Cantor's work with Fourier series, which was the impetus for set theory.

He also worked with hypergeometric differential equations in 1857 using complex analytical methods and presented the solutions through the behavior of closed paths about singularities (described by the monodromy matrix). The proof of the existence of such differential equations by previously known monodromy matrices is one of the Hilbert problems.

In Riemann's work there are many more interesting developments. He proved the functional equation for the zeta function (already known to Euler), behind which a theta function lies. Also, it gives a better approximation for the prime-counting function π(x){\displaystyle \pi (x)} than Gauss's function Li(x){\displaystyle Li(x)}. Through the summation of this approximation function over the non-trivial zeros on the line with real portion 1/2, he gave an exact, "explicit formula" for π(x){\displaystyle \pi (x)}.

Riemann knew Chebyshev's work on the Prime Number Theorem. He had visited Dirichlet in 1852. But Riemann's methods were very different.

1868 On the hypotheses which lie at the foundation of geometry, translated by W.K.Clifford, Nature 8 1873 183 – reprinted in Clifford's Collected Mathematical Papers, London 1882 (MacMillan); New York 1968 (Chelsea) http://www.emis.de/classics/Riemann/. Also in Ewald, William B., ed., 1996 “From Kant to Hilbert: A Source Book in the Foundations of Mathematics”, 2 vols. Oxford Uni. Press: 652–61.

1892 Collected Works of Bernhardt Riemann (H. Weber ed). In German. Reprinted New York 1953 (Dover)