Discourse analysis involves analyzing language in its social context. It analyzes real texts, not artificial ones, and looks at utterances rather than isolated sentences. There are several approaches to discourse analysis, including sociology, ethnography, variation theory, and systemic functional linguistics. Spoken and written discourse differ in aspects like lexical density, grammar use, and repetition of words. Corpus linguistics uses large text databases to quantitatively and qualitatively analyze patterns of language use and variation in discourse. Discourse analysis can inform language pedagogy by helping teachers delineate genres, explain text features, evaluate student performance, and teach discourse structures.