Beethoven's Piano Sonata in A, Op. 2 no. 2, was written in 1795 and dedicated to Joseph Haydn, with whom he had studied composition in Vienna. It was published the following year. Like the rest of Op. 2, this is a broadly conceived work, spanning four movements and foreshadowing Beethoven's quasi-orchestral treatment of the piano.