The string quartet was the main but not the only genre developed at this time for small forces in relatively intimate circumstances. Chamber music is a term for music designed to be played in a room (a chamber) — in a palace drawing room or in a small hall. Chamber music can be taken as encompassing compositions for from two to nine players. Other types are the piano trio (violin, cello, piano: a favorite of Haydn) and string quintets (string quartet plus another low instrument; Mozart wrote four superb quintets with two violas, and one of Schubert’s great masterpieces is a quintet with two cellos).
Broadly speaking, what has been said above about the intimate character of the quartet applies to all chamber music, though it’s probably clear enough that a string octet, with eight players, must be less subtle and more orchestral than a string trio, with three players.