The study of the structures and rules of language, particularly in relation to word formation and sentence structure.