Subject (music)

In music, a subject is the material, usually a recognizable melody, upon which part or all of a composition is based. In forms other than the fugue, this may be known as the theme.
Characteristics.
A subject may be perceivable as a complete musical expression in itself, separate from the work in which it is found. In contrast to an idea or motif, a subject is usually a complete phrase or period. The "Encyclopédie Fasquelle" defines a theme (subject) as "[a]ny element, motif, or small musical piece that has given rise to some variation becomes thereby a theme".
Thematic changes and processes are often structurally important, and theorists such as Rudolph Reti have created analysis from a purely thematic perspective. Fred Lerdahl describes thematic relations as "associational" and thus outside his cognitive-based generative theory's scope of analysis.
In different types of music.
Music based on a single theme is called 'monothematic', while music based on several themes is called 'polythematic'. Most fugues are monothematic and most pieces in sonata form are polythematic. In the exposition of a fugue, the principal theme (usually called the 'subject') is announced successively in each voice – sometimes in a transposed form.
In some compositions, a principal subject is announced and then a second melody, sometimes called a 'countersubject' or 'secondary theme', may occur. When one of the sections in the exposition of a sonata-form movement consists of several themes or other material, defined by function and (usually) their tonality, rather than by melodic characteristics alone, the term 'theme group' (or 'subject group') is sometimes used.
Music without subjects/themes, or without recognizable, repeating, and developing subjects/themes, is called 'athematic'. Examples include the pre-twelve-tone or early atonal works of Arnold Schoenberg, Anton Webern, Alban Berg, and Alois Hába. Schoenberg once said that, "intoxicated by the enthusiasm of having freed music from the shackles of tonality, I had thought to find further liberty of expression. In fact, I … believed that now music could renounce motivic features and remain coherent and comprehensible nevertheless". Examples by Schoenberg include "Erwartung". Examples in the works of later composers include "Polyphonie X" and "Structures I" by Pierre Boulez, Sonata for Two Pianos by Karel Goeyvaerts, and "Punkte" by Karlheinz Stockhausen.
Countersubject.
In a fugue, when the first voice has completed the subject, and the second voice is playing the answer, the first voice usually continues by playing a new theme that is called the 'countersubject'. The countersubject usually contrasts with the subject/answer phrase shape.
In a fugue, a countersubject is "the continuation of counterpoint in the voice that began with the subject", occurring against the answer. It is not usually regarded as an essential feature of fugue, however.
The typical fugue opening resembles the following:
 Soprano voice: Answer 
 Alto voice: Subject Countersubject
Since a countersubject may be used both above and below the answer, countersubjects are usually invertible, all perfect fifths inverting to perfect fourths which required resolution.
References.
Sources