See How Things Work

Negation

Unit
Logic
Part
1. Statements
Lesson
1.2

The negation of a statement is the statement that says it is not so. This lesson defines negation and its symbol ¬, gives its truth table, shows how to negate statements about numbers correctly, including comparisons and the edge cases 0 and 1, and proves that negating twice gives back the original truth value.

The negation of a statement

Lesson 1.1 (Statements and truth values) built compound statements from simple ones with connectives. The simplest connective acts on a single statement.

Definition (Negation).

Let p be a statement. The negation of p, written ¬p, is the statement “it is not the case that p”.⁠[1] It is read “not p”, and its truth value is the opposite of the truth value of p.⁠[2]

So ¬p is true when p is false, and false when p is true.⁠[3] The sign ¬ may also be read “p is false”.⁠[4] Unlike the connectives of the next lesson, negation makes a new statement from a single statement.⁠[5]

Convention.

The notation for negation is not standardized.⁠[6] Rosen names ¬p and p̅ (p with a bar) as the most common notations in mathematics, and lists ∼p, −p, p′, Np and !p as others.⁠[7] The sign ∼ is the tilde, printed ~ in some books, which use it as their symbol for negation.⁠[8] This site writes ¬p.

Example (Negating statements and finding truth values).

Write the negation of each statement in words and give the truth values of the statement and its negation.

  1. p: 45 is a multiple of 9. Its negation ¬p: 45 is not a multiple of 9. Since 45 = 5 × 9, p is true, so ¬p is false.
  2. q: 7 × 6 = 43. Its negation ¬q: 7 × 6 ≠ 43, or “it is not the case that 7 × 6 = 43”. Since 7 × 6 = 42, q is false, so ¬q is true.
  3. r: 39 is not a prime number. Its negation ¬r: 39 is a prime number. Since 39 = 3 × 13, r is true and ¬r is false.

Answer: in each pair exactly one statement is true. The third case shows that negating a statement that already contains “not” removes the word: most statements are negated by adding or removing “not”.⁠[9]

The truth table of negation

A statement p has two possible truth values, so a table with one row for each of them shows the whole behavior of ¬p.⁠[10] For ¬p to be true, p must be false.⁠[11]

p¬p
TF
FT
Table. The truth table of negation: one row for each truth value of p. The column of ¬p is the column of p with every value changed.⁠[10]
Proposition .

For every statement p, exactly one of p and ¬p is true.

Proof.

By the definition of a statement, p is either true or false, and not both. If p is true, then ¬p is false, so exactly one of them, p, is true. If p is false, then ¬p is true, so exactly one of them, ¬p, is true. These are the only two rows of the table.

This gives a test for a proposed negation. If p and a sentence s are both true, or both false, then s is not a negation of p, since ¬p always has the opposite truth value of p. For sentences about a letter, such as x > 3, the test decides the question: s is a negation of p exactly when, for every value of the letter, one of p and s is true and the other false, and a single value at which they agree shows that it is not. For a statement without letters, an opposite truth value is not enough: “2 is prime” is true and “1 is prime” is false, but “2 is prime” does not say that 1 is not prime.

Negating statements about numbers

“It is not the case that …” in front of a statement always gives its negation. Shorter forms are clearer, but they must be checked with the test above, because the obvious “opposite” is often not the negation.

Comparisons are the main example. For two numbers a and b, the statement a ≤ b means “a < b or a = b”, and a ≥ b means “a > b or a = b”⁠[12] (Comparing numbers). Of two numbers, exactly one of a = b, a > b, b > a is true: this is the trichotomy law⁠[13] (Rational numbers on the number line).

Proposition (negating a comparison).

For all rational numbers a and b, the negation of a > b has the same truth value as a ≤ b; the negation of a < b has the same truth value as a ≥ b; and the negation of a = b has the same truth value as a ≠ b. In the same way, the negation of a ≤ b has the same truth value as a > b, and the negation of a ≥ b has the same truth value as a < b.

Proof.

By the trichotomy law, exactly one of the three cases a < b, a = b, a > b holds. The statement a > b is false exactly in the first two cases, which is exactly when “a < b or a = b”, that is a ≤ b, is true. So in every case one of a > b and a ≤ b is true and the other false, which is the test for a negation. The same argument with the cases taken in another order proves the claims for <, =, ≤ and ≥: a < b is false exactly in the cases a = b and a > b; a = b is false exactly in the other two cases, which is the meaning of ≠; a ≤ b is false exactly in the case a > b; and a ≥ b is false exactly in the case a < b.

The common error is to negate > by <. But a > b and a < b are both false when a = b, so < misses the case of equality. The figure shows this for a whole number x.

x > 6the statement
0
1
2
3
4
5
6
7
8
9
10
x ≤ 6its negation: true exactly where the statement is false
0
1
2
3
4
5
6
7
8
9
10
x < 6not the negation: at 6 both are false
0
1
2
3
4
5
6
7
8
9
10
Figure. The whole numbers from 0 to 10; a colored cell means that the sentence is true for that value of x. The rows of x > 6 and x ≤ 6 together color every cell exactly once. The row of x < 6 leaves 6 uncolored in both, so it is not the negation.
Example (Negating a comparison).

Negate “the temperature, in degrees, is above 25” and “12 < 3 × 4”, and give the truth value of the second statement and its negation.

  1. “Above 25” means t > 25, where t is the temperature. By the Proposition, its negation is t ≤ 25: “the temperature is 25 degrees or below”. “The temperature is below 25” would be wrong: it is false when t = 25, and so is the original statement.
  2. The negation of 12 < 3 × 4 is 12 ≥ 3 × 4. Since 3 × 4 = 12, the statement 12 < 12 is false and its negation 12 ≥ 12 is true, because 12 = 12.

Answer: the negations are t ≤ 25 and 12 ≥ 3 × 4; the second statement is false and its negation is true.

Example (An edge case: zero).

Let n stand for a number. Negate “n is positive”, that is n > 0, when n is a whole number, and when n is an integer.

  1. By the Proposition, the negation of n > 0 is n ≤ 0, “n is negative or n = 0”.
  2. For a whole number no value is less than 0, so n ≤ 0 holds only for n = 0: the negation is “n = 0”.
  3. For an integer, n ≤ 0 holds for 0, −1, −2, …. “n is negative” would be wrong: for n = 0 both “0 is positive” and “0 is negative” are false.

Answer: “n = 0” for whole numbers, “n ≤ 0” for integers. Zero is neither positive nor negative, so “not positive” is not the same as “negative”.

Example (A common mistake: “not prime” is not “composite”).

A student negates “1 is a prime number” as “1 is a composite number”. Check both truth values and correct the negation.

  1. A prime number is a whole number greater than 1 whose only factors are 1 and itself, and a composite number is a whole number greater than 1 that is not prime (Prime and composite numbers; Why 1 is not prime).
  2. 1 is not greater than 1, so “1 is prime” is false, and “1 is composite” is false too.
  3. Both sentences are false, so by the test the second is not the negation of the first.
  4. The negation is “1 is not a prime number”, which is true. The same happens with 0, which is neither prime nor composite.

Answer: the negation of “1 is prime” is “1 is not prime”. For whole numbers greater than 1, “not prime” and “composite” mean the same; for 0 and 1 they do not.

Sometimes the obvious opposite is the negation. Every whole number is even or odd, and no whole number is both (Even and odd numbers). So for a whole number n, the negation of “n is even” is “n is odd”. The reason is a theorem about whole numbers, not a rule of logic.

Game

Find the negation

Round
1
Score
0
Streak
0

Here x stands for a whole number from 0 to 20. Which sentence is the negation of “x ≠ 5”?

“x ≠ 5” is truethe card you pick is true

Double negation

The negation of a statement is a statement, so it can be negated again.

Proposition (double negation).

For every statement p, the statement ¬¬p, that is ¬(¬p), has the same truth value as p.

Proof.

There are two cases. If p is true, then ¬p is false, and its negation ¬¬p is true. If p is false, then ¬p is true, and ¬¬p is false. In both cases ¬¬p has the truth value of p. The table shows the two cases.

p¬p¬¬p
TFT
FTF
Table. Double negation: the last column equals the first in both rows. This is called the double negation law.⁠[14][15]
Example (Removing a double negation).

Simplify “it is not the case that 91 is not prime” and find its truth value.

  1. Let p be “91 is prime”. Then “91 is not prime” is ¬p, and the whole sentence is ¬¬p.
  2. By double negation, ¬¬p has the truth value of p: the sentence says the same as “91 is prime”.
  3. 91 = 7 × 13, so p is false.

Answer: the sentence means “91 is prime”, and it is false.

Caution.

Everyday speech sometimes puts two negative words together in a sentence with a negative meaning, as in “I never told nobody”; this is called a double negative.⁠[16] In logic every “not” counts, and two of them cancel, as the Proposition shows. Write mathematical statements with at most one negation where possible.

Negating longer statements

The negation of a statement says only that the statement fails. When the statement makes several claims at once, it can fail in several ways, and its negation must allow all of them.

Example (A common mistake: “all odd” for “not all even”).

Let p be “each of the numbers 2, 4, 6, 9 is even”. A student writes its negation as “each of the numbers 2, 4, 6, 9 is odd”. Find the truth values and the correct negation.

  1. 9 = 4 × 2 + 1 is odd, so not every number on the list is even: p is false.
  2. 2 is even, so not every number on the list is odd: the student’s sentence is false too.
  3. Both are false, so the student’s sentence is not the negation of p.
  4. The negation is “it is not the case that each of 2, 4, 6, 9 is even”, that is, “at least one of 2, 4, 6, 9 is not even”. It is true, because of 9.

Answer: ¬p is “at least one of the numbers is not even”, which is true; “all of them are odd” is a much stronger claim, and false.

Looking ahead.

Lesson 1.3, “Conjunction and disjunction”, joins statements with “and” and “or”, and lesson 1.9 of this unit, “De Morgan’s laws”, shows how to negate them. The negation of statements that begin with “every” or “there is” is the subject of lesson 2.4, “Negating quantified statements”, in part 2.

Historical note.

According to Jeff Miller’s list of the earliest known uses of mathematical symbols, the tilde ~ was used for negation by Giuseppe Peano in 1897,⁠[17] and ~p for “the negation of p” by Bertrand Russell in 1908.⁠[18] Whitehead and Russell’s Principia Mathematica, whose first volume appeared in 1910,⁠[19][20] writes ∼p for “not-p”, the negation of p.⁠[21] The same list names Arend Heyting, in 1930, as the first to use the sign ¬.⁠[22]

Exercises

Exercise .

Write the negation and give both truth values: p: 56 is a multiple of 7. q: 3² + 4² = 5². r: 57 is not a prime number.

▸ Show solution
  1. ¬p: 56 is not a multiple of 7. Since 56 = 8 × 7, p is true and ¬p is false.
  2. ¬q: 3² + 4² ≠ 5². Since 9 + 16 = 25 = 5², q is true and ¬q is false.
  3. ¬r: 57 is a prime number. Since 57 = 3 × 19, r is true and ¬r is false.
Exercise .

Let x stand for an integer. Write the negation of each sentence without the words “not” or “it is not the case”: (1) x ≥ 10; (2) x ≠ 4; (3) x < −3.

▸ Show solution
  1. ¬(x ≥ 10) is x < 10. (x ≤ 10 is wrong: at x = 10 both x ≥ 10 and x ≤ 10 are true.)
  2. ¬(x ≠ 4) is x = 4.
  3. ¬(x < −3) is x ≥ −3.
Exercise .

Show with one example that “a > b” is not the negation of “a < b”.

▸ Show solution

“a > b” is not a negation of “a < b”: for a = b = 5, the statements 5 < 5 and 5 > 5 are both false. One case with the same truth value is enough to show that a sentence is not the negation.

Exercise .

What is the truth value of ¬¬¬p when p is “8 is odd”? Which statement with at most one ¬ has the same truth value as ¬¬¬p for every p?

▸ Show solution

Count the negations: ¬¬¬p = ¬(¬¬p). By double negation ¬¬p has the truth value of p, so ¬¬¬p has the truth value of ¬p.

With p: 8 is odd (false), ¬¬¬p is true, like ¬p: “8 is not odd”. In general an odd number of negations gives the truth value of ¬p, an even number that of p.

Exercise .

Is “n is even” the negation of “n is odd” when n stands for a whole number? And when n may be any of the numbers 1/2, 1, 3/2, 2, 5/2, 3, …?

▸ Show solution

For whole numbers 0, 1, 2, 3, …: the negation of “n is odd” is “n is even”, because every whole number is exactly one of the two.

For the numbers 1/2, 1, 3/2, 2, …: a number is even when it equals k × 2 for some whole number k, and odd when it equals k × 2 + 1 for some whole number k (Even and odd numbers). The numbers k × 2 are 0, 2, 4, … and the numbers k × 2 + 1 are 1, 3, 5, …; the number 1/2 is in neither list. So “1/2 is odd” and “1/2 is even” are both false, and “n is even” is not the negation of “n is odd” there. The negation is “n is not odd”.

Exercise .

Which of these is the negation of “each of 3, 5, 7, 9 is prime”? (1) “Each of 3, 5, 7, 9 is not prime.” (2) “At least one of 3, 5, 7, 9 is not prime.” (3) “None of 3, 5, 7, 9 is prime.” Give all truth values.

▸ Show solution

Let p be “each of 3, 5, 7, 9 is prime”. It is false, since 9 = 3 × 3.

(1) “Each of 3, 5, 7, 9 is not prime” is false: 3 is prime. Both it and p are false, so it is not the negation. (2) “At least one of 3, 5, 7, 9 is not prime” is true, because of 9; it is false exactly when every number on the list is prime, so it is the negation. (3) “None of 3, 5, 7, 9 is prime” is false, like p, so it is not the negation.

Summary

  1. The negation ¬p, “not p”, is true when p is false and false when p is true. Other notations include p̅, ∼p (the tilde), −p, p′, Np and !p.
  2. A sentence about a letter is a negation of p exactly when, for every value of the letter, one of the two is true and the other false. One case where both have the same truth value shows that a sentence is not the negation.
  3. The negation of a > b is a ≤ b, not a < b; the case a = b decides. “Not positive” includes 0, and “not prime” includes 0 and 1.
  4. Double negation: ¬¬p has the same truth value as p, as its truth table shows (T stays T, F stays F).
  5. The negation of a statement that makes several claims says only that it fails: “not all are even” is not “all are odd”. The formula ¬p is the first of the compound statements of this unit.

Sources

  1. 1.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.2, “Propositions”, Definition 1), p. 3 (the whole topic: pp. 3–4).
    “is the statement “It is not the case that p.””
    Used for: the negation of p is the statement “it is not the case that p” (the end of Rosen’s Definition 1).
  2. 2.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.2, “Propositions”, Definition 1), p. 3 (the whole topic: pp. 3–4).
    “The proposition ¬p is read “not p.” The truth value of the negation of p, ¬p, is the opposite of the truth value of p.”
    Used for: ¬p is read “not p”; its truth value is the opposite of the truth value of p.
  3. 3.
    Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).
    Chapter 2, “Logic”, section 2.1, “Statements and Quantifiers”: “Negating Statements”, p. 62 (the whole topic: pp. 62–63).
    “The negation of a logical statement has the opposite truth value of the original statement. If the original statement is false, its negation is true, and if the original statement is true, its negation is false.”
    Used for: ¬p is true when p is false, and false when p is true.
  4. 4.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.1, “Deductive Reasoning and Logical Connectives”, p. 10 (the whole topic: pp. 10–11).
    “Thus, if P and Q stand for two statements, then we’ll write P ∨ Q to stand for the statement “P or Q,” P ∧ Q for “P and Q,” and ¬P for “not P” or “P is false.””
    Used for: ¬p may also be read “p is false”.
  5. 5.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.2, “Propositions”), p. 4 (the whole topic: pp. 3–4).
    “The negation operator constructs a new proposition from a single existing proposition.”
    Used for: negation makes a new statement from a single statement.
  6. 6.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.2, “Propositions”, Remark after Definition 1), p. 3 (the whole topic: pp. 3).
    “The notation for the negation operator is not standardized.”
    Used for: the notation for negation is not standardized.
  7. 7.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.2, “Propositions”, Remark after Definition 1), p. 3 (the whole topic: pp. 3).
    “Although ¬p and p̅ are the most common notations used in mathematics to express the negation of p, other notations you might see are ∼p, −p, p′, Np, and !p.”
    Used for: Rosen names ¬p and p with a bar as the most common notations for the negation of p, and lists ∼p, −p, p′, Np and !p as others.
  8. 8.
    Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).
    Chapter 2, “Logic”, section 2.1, “Statements and Quantifiers”: “Negating Logical Statements Symbolically”, p. 63 (the whole topic: pp. 63).
    “The symbol for negation, or not, in logic is the tilde, ~.”
    Used for: the sign ∼ is the tilde, printed ~ in some books, which use it as their symbol for negation.
  9. 9.
    Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).
    Chapter 2, “Logic”, section 2.1, “Statements and Quantifiers”: “Negating Statements”, p. 62 (the whole topic: pp. 62–63).
    “Most logical statements can be negated by simply adding or removing the word not.”
    Used for: most statements are negated by adding or removing “not”.
  10. 10.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.2, “Propositions”, Table 1), p. 4 (the whole topic: pp. 3–4).
    “Table 1 displays the truth table for the negation of a proposition p. This table has a row for each of the two possible truth values of p.”
    Used for: the truth table of negation, with one row for each of the two truth values of p (also in the table caption).
  11. 11.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.2, “Truth Tables”, p. 15 (the whole topic: pp. 14–15).
    “The truth table for ¬P is also quite easy to construct because for ¬P to be true, P must be false.”
    Used for: for ¬p to be true, p must be false.
  12. 12.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter Appendix 1, “Axioms for the Real Numbers and the Positive Integers”, section A1.1, “Axioms for Real Numbers” (“Order Axioms”), pp. A-2 (the whole topic: pp. A-2).
    “We write x > y (and y < x) when x is greater than y, and we write x ≥ y (and y ≤ x) when x > y or x = y.”
    Used for: a ≤ b means “a < b or a = b”, and a ≥ b means “a > b or a = b”.
  13. 13.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter Appendix 1, “Axioms for the Real Numbers and the Positive Integers”, section A1.1, “Axioms for Real Numbers” (“Order Axioms”), pp. A-2 (the whole topic: pp. A-2).
    “For all real numbers x and y, exactly one of x = y, x > y, or y > x is true.”
    Used for: the trichotomy law: of two numbers, exactly one of a = b, a > b, b > a is true (stated in the source for real numbers, which include the rational numbers; the site proves it for rational numbers in Rational Numbers 1.2).
  14. 14.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.2, “Truth Tables” (the list of equivalences), p. 21 (the whole topic: pp. 20–21).
    “Double Negation law ¬¬P is equivalent to P.”
    Used for: ¬¬p has the same truth value as p in every case: the double negation law.
  15. 15.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.3, “Propositional Equivalences” (1.3.2, “Logical Equivalences”, Table 6), p. 29 (the whole topic: pp. 27–29).
    “¬(¬p) ≡ p Double negation law”
    Used for: the double negation law: ¬(¬p) and p always have the same truth value (the sign ≡ is defined in the source, and on this site in lesson 1.8).
  16. 16.
    “double negative”, Cambridge Dictionary, Cambridge University Press.
    Section “double negative | American Dictionary”. dictionary.cambridge.org/dictionary/english/double-negative · open at the quoted passage.
    “the use of two negative words together in a statement that has a negative meaning”
    Used for: everyday speech sometimes puts two negative words together in a sentence with a negative meaning; this is called a double negative.
  17. 17.
    Jeff Miller, “Earliest Uses of Symbols of Set Theory and Logic”, MacTutor History of Mathematics Archive, University of St Andrews.
    “Negation. The tilde ~ for negation was used by Peano in 1897.”
    Used for: according to Jeff Miller’s list, Peano used the tilde ~ for negation in 1897.
  18. 18.
    Jeff Miller, “Earliest Uses of Symbols of Set Theory and Logic”, MacTutor History of Mathematics Archive, University of St Andrews.
    “~p for "the negation of p" appears in 1908 in the article "Mathematical logic as based on the theory of types" by Bertrand Russell”
    Used for: according to Jeff Miller’s list, Russell wrote ~p for “the negation of p” in 1908.
  19. 19.
    Florian Cajori, A History of Mathematical Notations (two volumes bound as one, Dover (first published by Open Court, 1928–1929), 1993).
    Vol. II, Chapter II, “Symbols in Modern Analysis”, section “Symbols in Mathematical Logic”, §695, “Signs of Whitehead and Russell”, p. 305 (the whole topic: pp. 305–309).
    “The Principia mathematica of Alfred North Whitehead and Bertrand Russell, the first volume of which appeared in 1910 at Cambridge, England”
    Used for: the first volume of Whitehead and Russell’s Principia Mathematica appeared in 1910.
  20. 20.
    J. J. O’Connor and E. F. Robertson, “Emil Leon Post”, MacTutor History of Mathematics Archive, University of St Andrews.
    “The first volume of Principia Mathematica was published in 1910”
    Used for: the first volume of Principia Mathematica appeared in 1910 (second source for the date).
  21. 21.
    Florian Cajori, A History of Mathematical Notations (two volumes bound as one, Dover (first published by Open Court, 1928–1929), 1993).
    Vol. II, Chapter II, “Symbols in Modern Analysis”, section “Symbols in Mathematical Logic”, §695, “Signs of Whitehead and Russell”, p. 307 (the whole topic: pp. 305–309).
    “∼p means not-p, which means the negation of p, where p is any proposition.”
    Used for: Principia Mathematica writes ∼p for not-p, the negation of p (a second source for the tilde in logic).
  22. 22.
    Jeff Miller, “Earliest Uses of Symbols of Set Theory and Logic”, MacTutor History of Mathematics Archive, University of St Andrews.
    “It was first used in 1930 by Arend Heyting in "Die formalen Regeln der intuitionistischen Logik," Sitzungsberichte der preußischen Akademie der Wissenschaften, phys.-math. Klasse, 1930, p. 42-65. The ¬ appears on p. 43.”
    Used for: according to Jeff Miller’s list, the sign ¬ was first used by Arend Heyting in 1930.