The trio sonata is a musical form that was popular in the 17th and early 18th centuries.
A trio sonata is written for two solo melodic instruments and basso continuo, making three parts in all, hence the name trio sonata. However, because the basso continuo is usually made up of at least two instruments (typically a cello or bass viol and a keyboard instrument such as the harpsichord), performances of trio sonatas typically involve at least four musicians, and some 18th-century published editions have duplicate partbooks for the bass (Mangsen 2001). The trio sonatas by Arcangelo Corelli (opus 1, 1681, opus 3, 1689) were of unparalleled influence during his lifetime and for a long time after, inspiring slavish imitation by composers whose numbers were legion (Talbot 2001).
Johann Sebastian Bach's trio sonatas for organ (BWV 525–530) combine all three parts on one instrument. Typically the right hand, left hand and pedals will each take a different part thus creating the same texture as in a trio. A further innovation by Bach was the trio sonatas involving a concertante (obbligato) right-hand harpsichord part in addition to the bass line, plus one melodic instrument, thus for two players. Examples are the six sonatas for harpsichord and solo violin (BWV 1014–1019), three sonatas for harpsichord and viola da gamba (BWV 1027–1029), and three sonatas for harpsichord and flute (BWV 1030–1032)
Example repertoire 
- Tomaso Albinoni, 12 sonatas da chiesa op. 1 and 12 sonatas da camera op. 8.
- Arcangelo Corelli, 24 sonatas da chiesa opp.1 and 3, 24 sonatas da camera opp. 2 and 4.
- Henry Purcell, Twelve sonatas of three parts, 1683, ten sonatas in four parts, 1697 (both sets for two violins and BC).
- Johann Sebastian Bach, trio sonatas BWV 1036–1039. Some of these are of doubtful attribution, but all are typical of baroque chamber music. They are written for basso continuo and two violins, except 1039 which is written for two flutes and basso continuo (which concurs with BWV 1027).
- Dieterich Buxtehude, op. 1, six trio sonatas, and op. 2, seven trio sonatas. Scored for violin, viola da gamba and basso continuo. These were the only works by Buxtehude that were published during his lifetime.
- George Frideric Handel, trio sonatas opp. 2 and 5.
- Georg Philipp Telemann, around 150 trio sonatas, most in the Corelli style.
- Johann Pachelbel, Musikalische Ergötzung ("Musical Delight"), containing 6 trio sonatas for two violins and basso continuo. Original score in scordatura.
- Antonio Vivaldi, 12 trio sonatas da camera op. 1, and two trio sonatas mixed with solo sonatas in op. 5, and about ten unpublished trios.
- Jan Dismas Zelenka, Six trio (or quartet) sonatas, ZWV 181. Scored for two oboes, bassoon and basso continuo. These are technically difficult pieces, containing some extremely demanding bassoon and oboe parts. The fourth sonata from the set (G minor) can be heard at the Brightcecilia Classical Music Forums.
- Allsop, Peter. 1992. The Italian "Trio" Sonata: From Its Origins until Corelli. Oxford Monographs on Music. Oxford: Clarendon Press; New York: Oxford University Press. ISBN 0-19-816229-4.
- Apel, Willi. 1990. Italian Violin Music of the Seventeenth Century, edited by Thomas Binkley. Bloomington: Indiana University Press. ISBN 0-253-30683-3.
- Hogwood, Christopher. 1979. The Trio Sonata. BBC Music Guides. London: British Broadcasting Corporation. ISBN 0-563-17095-6.
- Kamien, Roger. Music an Appreciation, Edition Sixth Brief
- Mangsen, Sandra. 2001. "Trio Sonata". The New Grove Dictionary of Music and Musicians, second edition, edited by Stanley Sadie and John Tyrrell. London: Macmillan Publishers.
- Schenk, Erich. 2005. Die Triosonate. Das Musikwerk, eine Beispielsammlung zur Musikgeschichte, Neuausgabe 20. Laaber: Laaber Verlag. ISBN 3-89007-623-8
- Talbot, Michael. 2001. "Corelli, Arcangelo". The New Grove Dictionary of Music and Musicians, second edition, edited by Stanley Sadie and John Tyrrell. London: Macmillan Publishers.