Sonata in music, literally means a piece played as opposed to a cantata (Latin and Italian cantare, “to sing”), a piece sung. The term, being vague, evolved through the history of music, designating a variety of forms until the Classical era, when it took on increasing importance, and by the early 19th century came to represent a principle of composing large scale works. It was applied to most instrumental genres and regarded—alongside the fugue—as one of two fundamental methods of organizing, interpreting and analyzing concert music. Though the musical style of sonatas has changed since the Classical era, most 20th- and 21st-century sonatas still maintain the same structure.
In the Baroque period, a sonata was for one or more instruments almost always with continuo. After the Baroque period most works designated as sonatas specifically are performed by a solo instrument, most often a keyboard instrument, or by a solo instrument together with a keyboard instrument. In the late Baroque and early Classical period, a work with instrument and written-out keyboard part was referred to as having an obbligato keyboard part, in order to distinguish this from use of an instrument or instruments as continuo, though this fell out of usage by the early 19th century.
Sonatas for a solo instrument other than keyboard have been composed, as have sonatas for other combinations of instruments.
Domenico Scarlatti – Sonate in E major, KV 531 (allegro)