Introduction
The words “if,” “and,” “or,” and “not” do more than connect sentences: in mathematics, they describe precise relationships between statements. These relationships form the basis of logic, the study of how conclusions follow from information. Once you know how each word affects truth, you can read arguments, solve puzzles, and understand the logic used in computing with greater confidence.
- Statements and truth values
- “And” means both statements must be true
- “Or” usually means one or both
- “Not” reverses a truth value
- “If” connects a condition to a result
- Implication is not the same as “if and only if”
- How the four operations work together
- Useful relationships between logical operations
- Where these ideas appear
- Conclusion
Statements and truth values
Mathematical logic begins with a proposition: a statement that can be judged true or false. “The number 8 is even” is a proposition, and it is true. “The number 9 is even” is also a proposition, but it is false. By contrast, “Is 8 even?” is a question, not a proposition, because it does not make a claim that can be true or false.
To keep expressions readable, logicians often represent propositions with letters. Let P mean “The number 8 is even,” and let Q mean “The number 8 is greater than 5.” Both statements are true. The symbols for “and,” “or,” “not,” and “if…then” let us combine propositions and work out whether the resulting statement is true.
This approach is called propositional logic. It does not usually ask what a statement is about; it asks how the truth of a larger statement depends on the truth of its parts.
“And” means both statements must be true
The mathematical form of “P and Q” is called a conjunction and is often written P ∧ Q. A conjunction is true only when both parts are true. If either part is false, the whole conjunction is false.
For example, consider: “The number 8 is even and greater than 5.” The first part is true, and the second part is true, so the whole statement is true. But “The number 8 is even and greater than 10” is false: the number meets the first condition but not the second.
A truth table lays out every possible combination of truth values. “T” means true, and “F” means false.
P: T, Q: T → P and Q: T
P: T, Q: F → P and Q: F
P: F, Q: T → P and Q: F
P: F, Q: F → P and Q: F
This pattern is useful when a task requires several conditions at once. If an imaginary club admits someone only when they are both registered and have a valid pass, meeting just one requirement is not enough. In logic, the combined condition is satisfied only when every part is satisfied.
“Or” usually means one or both
The logical “or” is called a disjunction and is written P ∨ Q. In standard mathematics, it is usually inclusive: the statement is true if P is true, if Q is true, or if both are true. It is false only when both parts are false.
For example, “A whole number is divisible by 2 or by 3” is true of 6 because it is divisible by both. The word “or” in ordinary conversation sometimes suggests a choice between alternatives, but that exclusive meaning is not the default in basic logic. When only one option is allowed, people often make that restriction explicit.
The truth table for inclusive “or” is:
P: T, Q: T → P or Q: T
P: T, Q: F → P or Q: T
P: F, Q: T → P or Q: T
P: F, Q: F → P or Q: F
An exclusive or, sometimes called XOR, is true when exactly one of its two parts is true. If P and Q are both true, exclusive or is false. This is a separate operation, so it is helpful to distinguish it from the usual inclusive “or” whenever the difference matters.
“Not” reverses a truth value
The logical operation “not P” is called a negation and is written ¬P. It changes a true statement to false and a false statement to true. If P means “The number 8 is even,” then “not P” means “The number 8 is not even,” which is false.
The truth table is straightforward:
P: T → Not P: F
P: F → Not P: T
Negation can be more subtle when it applies to a compound statement. “It is not true that the number is even and greater than 5” denies the whole conjunction. It does not mean that both parts are false. The statement is satisfied if at least one part of the conjunction fails.
This distinction matters in ordinary reading, too. Compare “not both A and B” with “neither A nor B.” The first allows one of A or B to be true, as long as they are not both true. The second says that A is false and B is false.
“If” connects a condition to a result
In logic, “if P, then Q” is called a conditional or implication. It is written P → Q. Here P is the antecedent, the condition, and Q is the consequent, the result stated to follow. The conditional is false in just one case: P is true while Q is false.
P: T, Q: T → If P, then Q: T
P: T, Q: F → If P, then Q: F
P: F, Q: T → If P, then Q: T
P: F, Q: F → If P, then Q: T
For instance, let P be “A shape is a square” and Q be “The shape has four sides.” The statement “If a shape is a square, then it has four sides” is true: a square meets the condition and has the stated property. A shape that is not a square does not provide a counterexample to this conditional, because the condition was not met.
This last point can feel surprising. In formal logic, a conditional with a false antecedent is counted as true. This convention makes implication work consistently in mathematical arguments: the rule only makes a claim about cases where its stated condition holds. It does not say that every object must satisfy the condition.
Implication is not the same as “if and only if”
A conditional does not automatically work in both directions. From “If a shape is a square, then it has four sides,” we cannot conclude that every four-sided shape is a square. A rectangle that is not a square also has four sides.
The reversed statement, “If Q, then P,” is the converse of “If P, then Q.” A conditional and its converse can have different truth values. In the shape example, the original is true, while the converse is false.
When both directions are true, mathematics can express this with “P if and only if Q,” written P ↔ Q. It means that P implies Q and Q implies P. For example, for an integer, “The integer is even if and only if it is divisible by 2” states a relationship in both directions.
Be careful with English word order. “P if Q” means “if Q, then P”: the statement after “if” supplies the condition. “P only if Q” means that P can be true only when Q is true, so it expresses “if P, then Q.” Translating these phrases into a clear arrow can prevent mistakes.
How the four operations work together
Real statements often combine several logical operations. Suppose P means “It is raining” and Q means “The pavement is wet.” The statement “It is not raining, or the pavement is wet” can be represented as ¬P ∨ Q. To evaluate it, first determine whether P is true, reverse that value to get ¬P, and then apply the “or” rule.
Parentheses show which parts belong together. For example, ¬(P ∧ Q) means “It is not the case that both P and Q.” The expression (¬P) ∧ Q means “P is false and Q is true.” These are not equivalent: the first is true whenever at least one of P and Q is false, while the second requires both a false P and a true Q.
When an expression has no parentheses, mathematical conventions give operators a standard order, but conventions can vary between settings and notation. For a beginner, the safest practice is to add parentheses whenever the intended grouping might be unclear. This makes the meaning visible rather than relying on a reader to guess.
Useful relationships between logical operations
Some logical expressions can be rewritten without changing their truth values. These relationships, called logical equivalences, are useful for simplifying arguments and checking whether two statements mean the same thing.
De Morgan’s laws describe how negation interacts with “and” and “or.” “Not (P and Q)” is equivalent to “not P or not Q.” In symbols, ¬(P ∧ Q) ≡ ¬P ∨ ¬Q.
Similarly, “not (P or Q)” is equivalent to “not P and not Q”: ¬(P ∨ Q) ≡ ¬P ∧ ¬Q. In plain language, denying that at least one of two statements is true means that neither statement is true.
There is also a useful way to understand implication: P → Q is equivalent to ¬P ∨ Q. Both expressions are false only when P is true and Q is false. This equivalence connects “if” to the simpler truth rules for “not” and “or.”
Where these ideas appear
These logical operations are not confined to abstract mathematics. In computer programming, conditions commonly test whether one or more requirements are met. A program might continue only if a value is within a permitted range and a confirmation has been received. “And,” “or,” and “not” determine how such conditions combine.
Logic is also useful in mathematics itself. A proof may show that if a number has a particular property, another property must follow. A definition may use “and” to require several features at once, or “or” to allow multiple qualifying cases. Reading these words precisely helps distinguish what a definition or proof actually claims.
However, formal logic does not capture every aspect of everyday language. People may use “or” exclusively, use “if” to suggest a cause, or leave out assumptions that seem obvious in context. A logical conditional states a relationship between truth values; on its own, it does not establish that one event causes another. Context and evidence are needed for causal claims.
Conclusion
In mathematics, “and” is true only when both statements are true, inclusive “or” is true when at least one is true, and “not” reverses a statement’s truth value. “If P, then Q” is false only when P holds but Q does not. Understanding these rules—and the difference between an implication and its converse—makes mathematical statements easier to interpret and everyday reasoning more precise.

