Logical Connectives
Updated Feb 16, 20256 min read
In Discrete Mathematics, logical connectives (also known as logical operators) are symbols or words used to connect propositions (statements) to form more complex logical expressions. These connectives define the relationship between the truth values of the individual statements.
Basic Logical Connectives
1. Negation (¬ or ~)
The negation of a statement p is ~p, which means "not p."
Truth Table
p | ~p |
|---|---|
T | F |
F | T |
2. Conjunction (∧)
The conjunction of two statements p and q is p ∧ q, which means "p and q." It is true only if both p and q are true.
Truth Table
p | q | p ∧ q |
|---|---|---|
T | F | F |
F | T | F |
T | T | T |
F | F | F |
3. Disjunction (∨)
The disjunction of p and q is p ∨ q, which means "p or q." It is true if at least one of p or q is true.
Truth Table
p | q | p ∨ q |
|---|---|---|
T | F | T |
F | T | T |
T | T | T |
F | F | F |
4. Implication (→)
The implication p → q means "if p, then q." It is false only when p is true and q is false; otherwise, it is true.
Truth Table
p | q | p → q |
|---|---|---|
T | F | F |
F | T | T |
T | T | T |
F | F | T |
5. Biconditional (↔)
The biconditional p ↔ q means "p if and only if q." It is true when both statements have the same truth value.
Truth Table
p | q | p ↔ q |
|---|---|---|
T | F | F |
F | T | F |
T | T | T |
F | F | T |
6. Exclusive OR (⊕)
The exclusive OR (XOR) of p and q is p ⊕ q, meaning "either p or q, but not both."
Truth Table
p | q | p ⊕ q |
|---|---|---|
T | F | T |
F | T | T |
T | T | F |
F | F | F |
7. NAND (~ (p ∧ q))
NAND (Not AND) is true except when both p and q are true.
Truth Table
p | q | p ∧ q | ~ (p∧ q) |
|---|---|---|---|
T | F | F | T |
F | T | F | T |
T | T | T | F |
F | F | F | T |
8. NOR (¬(p ∨ q))
NOR (Not OR) is true only when both p and q are false.
Truth Table
p | q | p ∨ q | ~ (p ∨ q) |
|---|---|---|---|
T | F | T | F |
F | T | T | F |
T | T | T | F |
F | F | F | T |
Logical Equivalence in Discrete Mathematics
Logical Equivalence means that two logical statements always have the same truth value for every possible truth assignment of their variables. If two propositions p and q are logically equivalent, we write:
p ≡ q
This means that the truth tables for both p and q are identical.
Important Logical Equivalences
1. Identity Laws
p ∨ false ≡ pp∧true≡pp \wedge \text{true} \equiv p
p ∧ true ≡ p
These laws state that OR with false and AND with true do not change the value of p.
2. Domination (Null) Laws
p ∨ true ≡ truep∧false≡falsep \wedge \text{false} \equiv \text{false}
p ∧ false ≡ false
These laws state that OR with true is always true, and AND with false is always false.
3. Idempotent Laws
p ∨ p ≡ pp∧p≡pp \wedge p \equiv p
p ∧ p ≡ p
Repeating the same operation does not change the result.
4. Double Negation Law
~(~p) ≡ p
A double negation cancels out.
5. Commutative Laws
p ∨ q ≡ q ∨pp∧q≡q∧pp \wedge q \equiv q \wedge pp ∧ q ≡ q ∧ p
The order of statements in AND or OR does not matter.
6. Associative Laws
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)(p∧q)∧r≡p∧(q∧r)(p \wedge q) \wedge r \equiv p \wedge (q \wedge r)(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
Grouping does not affect the result.
7. Distributive Laws
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)p∨(q∧r)≡(p∨q)∧(p∨r)p \vee (q \wedge r) \equiv (p \vee q) \wedge (p \vee r)p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
AND distributes over OR, and vice versa.
8. De Morgan’s Laws
~(p ∨ q) ≡ ~p ∧ ~q¬(p∧q)≡¬p∨¬q\neg (p \wedge q) \equiv \neg p \vee \neg q~(p ∧ q) ≡ ~p ∨ ~q
Negation distributes over AND/OR by flipping the operator.
9. Absorption Laws
p ∨ (p ∧ q) ≡ pp∧(p∨q)≡pp \wedge (p \vee q) \equiv pp ∧ (p ∨ q) ≡ p
A statement absorbs redundant expressions.
10. Implication Law
p → q ≡ ~p ∨ q
An implication can be rewritten using OR.
11. Contrapositive Law
p → q ≡ ~q → ~p
Flipping and negating both parts of an implication preserves meaning.
12. Biconditional Law
p ↔ q ≡ (p → q) ∧ (q → p)p↔q≡(¬p∨q)∧(¬q∨p)p \leftrightarrow q \equiv (\neg p \vee q) \wedge (\neg q \vee p)p ↔ q ≡ (~p ∨ q) ∧ (~q ∨ p)
A biconditional means both directions of implication hold.
Tautology vs Contracdiction
Aspect | Tautology | Contradiction |
|---|---|---|
Definition | A proposition that is always true regardless of the truth values of its components. | A proposition that is always false regardless of the truth values of its components. |
Truth Table Outcome | Every row in the truth table evaluates to True (T). | Every row in the truth table evaluates to False (F). |
Examples | p∨~p (Law of the Excluded Middle) | p∧~p (Law of Non-Contradiction) |
Logical Equivalence | Equivalent to the constant True (often denoted as 1). | Equivalent to the constant False (often denoted as 0). |
Role in Logic | Used to demonstrate that a logical statement is unconditionally valid. | Indicates an inherent inconsistency or error in the logical statement. |
Applications | - Proving the validity of logical arguments and mathematical proofs. - Designing reliable digital circuits where the outcome must be high. | - Identifying and avoiding logical errors. - Proof by contradiction: showing that an assumption leads to inconsistency. |
Logical Quantifiers
Logical quantifiers extend propositional logic by allowing us to make assertions about objects in a domain. They are foundational in predicate logic. and are used to express properties of elements and relationships among them.
Quantifier | Notation | Meaning | Example |
|---|---|---|---|
Universal Quantifier | ∀xP(x) | Every element xxx in the domain satisfies P(x)P(x)P(x). | ∀x∈N, x+0=x |
Existential Quantifier | ∃xP(x) | There is at least one element xxx for which P(x)P(x)P(x) holds. | ∃x ∈ Z,x2=4 |
Uniqueness Quantifier | ∃!xP(x) | Exactly one element xxx satisfies P(x)P(x)P(x). | ∃!x∈R, x2=0 |
