Music theory is the study of music, generally in a highly technical manner outside of other disciplines.
More broadly it refers to any study of music, usually related in some form with compositional concerns, and may include mathematics, physics, and anthropology.
What is most commonly taught in beginning music theory classes are guidelines to write in the style of the common practice period, or tonal music.
Theory, even that which studies music of the common practice period, may take many other forms.
Musical set theory is the application of mathematical set theory to music, first applied to atonal music.
Speculative music theory, contrasted with analytic music theory, is devoted to the analysis and synthesis of music materials, for example tuning systems,
generally as preparation for composition.