Mathematical Logic – The basic introduction

If mathematics is a language, then logic is its grammar. You can have brilliant mathematical intuition, but without logical precision, you can’t communicate your ideas or verify they’re correct. Let me walk you through the building blocks of mathematical logic.

Sentences and Statements

A sentence is a collection of words that together express a complete thought. In mathematical logic, we treat “sentence” and “statement” as interchangeable (some textbooks distinguish them, but we won’t here).

Consider these examples:

  1. Math is a tough subject.
  2. English is not a tough subject.
  3. Math and English are both tough subjects.
  4. Either Math or English is a tough subject.
  5. If Math is a tough subject, then English is also a tough subject.
  6. Math is a tough subject if and only if English is a tough subject.

The first sentence is called a prime sentence (or atomic sentence). It contains no logical connectives and can’t be broken down further.

Sentences 2-6 are composite sentences. They’re built from prime sentences using connectives.

The Five Logical Connectives

There are five fundamental connectives in logic:

ConnectiveSymbolNameRead As
not\( \neg \) or \( \sim \)Negation“not p”
and\( \wedge \)Conjunction“p and q”
or\( \vee \)Disjunction“p or q”
if…then\( \Rightarrow \)Implication“p implies q”
if and only if\( \Leftrightarrow \)Biconditional“p iff q”

Let me explain each one.

Negation (NOT)

The word “not” creates the negation of a sentence. If \( p \) stands for “Terence Tao is a professor,” then \( \neg p \) means “Terence Tao is not a professor.”

Important: Negation doesn’t mean “opposite” or “converse.” The negation of “English is a tough subject” is “English is not a tough subject.” It’s not “English is an easy subject.” Those are different statements.

In mathematical notation, we show negation by putting a slash through the symbol:

  • \( x = y \) (x equals y) becomes \( x \neq y \) (x does not equal y)
  • \( x \in A \) (x belongs to A) becomes \( x \notin A \) (x does not belong to A)

Conjunction (AND)

The word “and” joins two sentences into a conjunction.

“I am writing, and my sister is reading” is the conjunction of “I am writing” and “My sister is reading.”

Symbolically: if \( p \) and \( q \) are statements, their conjunction is \( p \wedge q \).

Note: In everyday English, words like “but” and “while” function similarly to “and.” Logically, “I am writing, but my sister is reading” has the same truth value as “I am writing, and my sister is reading.” The emotional connotation differs, but the logic doesn’t.

Disjunction (OR)

The word “or” creates a disjunction.

“Justin Bieber is a celebrity, or Sachin Tendulkar is a footballer” is the disjunction of the two component statements.

Symbolically: \( p \vee q \) means “p or q.”

Sometimes we add “either” before the first statement (“Either p or q”) to make it sound better, but logically it’s optional.

Implication (IF…THEN)

A conditional sentence has the form “If… then…”

The part after “if” is called the antecedent (or hypothesis). The part after “then” is the consequent (or conclusion).

Example: “If \( 5 < 6 \) and \( 6 < 7 \), then \( 5 < 7 \).”

  • Antecedent: \( 5 < 6 \) and \( 6 < 7 \)
  • Consequent: \( 5 < 7 \)

Symbolically: \( p \Rightarrow q \) means “p implies q” or “if p then q.”

There are several equivalent ways to phrase an implication:

PhrasingMeaning
If p then qStandard form
p implies qDirect statement
q follows from pEmphasizes consequence
q is a logical consequence of pFormal version
p only if qTricky but equivalent
p is sufficient for qp guarantees q
q is necessary for pCan’t have p without q

Biconditional (IF AND ONLY IF)

The phrase “if and only if” (abbreviated iff) creates a biconditional statement.

Example: “A triangle is right-angled if and only if one of its angles is 90°.”

This single statement actually combines two implications:

  • Direct: If a triangle is right-angled, then one angle is 90°
  • Converse: If one angle is 90°, then the triangle is right-angled

Symbolically: \( p \Leftrightarrow q \) means both \( p \Rightarrow q \) and \( q \Rightarrow p \) are true.

Another example: “A glass is half full iff it is half empty.” Both directions hold.

Stronger and Weaker Statements

Statement \( p \) is stronger than statement \( q \) if \( p \Rightarrow q \) is true. Equivalently, \( q \) is weaker than \( p \).

Every statement is stronger than itself (since \( p \Rightarrow p \) is always true). That sounds paradoxical, but it’s just how the terminology works. If you want to exclude this case, say strictly stronger.

Statement \( p \) is strictly stronger than \( q \) if \( p \Rightarrow q \) is true but \( q \Rightarrow p \) is false.

Example: “This quadrilateral is a rhombus” is strictly stronger than “This quadrilateral is a parallelogram.” Every rhombus is a parallelogram, but not every parallelogram is a rhombus.

Another example: “This blog is hosted on WordPress.com” implies “This blog runs on WordPress software.” But the converse is false. You can run WordPress software on your own server.

Inductive vs. Deductive Reasoning

Here’s a thought experiment that illustrates the difference between how laypeople, scientists, and mathematicians think.

Imagine all three measure the angles of hundreds of triangles and record the sums.

The layperson finds that the sum is 180° in almost every case, with one or two exceptions. They ignore the exceptions and conclude: “The angles of a triangle sum to 180°.”

The physicist examines the exceptions more carefully. If the outliers show 179° or 181°, they attribute this to measurement error. They state a law: “The angles of any triangle sum to 180°.” They’re happy until someone finds a triangle where the law fails badly. Then they revise the law. This process continues indefinitely.

The mathematician is the fussiest of all. Even one exception prevents them from making any claim. Even if millions of triangles check out, they won’t state it as a theorem. Why? Because there are infinitely many triangles. Generalizing from a million to infinity is just as unjustified as generalizing from one to a million. At most, they’ll call it a conjecture with “strong evidence.”

The layperson and physicist use inductive reasoning: observe patterns, then generalize.

The mathematician uses deductive reasoning: start from established truths and derive new truths through logical steps.

Axioms and Postulates

When you deduce theorems from other theorems, you eventually hit bedrock: statements that can’t be proved from anything else. These are axioms (or postulates). You accept them as true without proof.

Every branch of mathematics has its own axioms. Euclidean geometry, for example, rests on about five or six axioms, including “Through any point, infinitely many lines can be drawn.” The entire structure of geometry is built by deduction from these few starting points.

Axioms aren’t arbitrary. They’re chosen because they’re self-evident or because they lead to useful, consistent mathematics. But they can’t be proved. That’s what makes them axioms.

Arguments, Premises, and Conclusions

An argument is just an implication statement dressed up. It consists of premises (the hypotheses) and a conclusion.

Here’s the classic example:

Premises:

  • \( p_1 \): Every man is mortal.
  • \( p_2 \): Socrates is a man.

Conclusion:

  • \( q \): Socrates is mortal.

Symbolically, if the premises are \( p_1, p_2, \ldots, p_n \) and the conclusion is \( q \), then the argument is the statement:

\( (p_1 \wedge p_2 \wedge \cdots \wedge p_n) \Rightarrow q \)

An argument is valid if this implication is true. It’s invalid (a fallacy) if the implication is false.

Quick Reference: Logical Symbols

SymbolNameRead AsExample
\( \neg p \) or \( \sim p \)Negation“not p”\( \neg(x = 5) \) means \( x \neq 5 \)
\( p \wedge q \)Conjunction“p and q”Both must be true
\( p \vee q \)Disjunction“p or q”At least one is true
\( p \Rightarrow q \)Implication“if p then q”p being true guarantees q
\( p \Leftrightarrow q \)Biconditional“p iff q”Both have same truth value

Key Takeaways

  • Prime sentences have no connectives; composite sentences are built from them
  • The five connectives (not, and, or, if-then, iff) let you build any logical statement
  • Negation is “not p,” not “the opposite of p”
  • Biconditional (iff) means implication works both directions
  • Deductive reasoning proves from axioms; inductive reasoning generalizes from observations
  • An argument is valid if its premises logically guarantee its conclusion

Disclaimer: My content is reader-supported, meaning that if you click on some of the links in my posts and make a purchase, I may earn a small commission at no extra cost to you. These affiliate links help me keep the content on gauravtiwari.org free and full of valuable insights. I only recommend products and services that I trust and believe will genuinely benefit you. Your support through these links is greatly appreciated—it helps me continue to create helpful content and resources for you. Thank you! ~ Gaurav Tiwari