After teaching briefly in a Berlin girls' school, Cantor took up a position at the
University of Halle, where he spent his entire career. He was awarded the requisite
habilitation for his thesis on number theory.
In 1874, Cantor married Vally Guttmann. They had six children, the last born in 1886. Cantor was able to support a family despite modest academic pay, thanks to his inheritance from his father. During his honeymoon in the
Harz mountains, Cantor spent much time in mathematical discussions with
Richard Dedekind, whom he befriended two years earlier while on
Swiss holiday.
Cantor was promoted to Extraordinary Professor in 1872, and made full Professor in 1879. To attain the latter rank at the age of 34 was a notable accomplishment, but Cantor desired a
chair at a more prestigious university, in particular at Berlin, then the leading German university. However, his work encountered too much opposition for that to be possible. Kronecker, who headed mathematics at Berlin until his death in 1891, became increasingly uncomfortable with the prospect of having Cantor as a colleague, perceiving him as a "corrupter of youth" for teaching his ideas to a younger generation of mathematicians. Worse yet, Kronecker, a well-established figure within the mathematical community and Cantor's former professor, fundamentally disagreed with the thrust of Cantor's work. Kronecker, now seen as one of the founders of the
constructive viewpoint in mathematics, disliked much of Cantor's set theory because it asserted the existence of sets satisfying certain properties, without giving specific examples of sets whose members did indeed satisfy those properties. Cantor came to believe that Kronecker's stance would make it impossible for Cantor to ever leave Halle.
In 1881, Cantor's Halle colleague
Eduard Heine died, creating a vacant chair. Halle accepted Cantor's suggestion that it be offered to
Dedekind, Heinrich Weber and
Franz Mertens, in that order, but each declined the chair after being offered it. Friedrich Wangerin was eventually appointed, but he was never close to Cantor.
In 1882 the mathematical correspondence between Cantor and Dedekind came to an end, apparently as a result of Dedekind's refusal to accept the chair at Halle. Cantor also began another important correspondence, with
Gösta Mittag-Leffler in Sweden, and soon began to publish in Mittag-Leffler's journal
Acta Mathematica. But in 1885, Mittag-Leffler was concerned about the philosophical nature and new terminology in a paper Cantor had submitted to
Acta. He asked Cantor to withdraw the paper from
Acta while it was in proof, writing that it was "… about one hundred years too soon." Cantor complied, but wrote to a third party:
"Had Mittag-Leffler had his way, I should have to wait until the year 1984, which to me seemed too great a demand! … But of course I never want to know anything again about Acta Mathematica."<ref name
Cantor then sharply curtailed his relationship and correspondence with Mittag-Leffler, displaying a tendency to interpret well-intentioned criticism as a deeply personal affront.
Cantor suffered his first known bout of depression in 1884. Criticism of his work weighed on his mind: every one of the fifty-two letters he wrote to
Gösta Mittag-Leffler in 1884 attacked Kronecker. A passage from one of these letters is revealing of the damage to Cantor's self-confidence:
"…I don't know when I shall return to the continuation of my scientific work. At the moment I can do absolutely nothing with it, and limit myself to the most necessary duty of my lectures; how much happier I would be to be scientifically active, if only I had the necessary mental freshness."<ref>Dauben 1979, p. 136; Grattan-Guinness 1971, pp. 376–377. Letter dated June 21 1884.</ref>
This emotional crisis led him to apply to lecture on
philosophy rather than mathematics. He also began an intense study of
Elizabethan literature in an attempt to prove that
Francis Bacon wrote the plays attributed to
Shakespeare (see
Shakespearean authorship question); this ultimately resulted in two pamphlets, published in 1896 and 1897.
Cantor recovered soon thereafter, and subsequently made further important contributions, including his famous
diagonal argument and
theorem. However, he never again attained the high level of his remarkable papers of 1874–1884. He eventually sought a reconciliation with Kronecker, which Kronecker graciously accepted. Nevertheless, the philosophical disagreements and difficulties dividing them persisted. It was once thought that Cantor's recurring bouts of depression were triggered by the opposition his work met at the hands of Kronecker. While Cantor's mathematical worries and his difficulties dealing with certain people were greatly magnified by his depression, it is doubtful that they were its cause. Rather, his posthumous diagnosis of
bipolarity has been accepted as the
root cause of his erratic mood.
In 1890, Cantor was instrumental in founding the
Deutsche Mathematiker-Vereinigung and chaired its first meeting in Halle in 1891; his reputation was strong enough, despite Kronecker's opposition to his work, to ensure he was elected as the first president of this society. Setting aside the animosity he felt towards Kronecker, Cantor invited him to address the meeting, but Kronecker was unable to do so because his spouse was dying at the time.