In 1860 his family moved to Jihlava, where Gustav took piano and theory lessons. From 1875 to 1878 he was at Vienna Conservatory, where he studied the piano, harmony and composition. After that he attended university lectures, worked as a music teacher and composed Das klagende Lied, a cantata indebted to the operas of Weber and Wagner but also showing many conspicuously Mahlerian features.
In 1880 Mahler accepted a conducting post at a summer theatre at Bad Hall, and he was engaged in a similar capacity in 1881 and 1883 at the theatres in Ljubljana and Olomouc. Between these appointments he engaged in composition and other conducting until, in autumn 1883, he became music director at Kassel. He found conditions uncongenial, and the repertory consisted solely of light opera; but an unhappy love affair with one of the singers led to the composition of his first masterpiece, the song cycle Lieder eines fahrenden Gesellen, and the inception of the closely related First Symphony.
Early in 1885 Mahler secured the post of second conductor at the Neues Stadttheater in Leipzig, to begin in July 1886, and a few months later he resigned his post at Kassel. The intervening year he spent at the Landestheater in Prague, where he had the opportunity of conducting operas by Gluck, Mozart, Beethoven and Wagner. There were at first fewer such opportunities at Leipzig, but in January 1887 he took over the Ring cycle from Arthur Nikisch, who fell ill, and convincingly established among critics and public his genius as an interpretative artist. The following year he completed Weber's unfinished comic opera Die drei Pintos (its successful performances in 1888 made Mahler famous and provided a useful source of income) and fell in love with the wife of Weber's grandson. Another consequence of his friendship with the Webers was the discovery in 1887 of the musical potential of Des Knaben Wunderhorn, a collection of folklike texts by Arnim and Brentano which provided Mahler with words for all but one of his songs for the next 14 years.
Disagreements with colleagues led to Mahler's resignation at Leipzig in May 1888 and to his dismissal a few months later from Prague, where he had been engaged to prepare Die drei Pintos and a production of Cornelius's Der Barbier von Bagdad; but within a few weeks he secured a far more important appointment at the Royal Opera in Budapest. His first year there was overshadowed by the illness and deaths of his parents and his sister. Though he was successful in bringing the opera house into profit and improving standards and repertory, the imminent appointment of an Intendant with artistic control made his situation untenable; he resigned and became first conductor at the Stadttheater, Hamburg. Despite a stifling artistic atmosphere and a heavy workload, Mahler returned to composition and at his summer retreat in the Salzkammergut completed the Second and Third Symphonies. 1895 brought both tragedy, when his youngest brother committed suicide, and success, with the premiere of the Second Symphony in Berlin in December. Now a conductor of international stature and a composer of growing reputation, he turned his attention to the Vienna Hofoper. The main obstacle was his Jewish origins; so he accepted Catholic baptism in February 1897 and was appointed Kapellmeister at Vienna two months later.
At Vienna Mahler brought a stagnating opera house to a position of unrivalled brilliance, especially during 1903-7, when he collaborated with the designer Alfred Roller on a series of memorable productions. In 1901 he had a villa built at Maiernigg on the Wörthersee in Carinthia, where he spent the summers composing. In 1902 he married Alma, daughter of the artist Emil Jakob Schindler, and though their life together was not untroubled (its strains caused him to consult Freud for psychoanalysis in 1910) the security benefited his creative life. At Maiernigg he completed symphonies nos.5-8 and in 1904 the Kindertotenlieder, settings of five poems by Rückert on the death of children. The death of Mahler's own elder daughter, Maria, from scarlet fever three years later left him distraught.
In Vienna Mahler was surrounded by radical young composers, including Schönberg, Berg, Webern and Zemlinsky, whose work he supported and encouraged. His propagation of his own music, however, aroused opposition from a section of the Viennese musical establishment, and when the campaign against him, led by an anti-semitic press, gained momentum he was again forced to look elsewhere. This time he turned to New York, where he spent his last winters as conductor, first of the Metropolitan Opera and, from 1910, of the New York Philharmonic Orchestra. He continued to spend the summers in Europe, where he undertook further conducting and completed the valedictory Ninth Symphony and Das Lied von der Erde. This last, a setting of six Chinese poems in German translation, took the shape of a large-scale symphony for two voices and orchestra; but Mahler, whose fear of death and sense of fate had been intensified by the diagnosis of a heart condition in 1907, refused to number the work 10, citing Beethoven, Schubert and Bruckner. He did, however, start work on a tenth symphony, but died before he could complete it.
Although as a conductor Mahler achieved fame primarily in opera, his creative energies were directed almost wholly towards symphony and song. Even in the early Das klagende Lied, there are stylistic features to be found in his mature music, for example the combining of onstage and offstage orchestras, the association of high tragedy and the mundane, the drawing on folksong ideas and the dramatic-symbolic use of tonality. This last reappeared in his early masterpiece, the Lieder eines fahrenden Gesellen, which has an evolutionary tonal scheme paralleling the changing fortunes of the travelling hero. In the 1890s Mahler was much influenced by the Wunderhorn poems, in his symphonies as well as his songs, for he often used song to clarify an important moment in the structure of a symphony, for example 'Urlicht' in Sym.2, which he found himself unable to continue after writing the imposing first movement. Sym.3 is more idiosyncratic; again, its dramatic scheme evolved with recourse to song and chorus. Sym.4 retums to tradition, in a first movement of rare wit and subtlety; here the poetic idea is the progress from experience to innocence (with a Wunderhorn song finale). While Sym.2, 'The Resurrection', moves from c Minor to E-flat, Sym.4 goes from G Major to the 'heavenly' E Major. Parody, irony and satire are important in Mahler's thinking during these years, with popular invention (like the children's round in Sym.1 and the march tunes of Sym.3) and elements of distortion.
Symphonies 5, 6 and 7 are sometimes regarded as a trilogy, although Sym.5 is a heroic work, with a narrative running from its opening funeral march through the agitated Allegro to a Scherzo and a triumphant conclusion. The symphony moves from c-sharp Minor to D Major. Sym.6, a tragic work - and in many musicians' view, his greatest symphony for its equilibrium between form and drama - begins and ends in A Minor; the finale makes it clear that there is no escape for the implied hero and indeed his death is symbolically enacted in the movement's shattering climax. The shape of Sym.7, which moves from e Minor to C Major, is less satisfying; possibly, with its dark, nocturnal middle movement, it is consciously built round the poetic concept of darkness moving towards the light of the finale. The largest-scale of Mahler's symphonies is Sym.8, the so-called 'Symphony of a Thousand', in which the second part is a vast synthesis of forms and media embodying the setting of the final scene of Goethe's Faust as an amalgam of dramatic cantata, oratorio, song cycle, Lisztian choral symphony and instrumental symphony. This public pronouncement was followed by one of his most personal, Das Lied von der Erde, influenced in its vocal writing and woodwind obbligatos by Mahler's new interest in Bach. His last two symphonies return to the four-movement scheme of the middle-period ones, incorporating extensions of the character movements of his earlier works with the new type of slow first movement (followed up in the unfinished Tenth) and ending with an Adagio in a mood of profound resignation. Mahler's extension of symphonic form, of the symphony's expressive scope and the use of the orchestra (especially the agonized timbres he obtained by using instruments, particularly wind, at the top of their compass) represent a pained farewell to Romanticism; different aspects were followed up by the Second Viennese School, Shostakovich and Britten.
(See the article Mahler: Music and Musical Style)