The Piano Sonata No. 31 in A-flat major, Op. 110, by Ludwig van Beethoven was composed in 1821. It is the central piano sonata in the group of three opp. 109–111 which he wrote between 1820 and 1822, and the thirty-first of his published piano sonatas.
The sonata is in three movements. The moderato first movement in sonata form, marked con amabilità, is followed by a fast scherzo. The finale comprises a slow recitative and arioso dolente, a fugue, a return of the arioso lament, and a second fugue that builds to an affirmative conclusion.
In the summer of 1819 Moritz Schlesinger, from the Schlesinger firm of music publishers based in Berlin, met Beethoven and asked to purchase some compositions. After some negotiation by letter, and despite the publisher’s qualms about Beethoven’s retaining the rights for publication in England and Scotland, Schlesinger agreed to purchase 25 songs for 60 ducats and three piano sonatas at 90 ducats (Beethoven had originally asked 120 ducats for the sonatas). In May 1820 Beethoven agreed, the songs (op. 108) already being available, and he undertook to deliver the sonatas within three months. These three sonatas are the ones now known as opp. 109–111.
Beethoven was prevented from completing all three of the promised sonatas on schedule by factors including an attack of jaundice; Op. 109 was completed and delivered in 1820, but correspondence shows that Op. 110 was still not ready by the middle of December 1821, and the completed autograph score bears the date December 25, 1821. Presumably the sonata was delivered shortly thereafter, since Beethoven was paid the 30 ducats for this sonata in January 1822.
Alfred Brendel characterizes the main themes of the sonata as all derived from the hexachord – the first six notes of the diatonic scale – and the intervals of the third and fourth that divide it. He also points out that contrary motion is a feature of much of the work, particularly prominent in the scherzo second movement.