Sociolinguistics is the study of language in relation to society, whereas the sociology of language is the study of society in relation to language.