ArticleslgStudy

mathematics

De Morgan's laws

De Morgan's laws is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand De Morgan's laws rather than just read about it. In short: In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician.

De Morgan's laws — main illustration
De Morgan's laws — illustration

Key takeaways

  • De Morgan's laws belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect De Morgan's laws to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of De Morgan's laws from memory before moving on to harder problems.

Reference excerpt

In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation. The rules can be expressed in English as:

The negation of "A and B" is the same as "not A or not B". The negation of "A or B" is the same as "not A and not B". or

The complement of the union of two sets is the same as the intersection of their complements The complement of the intersection of two sets is the same as the union of their complements or

not (A or B) = (not A) and (not B) not (A and B) = (not A) or (not B) where "A or B" is an "inclusive or" meaning at least one of A or B rather than an "exclusive or" that means exactly one of A or B.

Another form of De Morgan's law is: A−(B∪C)=(A−B)∩(A−C)A−(B∩C)=(A−B)∪(A−C) Applications of the rules include simplification of logical expressions in computer programs and digital circuit designs. De Morgan's laws are an example of a more general concept of mathematical duality.

Formal notation The negation of conjunction rule may be written in sequent notation: ¬(P∧Q)⊢(¬P∨¬Q),and(¬P∨¬Q)⊢¬(P∧Q). The negation of disjunction rule may be written as: ¬(P∨Q)⊢(¬P∧¬Q),and(¬P∧¬Q)⊢¬(P∨Q). In rule form: negation of conjunction

and negation of disjunction

and expressed as truth-functional tautologies or theorems of propositional logic: ¬(P∧Q)↔(¬P∨¬Q),¬(P∨Q)↔(¬P∧¬Q). where P and Q are propositions expressed in some formal system. The generalized De Morgan's laws provide an equivalence for negating a conjunction or disjunction involving multiple terms.For a set of propositions P1,P2,…,Pn, the generalized De Morgan's Laws are as follows: ¬(P1∧P2∧⋯∧Pn)↔¬P1∨¬P2∨…∨¬Pn¬(P1∨P2∨⋯∨Pn)↔¬P1∧¬P2∧…∧¬Pn These laws generalize De Morgan's original laws for negating conjunctions and disjunctions.

Substitution form De Morgan's laws are normally shown in the compact form above, with the negation of the output on the left and negation of the inputs on the right. A clearer form for substitution can be stated as: (P∧Q)⟺¬(¬P∨¬Q),(P∨Q)⟺¬(¬P∧¬Q). This emphasizes the need to invert both the inputs and the output, as well as change the operator when doing a substitution.

Set theory In set theory, it is often stated as "union and intersection interchange under complementation", which can be formally expressed as: A∪B‾=A‾∩B‾,A∩B‾=A‾∪B‾, where:

A‾ is the negation of A, the overline being written above the terms to be negated, ∩ is the intersection operator (AND), ∪ is the union operator (OR).

Unions and intersections of any number of sets The generalized form is ⋂i∈IAi‾≡⋃i∈IAi‾,⋃i∈IAi‾≡⋂i∈IAi‾, where I is some, possibly countably or uncountably infinite, indexing set. In set notation, De Morgan's laws can be remembered using the mnemonic "break the line, change the sign".

Boolean algebra In Boolean algebra, similarly, this law which can be formally expressed as: A∧B‾=A‾∨B‾,A∨B‾=A‾∧B‾, where:

A‾ is the negation of A, the overline being written above the terms to be negated, ∧ is the logical conjunction operator (AND), ∨ is the logical disjunction operator (OR). which can be generalized to A1∧A2∧…∧An‾=A1‾∨A2‾∨…∨An‾,A1∨A2∨…∨An‾=A1‾∧A2‾∧…∧An‾.

Engineering In electrical and computer engineering, De Morgan's laws are commonly written as: (A⋅B)‾≡(A‾+B‾) and (A+B)‾≡(A‾⋅B‾), where:

⋅ is the logical AND, + is the logical OR, the overbar is the logical NOT of what is underneath the overbar.

Text searching De Morgan's laws commonly apply to text searching using Boolean operators AND, OR, and NOT. Consider a set of documents containing the words "cats" and "dogs". De Morgan's laws hold that these two searches will return the same set of documents:

Search A: NOT (cats OR dogs) Search B: (NOT cats) AND (NOT dogs) The corpus of documents containing "cats" or "dogs" can be represented by four documents:

Document 1: Contains only the word "cats". Document 2: Contains only "dogs". Document 3: Contains both "cats" and "dogs". Document 4: Contains neither "cats" nor "dogs". To evaluate Search A, clearly the search "(cats OR dogs)" will hit on Documents 1, 2, and 3. So the negation of that search (which is Search A) will hit everything else, which is Document 4. Evaluating Search B, the search "(NOT cats)" will hit on documents that do not contain "cats", which is Documents 2 and 4. Similarly the search "(NOT dogs)" will hit on Documents 1 and 4. Applying the AND operator to these two searches (which is Search B) will hit on the documents that are common to these two searches, which is Document 4. A similar evaluation can be applied to show that the following two searches will both return Documents 1, 2, and 4:

Search C: NOT (cats AND dogs), Search D: (NOT cats) OR (NOT dogs).

Example Given an integer n, consider the following statement: "It is not the case that n is both even and positive." Using De Morgan's laws, this statement can be rewritten to read: "The number n is either not even or it is not positive." Similarly, the statement "It is not the case that n is either even or positive" can be rewritten as "The number n is not even and is not positive".

History The laws are named after Augustus De Morgan (1806–1871), who introduced a formal version of the laws to classical propositional logic. The first explicit statement of De Morgan's laws in his own work can be found in his 1847 book Formal Logic. De Morgan's formulation was influenced by the algebraization of logic undertaken by George Boole, which later cemented De Morgan's claim to the find. Nevertheless, a similar observation was made by Aristotle, and was known to Greek and Medieval logicians. For example, in the 14th century, William of Ockham wrote down the words that would result by reading the laws out. Jean Buridan, in his Summulae de Dialectica, also describes rules of conversion that follow the lines of De Morgan's laws. Still, De Morgan is given credit for stating the laws in the terms of modern formal logic, and incorporating them into the language of logic. De Morgan's laws can be proved easily, and may even seem trivial. Nonetheless, these laws are helpful in making valid inferences in proofs and deductive arguments.

Proof for Boolean algebra De Morgan's theorem may be applied to the negation of a disjunction or the negation of a conjunction in all or part of a formula.

… excerpt ends here. Continue reading the full article.

Illustrations

De Morgan's laws: De Morgan's laws represented with Venn diagrams. In each case, the resultant set is the set of all points in any shade of blue.
De Morgan's laws represented with Venn diagrams. In each case, the resultant set is the set of all points in any shade of blue.
De Morgan's laws: De Morgan's law with set subtraction operation
De Morgan's law with set subtraction operation
De Morgan's laws: De Morgan's Laws represented as a circuit with logic gates (International Electrotechnical Commission diagrams)
De Morgan's Laws represented as a circuit with logic gates (International Electrotechnical Commission diagrams)

Worked examples

Example 1 — a first encounter with De Morgan's laws

Start with the simplest possible case. Write down what De Morgan's laws claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to De Morgan's laws before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about De Morgan's laws ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of De Morgan's laws

In research
De Morgan's laws appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses De Morgan's laws in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
De Morgan's laws is common in secondary-school and first-year university syllabi. It links to neighbouring topics Boolean algebra, Duality (mathematics), Rules of inference, so understanding it makes those chapters shorter.
In everyday life
Look for De Morgan's laws outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “De Morgan's laws” →

How to study De Morgan's laws in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what De Morgan's laws means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain De Morgan's laws out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is De Morgan's laws in simple terms?

In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician.

Why does De Morgan's laws matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study De Morgan's laws?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on De Morgan's laws.

Tags

  • Boolean algebra
  • Duality (mathematics)
  • Rules of inference
  • Theorems in propositional logic

Keep exploring