A piano sonata is a sonata written for a solo piano. Piano sonatas are usually written in three or four movements, although some piano sonatas have been written with a single movement (Scarlatti, Scriabin, Medtner), two movements (Haydn), five (Brahms' Third Piano Sonata) or even more movements. The first movement is generally composed in sonata form.
In the Baroque era, the use of the term "sonata" generally referred to either the sonata da chiesa (church sonata) or sonata da camera (chamber sonata), both of which were sonatas for various instruments (usually one or more violins plus basso continuo). The keyboard sonata was relatively neglected by most composers.
The sonatas of Domenico Scarlatti (of which there are over 500) were the hallmark of the Baroque keyboard sonata, though they were for the most part unpublished during Scarlatti's lifetime. The majority of these sonatas are in one-movement binary form, both sections being in the same tempo and utilizing the same thematic material. These sonatas are prized for both their technical difficulty and their musical and formal ingenuity. The influence of Spanish folk music is evident in Scarlatti's sonatas.
Other composers of keyboard sonatas (which were primarily written in two or three movements) include Marcello, Giustini, Durante and Platti.