Brahms composed the first two movements during the summer of 1862, as well as an Adagio which was later deleted. The final movement was composed in 1865. The sonata is entitled "Sonate für Klavier und Violoncello" and the piano "should be a partner - often a leading, often a watchful and considerate partner - but it should under no circumstances assume a purely accompanying role". It is dedicated to Josef Gänsbacher, a singing professor and amateur cellist. In the course of a private performance for an audience of friends, Brahms played so loudly that the worthy Gänsbacher complained that he could not hear his cello at all - "Lucky for you, too", growled Brahms, and let the piano rage on. It is "a homage to J. S. Bach" and the principal theme of the first movement and of the fugue are based on Contrapunctus 4 and 13 of The Art of Fugue. Brahms performed the sonata in Mannheim in July 1865 and then offered it to Breitkopf & Härtel, who turned it down. He had however also sent the sonata to Simrock describing it, in one of the most mendacious statements made by a major composer about his own work, as "a violoncello sonata which, as far as both instruments are concerned, is certainly not difficult to play", and they published it in 1866. The work was championed in Europe and London by Robert Hausmann. In gratitude, Brahms dedicated his Second Sonata to Hausmann.
Musical description
There are three movements:
First movement
This movement is in a long-lined sonata form, opening with solo cello over chords in the keyboard, a melody that gains and loses in intensity and dynamics, and then passes to the keyboard, where the same general curve is followed without the same notes; the breadth and lyrical quality of this passage are characteristic of much of the movement. We pass from E minor through C major to a substantial second group of themes in first B minor, then B major. This exposition repeats, followed by a development mostly of the second half of the opening theme's first phrase, together with a version of the insistent descending fifth that had accompanied the last part of the exposition, building to a peak of energy, in which the cello makes two-octave leaps bridged by acciaccaturas against fortissimo variants of the opening theme, after which another theme is heard and varied at some length, and the music, after another surge, dies away into the quietreturn of the opening theme. The recapitulation is fairly regular, and the coda expands on the B major theme – now in E major, in which key the movement closes, directly setting up the V chord in the key of the second movement.
Second movement
Brahms' antiquarian interests, his studies of music from the Renaissance to the Classical periods, show in his work — he edited and helped publish a two-chorus motet by MozartVenite Populi, he had a collection of sonatas by Scarlatti — and in his composition, his motets Op. 74, his interest in the fugue and the passacaglia, or in such pieces as the minuet of the String Quartet No. 2, and this one. It is generally quiet and often staccato. Characteristic of this section is the use of ornamentation that has a French baroque sound. The trio, of sinuous melody, features a characteristic figuration in the piano right hand whose top notes are constantly in unison with either the piano left hand or with the cello. The opening unison fragment of the trio hints at the parallel major, before revealing the more unusual key choice of the minor-mode raised submediant. A chromatic third relationship between the keys of a minuet or scherzo and its trio occur in only one other multimovement Brahms work: Symphony No. 1, in which the A major third movement moves to enharmonic III for the middle section.
Third movement
This movement is often referred to as a fugue. It is more of a sonata movement with very substantial fugal sections, however. The opening theme, which is based on Contrapunctus 13 from the Kunst der Fuge, does develop fugally until into the G majorsecond subject group, a section which is much more conventionally, if wonderfully, treated. The development opens with descending octaves — the first half of the fugato theme — under statements of the triplet theme which is its second half, in imitation between piano and cello. This leads to C minor, to an inverted statement of the fugue, to another episode-like section and after a brief section again in fugal imitation to a tense and tension-gaining section in true sonata style and a return to the main key, the second theme instead of the first, in triplets. After a repeat of the second theme, the opening fugato returns, quoted in its entirety but staying in E minor rather than modulating to G, leading to the Più presto coda. It has been suggested that a sonata by Bernhard Romberg also helped inspire this work. However, given that the Romberg work in question, his Sonata in e minor, op. 38, was originally published as a trio for viola and 2 cellos in 1826 and later arranged as a sonata for cello and piano by Friedrich Gustav Jensen c. 1877, this theory is untenable.