Pragmatics is a subfield in the philosophy of language, specifically those aspects of language that relate to the manner in which words are used to mean more than its literal decontextualized meanings and how we manage to understand such usage (e.g., implicatures, metaphors, etc.).
Discourse analysis is a term used to denote a wide gamut of analytic methods devised in order to uncover the manner in which knowledge may be derived from the examination of language use. This may include conversation analysis, narrative analysis, ethnomethodology, frame analysis and many others.
Pragmatics as explained by the Palo Alto group of psychologists is the study and practice of the intention of a particular utterance. Is an utterance meant to convince, threaten, suggest, ask a question, etc. In other words, what is actionable about an utterance and has the speaker made it evident through tone, rhythm, or emphasis.
Discourse analysis is a wide field, which can include pragmatics, but I have seen it used most frequently in attempts to understand preference, valence, and attitudinal analysis, either in common everyday interaction or in speeches and other presentations. Obviously discourse analysis usually requires a recording or transcription of language since it would be difficult to analyze a live conversation or speech.
Both of them are branches of linguistics. Pragmatics deals with invisible meaning of words. While discourse analysis deals with the study of texts and pays attention to the context of language.
There are many ways to slice this question. One approach to making the distinction would be to think of "discourse analysis" as having a greater focus on the form of the language (essentially an extension of syntactic analysis above the level of the sentence - looking at cohesion, coherence, and macrostructure), whereas pragmatics would look at the illocutionary (functional purpose) and perlocutionary (response to) elements of the language used. Pragmatics analysis is part of discourse analysis in this framing. This means that you can, conceptually, do discourse analysis that ignores the pragmatic dimension of the discourse, even if that is rare. That said, much of the work that falls under the label of discourse analysis is focused on the interface between the content and purpose of the language being used and how the linguistic and social context influences the meaning.
Pragmatics is often associated with theories of language use such as speech acts, relevance, politeness...etc. Discourse analysis broadly analysizes meaning (of language use) in different contexts, using different approaches, with different genres (e,g. ethnographic, multimodal, conversational). One particular pragmatic approach can pass as type of discourse analysis.
Pragmatics and discourse analysis are two related ways of framing the manner in which language interacts with contexts in defining realities. Of course, that interrelates the two approaches so closely that a certain type of ambiguity remains in distinguishing them. However, although both are inscribed by context and the organisation of language to produce meaning in specific contexts, if they are both viewed in terms of systems, pragmatics can be considered as a sub-system of discourse analysis. Pragmatics refers to specific frames of reality and context, and specific meanings being assigned to the interpretation of a context and its reality by the choice of word, sign or symbol due to the nature of the organisation of text and context, and hence the implied intentions of the initiator of the text. Discourse analysis on the other hand, aiming at a broader view of reality, pursues framing and meaning making through an emphasis on interdisciplinarity because of the complexity of context. It pursues both meaning making and knowledge production through the frames of possibilities and habits below the level of consciousness, including the ideological, the socio-cultural, the philosophical, psychological, etc., dimensions of context and interaction. In effect, discourse analysis moves beyond intention and implicature (pragmatics) towards making the levels of unconscious and its possibilities conscious for meaning making, and knowledge production.
If we distinguish language use and language system, the dialogical part of language use (dialogical in a wide sense) would be the pragmatic part, and the monological part would be the discourse analysis part.
So performative forces of the utterance are typical topics for pragmatics, whereas discourse has inherent descriptive, narrative, and argumentative structure and form the flows of communicated thinking that makes social life possible, ideological, and sometimes meaningful. (Look at Charlottesville...).
I'll try to put in a nutshell. In discourse analysis, you would be looking at how a communicative event works mechanically whereas in pragmatics you would be looking for its underlying (implicit) meanings.Discourse analysis and pragmatics are intertwined, complex and synergistic, so it might be better to ask about the possible similarities between the two.
Pragmatics is a part of the discourse analysis, they are closely related. The pragmatics studies the behavior of the subject who speaks in action and the analysis of the discourse studies, the verbal, nonverbal and nonverbal languages.
The two fields of language use, discourse analysis and pragmatics, are subjects of context. While the former deals with context within the text, the latter centers on context outside the text. I can deduce that pragmatics is a sub-set of discourse analysis.
Look: speech acts used in situations are essential to pragmatics. Discourse analysis distinguishes political discourse from religious discourse, for example, and has to work on much larger corpora than pragmatics, which is situational. Whereas discourse is institutional. The difference between institutions and situations is huge.
Critical discourse analysis and pragmatics are linked profoundly. As discourse is not analyzed on surface level only, when we go and drill down to the deep meaning, we take into account the context in which certain discourse took place, ideology which loaded that discourse and what speaker really intended to say or denote when s/he uttered those words/symbols/etc. So, we have actually started doing pragmatic analysis of that discourse. I think, the very emergence of CDA is a movement towards pragmatics as a field of study. Many books on Pragmatics will show you chapter on CDA.
Teh DNA of discourse : Discourse is sense-making with language, and there are, semiotically speaking, three such forms of sense-making: description, narration, and argumentation. Description 'scans' its object; narration follows its object's avatars from the viewpoint of the subject that targets it; and argumentation compares and evaluates descriptions and narrations. In science, D and A are foregrounded; in philosophy, N and A are foregrounded; and in history, N and D are foregrounded. There are many other constellations, all anchored in corresponding institutions. Religious discourse is almost pure N –
The above DNA analysis of discourse is detailed in my book Spaces, Domains, and Meaning, from 2004. The pragmatics of discourse is of course a study of how situations affect discursive sense-making. Now, a 'situation' is an incidence within a domain of experience, and what is a 'domain'? Thus, a political situation is different from an intimate situation in your love life — so, the domain theory takes on the task to define and suggest a system of experiential domains, transculturally, based on the human life-world. Not easy. But possible.
Pragmatics concerns the meaning of the utterance with respect to the individual while discourse concerns the meaning of the utterance with respect to the society.
Zuhour, your distinction goes in the direction of a domain theory for contextual analysis, but it is too simple. Instead of 'individual', I would suggest: intimate relations (since it is about relations). Then there are non-intimate social relations. And relations between persons and nature. And finally, at the basic level, relations between a person and himself, mentally (dreams, thoughts, feelings, desires). So we get at least four basic domains: D1 (physis, nature), D2 (polis, society), D3 (logos, communication), D4 (psyché, inner life). Language has terms for all four of them, and when you project from one to another domain, you get metaphor. "Society is a bee hive", "my soul is a battlefield", and things like that.
Abdunasir: Pragmatics is the umbrella term; Discourse is one of the disciplines under that umbrella term. Here are two PowerPoint that relate to Discourse Theory, and one PowerPoint that relates to Pragmatics.