In 1840 Bernhard entered directly into the third class at the Lyceum in Hannover. While at the Lyceum he lived with his grandmother but, in 1842, his grandmother died and Bernhard moved to the Johanneum Gymnasium in Lüneburg. Bernhard seems to have been a good, but not outstanding, pupil who worked hard at the classical subjects such as Hebrew and theology. He showed a particular interest in mathematics and the director of the Gymnasium allowed Bernhard to study mathematics texts from his own library. On one occasion he lent Bernhard Legendre's book on the theory of numbers and Bernhard read the 900 page book in six days.
In the spring of 1846 Riemann enrolled at the University of Göttingen. His father had encouraged him to study theology and so he entered the theology faculty. However he attended some mathematics lectures and asked his father if he could transfer to the faculty of philosophy so that he could study mathematics. Riemann was always very close to his family and he would never have changed courses without his father's permission. This was granted, however, and Riemann then took courses in mathematics from Moritz Stern and Gauss.
It may be thought that Riemann was in just the right place to study mathematics at Göttingen, but at this time the University of Göttingen was a rather poor place for mathematics. Gauss did lecture to Riemann but he was only giving elementary courses and there is no evidence that at this time he recognised Riemann's genius. Stern, however, certainly did realise that he had a remarkable student and later described Riemann at this time saying that he:-
... already sang like a canary.Riemann moved from Göttingen to Berlin University in the spring of 1847 to study under Steiner, Jacobi, Dirichlet and Eisenstein. This was an important time for Riemann. He learnt much from Eisenstein and discussed using complex variables in elliptic function theory. The main person to influence Riemann at this time, however, was Dirichlet. Klein writes in :-
Riemann was bound to Dirichlet by the strong inner sympathy of a like mode of thought. Dirichlet loved to make things clear to himself in an intuitive substrate; along with this he would give acute, logical analyses of foundational questions and would avoid long computations as much as possible. His manner suited Riemann, who adopted it and worked according to Dirichlet's methods.Riemann's work always was based on intuitive reasoning which fell a little below the rigour required to make the conclusions watertight. However, the brilliant ideas which his works contain are so much clearer because his work is not overly filled with lengthy computations. It was during his time at the University of Berlin that Riemann worked out his general theory of complex variables that formed the basis of some of his most important work.
In 1849 he returned to Göttingen and his Ph.D. thesis, supervised by Gauss, was submitted in 1851. However it was not only Gauss who strongly influenced Riemann at this time. Weber had returned to a chair of physics at Göttingen from Leipzig during the time that Riemann was in Berlin, and Riemann was his assistant for 18 months. Also Listing had been appointed as a professor of physics in Göttingen in 1849. Through Weber and Listing, Riemann gained a strong background in theoretical physics and, from Listing, important ideas in topology which were to influence his ground breaking research.
Riemann's thesis studied the theory of complex variables and, in particular, what we now call Riemann surfaces. It therefore introduced topological methods into complex function theory. The work builds on Cauchy's foundations of the theory of complex variables built up over many years and also on Puiseux's ideas of branch points. However, Riemann's thesis is a strikingly original piece of work which examined geometric properties of analytic functions, conformal mappings and the connectivity of surfaces.
In proving some of the results in his thesis Riemann used a variational principle which he was later to call the Dirichlet Principle since he had learnt it from Dirichlet's lectures in Berlin. The Dirichlet Principle did not originate with Dirichlet, however, as Gauss, Green and Thomson had all made use if it. Riemann's thesis, one of the most remarkable pieces of original work to appear in a doctoral thesis, was examined on 16 December 1851. In his report on the thesis Gauss described Riemann as having:-
... a gloriously fertile originality.On Gauss's recommendation Riemann was appointed to a post in Göttingen and he worked for his Habilitation, the degree which would allow him to become a lecturer. He spent thirty months working on his Habilitation dissertation which was on the representability of functions by trigonometric series. He gave the conditions of a function to have an integral, what we now call the condition of Riemann integrability. In the second part of the dissertation he examined the problem which he described in these words:-
While preceding papers have shown that if a function possesses such and such a property, then it can be represented by a Fourier series, we pose the reverse question: if a function can be represented by a trigonometric series, what can one say about its behaviour.To complete his Habilitation Riemann had to give a lecture. He prepared three lectures, two on electricity and one on geometry. Gauss had to choose one of the three for Riemann to deliver and, against Riemann's expectations, Gauss chose the lecture on geometry. Riemann's lecture Über die Hypothesen welche der Geometrie zu Grunde liegen (On the hypotheses that lie at the foundations of geometry), delivered on 10 June 1854, became a classic of mathematics.
There were two parts to Riemann's lecture. In the first part he posed the problem of how to define an n-dimensional space and ended up giving a definition of what today we call a Riemannian space. Freudenthal writes in :-
It possesses shortest lines, now called geodesics, which resemble ordinary straight lines. In fact, at first approximation in a geodesic coordinate system such a metric is flat Euclidean, in the same way that a curved surface up to higher-order terms looks like its tangent plane. Beings living on the surface may discover the curvature of their world and compute it at any point as a consequence of observed deviations from Pythagoras' theorem.In fact the main point of this part of Riemann's lecture was the definition of the curvature tensor. The second part of Riemann's lecture posed deep questions about the relationship of geometry to the world we live in. He asked what the dimension of real space was and what geometry described real space. The lecture was too far ahead of its time to be appreciated by most scientists of that time. Monastyrsky writes in :-
Among Riemann's audience, only Gauss was able to appreciate the depth of Riemann's thoughts. ... The lecture exceeded all his expectations and greatly surprised him. Returning to the faculty meeting, he spoke with the greatest praise and rare enthusiasm to Wilhelm Weber about the depth of the thoughts that Riemann had presented.It was not fully understood until sixty years later. Freudenthal writes in :-
The general theory of relativity splendidly justified his work. In the mathematical apparatus developed from Riemann's address, Einstein found the frame to fit his physical ideas, his cosmology, and cosmogony: and the spirit of Riemann's address was just what physics needed: the metric structure determined by data.So this brilliant work entitled Riemann to begin to lecture. However :-
Not long before, in September, he read a report "On the Laws of the Distribution of Static Electricity" at a session of the Göttingen Society of Scientific researchers and Physicians. In a letter to his father, Riemann recalled, among other things, "the fact that I spoke at a scientific meeting was useful for my lectures". In October he set to work on his lectures on partial differential equations. Riemann's letters to his dearly-loved father were full of recollections about the difficulties he encountered. Although only eight students attended the lectures, Riemann was completely happy. Gradually he overcame his natural shyness and established a rapport with his audience.Gauss's chair at Göttingen was filled by Dirichlet in 1855. At this time there was an attempt to get Riemann a personal chair but this failed. Two years later, however, he was appointed as professor and in the same year, 1857, another of his masterpieces was published. The paper Theory of abelian functions was the result of work carried out over several years and contained in a lecture course he gave to three people in 1855-56. One of the three was Dedekind who was able to make the beauty of Riemann's lectures available by publishing the material after Riemann's early death.
The abelian functions paper continued where his doctoral dissertation had left off and developed further the idea of Riemann surfaces and their topological properties. He examined multi-valued functions as single valued over a special Riemann surface and solved general inversion problems which had been solved for elliptic integrals by Abel and Jacobi. However Riemann was not the only mathematician working on such ideas. Klein writes in :-
... when Weierstrass submitted a first treatment of general abelian functions to the Berlin Academy in 1857, Riemann's paper on the same theme appeared in Crelle's Journal, Volume 54. It contained so many unexpected, new concepts that Weierstrass withdrew his paper and in fact published no more.The Dirichlet Principle which Riemann had used in his doctoral thesis was used by him again for the results of this 1857 paper. Weierstrass, however, showed that there was a problem with the Dirichlet Principle. Klein writes :-
The majority of mathematicians turned away from Riemann ... Riemann had quite a different opinion. He fully recognised the justice and correctness of Weierstrass's critique, but he said, as Weierstrass once told me, that he appealed to Dirichlet's Principle only as a convenient tool that was right at hand, and that his existence theorems are still correct.We return at the end of this article to indicate how the problem of the use of Dirichlet's Principle in Riemann's work was sorted out.
In 1858 Betti, Casorati and Brioschi visited Göttingen and Riemann discussed with them his ideas in topology. This gave Riemann particular pleasure and perhaps Betti in particular profited from his contacts with Riemann. These contacts were renewed when Riemann visited Betti in Italy in 1863. In  two letter from Betti, showing the topological ideas that he learnt from Riemann, are reproduced.
In 1859 Dirichlet died and Riemann was appointed to the chair of mathematics at Göttingen on 30 July. A few days later he was elected to the Berlin Academy of Sciences. He had been proposed by three of the Berlin mathematicians, Kummer, Borchardt and Weierstrass. Their proposal read :-
Prior to the appearance of his most recent work [Theory of abelian functions], Riemann was almost unknown to mathematicians. This circumstance excuses somewhat the necessity of a more detailed examination of his works as a basis of our presentation. We considered it our duty to turn the attention of the Academy to our colleague whom we recommend not as a young talent which gives great hope, but rather as a fully mature and independent investigator in our area of science, whose progress he in significant measure has promoted.A newly elected member of the Berlin Academy of Sciences had to report on their most recent research and Riemann sent a report on On the number of primes less than a given magnitude another of his great masterpieces which were to change the direction of mathematical research in a most significant way. In it Riemann examined the zeta function
(s) = (1/ns) = (1 - p-s)-1which had already been considered by Euler. Here the sum is over all natural numbers n while the product is over all prime numbers. Riemann considered a very different question to the one Euler had considered, for he looked at the zeta function as a complex function rather than a real one. Except for a few trivial exceptions, the roots of (s) all lie between 0 and 1. In the paper he stated that the zeta function had infinitely many nontrivial roots and that it seemed probable that they all have real part 1/2. This is the famous Riemann hypothesis which remains today one of the most important of the unsolved problems of mathematics.
Riemann studied the convergence of the series representation of the zeta function and found a functional equation for the zeta function. The main purpose of the paper was to give estimates for the number of primes less than a given number. Many of the results which Riemann obtained were later proved by Hadamard and de la Vallée Poussin.
In June 1862 Riemann married Elise Koch who was a friend of his sister. They had one daughter. In the autumn of the year of his marriage Riemann caught a heavy cold which turned to tuberculosis. He had never had good health all his life and in fact his serious heath problems probably go back much further than this cold he caught. In fact his mother had died when Riemann was 20 while his brother and three sisters all died young. Riemann tried to fight the illness by going to the warmer climate of Italy.
The winter of 1862-63 was spent in Sicily and he then travelled through Italy, spending time with Betti and other Italian mathematicians who had visited Göttingen. He returned to Göttingen in June 1863 but his health soon deteriorated and once again he returned to Italy. Having spent from August 1864 to October 1865 in northern Italy, Riemann returned to Göttingen for the winter of 1865-66, then returned to Selasca on the shores of Lake Maggiore on 16 June 1866. Dedekind writes in :-
His strength declined rapidly, and he himself felt that his end was near. But still, the day before his death, resting under a fig tree, his soul filled with joy at the glorious landscape, he worked on his final work which unfortunately, was left unfinished.Finally let us return to Weierstrass's criticism of Riemann's use of the Dirichlet's Principle. Weierstrass had shown that a minimising function was not guaranteed by the Dirichlet Principle. This had the effect of making people doubt Riemann's methods. Freudenthal writes in :-
All used Riemann's material but his method was entirely neglected. ... During the rest of the century Riemann's results exerted a tremendous influence: his way of thinking but little.Weierstrass firmly believed Riemann's results, despite his own discovery of the problem with the Dirichlet Principle. He asked his student Hermann Schwarz to try to find other proofs of Riemann's existence theorems which did not use the Dirichlet Principle. He managed to do this during 1869-70. Klein, however, was fascinated by Riemann's geometric approach and he wrote a book in 1892 giving his version of Riemann's work yet written very much in the spirit of Riemann. Freudenthal writes in :-
It is a beautiful book, and it would be interesting to know how it was received. Probably many took offence at its lack of rigour: Klein was too much in Riemann's image to be convincing to people who would not believe the latter.In 1901 Hilbert mended Riemann's approach by giving the correct form of Dirichlet's Principle needed to make Riemann's proofs rigorous. The search for a rigorous proof had not been a waste of time, however, since many important algebraic ideas were discovered by Clebsch, Gordan, Brill and Max Noether while they tried to prove Riemann's results. Monastyrsky writes in :-
It is difficult to recall another example in the history of nineteenth-century mathematics when a struggle for a rigorous proof led to such productive results.