Karol Szymanowski's Piano Sonata No. 2 in A major, Op. 21, M25, is a piano sonata in two movements. It was completed in 1911 and published in 1912 by Universal Edition Vienna. The sonata is still a relatively early work of Szymanowski, but represents the apogee of his Late Romantic period. It was premiered by Arthur Rubinstein on 7 May 1911.

Historical background 
The work was completed in 1911 in Tymoszówka, when Szymanowski was 29 years old, not long after completing his Second Symphony.

Shortly after its completion, Szymanowski wrote in a letter to Polish friend and music historian Zdzisław Jachimecki:"I have just finished the second 'Piano Sonata' before Arthur arrived. At first I did not attach a great importance to it, yet after a detailed study and after Arthur having played it all the 'hidden virtues' have come to light and as a result Ficio and Arthur got immensely excited about it, almost considering it superior to the Symphony."

Analysis
The sonata comprises two movements:
Allegro assai (Molto appassionato) (A minor – D♭ major – A minor – A major)
Theme and variations (A major – F major – B♭ major – A major – E major – A major)

1. Allegro assai (Molto appassionato) 

8 - 10 minutes

While seemingly rhapsodic, the first movement is in classical sonata allegro form, albeit that used by Chopin in his 3rd sonata--in which the development is heavily based on the first thematic group, with the recap omitting that group and arriving in the middle of the bridge to the 2nd thematic group. While ostensibly in A major, the first unambiguous A major chord occurs in the last measure of the piece. The movement enfolds a whole world of mercurial emotion: from tenderness, through great passion, to passages marked furioso, to quasi heroic affirmation—all undermined by constant, restless chromatic harmonic movement which gives it a sense of edgy anxiety.

The first movement starts in cut time. It opens with a searching introductory theme, in ascending octaves built around diminished 7ths, which recurs at various times throughout the two movements, accompanied by of broken octaves descending chromatically in tuplets in the left hand. The theme progresses and changes time signatures numerous times until the start of the 2nd thematic group in Quasi andante section marked by new, more lyrical theme.

2. Theme and variations 
17 - 19 minutes

The second movement comprises a theme, nine variations, and a fugue whose subject is itself based on the opening theme.

Reception 
After a performance of the sonata at a concert devoted to Szymanowski's works in December 1911, Willy Renz wrote in the magazine Die Musik:“If the composer forces himself towards greater transparency, to a sensible limit and concentration, if he can restrain his excessive fondness for contrapuntal tricks, polyphonic complications and orchestral excesses, we will have high hopes of him”

After attending a 1912 performance of the sonata by Arthur Rubinstein in Berlin, feeling that he could never reach Rubinstein's level as a pianist nor Szymanowski's level as a composer, Heinrich Neuhaus attempted suicide. After the incident, Szymanowski and Rubinstein found him safe and recovering in a hospital in Florence.

The sonata has developed a reputation of an extremely hard piece to master, both musically and technically, and after the Second World War it found its way into the repertoire of pianists such as Sviatoslav Richter or Marc-André Hamelin.

References 

Piano sonatas
1911 compositions
Compositions in A minor