If-Then Statements

Learn to write conditional statements in if-then form, find the hypothesis and conclusion, and decide when a conditional is false.

Intermediate25 minLesson

Definition

A conditional statement, also called an if-then statement, joins two statements with the words if and then:
If p, then q.\text{If } p\text{, then } q.
  • The part after "if" is the hypothesis (pp), the condition.
  • The part after "then" is the conclusion (qq), what must follow.
In symbols we write p→qp \to q and read it as "if pp, then qq" or "pp implies qq".
Example: If a number ends in 0, then it is divisible by 10.
  • Hypothesis pp: a number ends in 0
  • Conclusion qq: the number is divisible by 10
Think of a conditional as a promise. The promise is broken only when the hypothesis happens and the conclusion does not. So p→qp \to q is false in exactly one case: pp is true and qq is false. In all other cases it is true.
ppqqp→qp \to q
TTT
TFF
FTT
FFT
The interactive truth table in this lesson lists the same four rows in the opposite order, starting with F, F. Both orders are fine.
An example where the hypothesis is true and the conclusion is false is called a counterexample. One counterexample is enough to show that a conditional is false.

Try it now

What is the hypothesis of the statement "If it rains, then the football match is cancelled"?

Worked Examples

Identify the hypothesis and the conclusion: "If a triangle has a right angle, then it is a right triangle."

1

Find the part after "if"

"a triangle has a right angle" → Hypothesis pp: a triangle has a right angle

2

Find the part after "then"

"it is a right triangle" → Conclusion qq: the triangle is a right triangle

3

Write it in symbols

The condition comes first, the result second → p→qp \to q

Common Mistakes

Taking the first part of the sentence as the hypothesis, as in "I take an umbrella if it rains" → hypothesis "I take an umbrella"

Why it's wrong: The hypothesis is the part that follows the word "if" (or "when", "whenever"), wherever it stands in the sentence.

Correct: Find the condition first: "it rains". Then write: If it rains, then I take an umbrella.

Thinking that p→qp \to q is false whenever the hypothesis is false

Why it's wrong: A conditional only promises something for the case where pp happens. If pp does not happen, the promise cannot be broken.

Correct: p→qp \to q is false only in the case T → F. When pp is false, the conditional is true, whatever qq is.

Using a number that does not satisfy the hypothesis as a counterexample, for example x=0x = 0 against "if x>3x > 3, then x>1x > 1"

Why it's wrong: For x=0x = 0 the conclusion x>1x > 1 is false, but the hypothesis x>3x > 3 is false too, so this case cannot break the statement.

Correct: A counterexample must make the hypothesis true and the conclusion false. For "if x>3x > 3, then x>1x > 1" no such number exists, so the statement is true.

Believing that one example that works proves the statement

Why it's wrong: "If nn is a whole number, then 2n+12^n + 1 is prime" works for n=1n = 1 (33) and n=2n = 2 (55), but n=3n = 3 gives 99, which is not prime.

Correct: Examples can only support a statement. To prove it you need a general argument, but a single counterexample is enough to disprove it.

Interactive Visual

Truth Table

p → q
pqp → q
FFT
FTT
TFF
TTT

T= TrueF= False

Truth Table

p → q
pqp → q
FF
FT
TF
TT

T= TrueF= False

Interactive Sandbox

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

18 problems
Problem 1 of 18
Easy

What is the hypothesis of the statement "If it rains, then the football match is cancelled"?

Why It Matters

If-then statements are everywhere, often hidden in ordinary sentences:
  • Shopping: "If your order is at least 40 euros, then delivery is free."
  • Rules and games: "If you roll a 6, then you roll again."
  • Science: "If water is heated to 100 °C at sea level, then it boils."
  • Programming: every app is full of commands like "if the password is correct, then open the account".
  • Mathematics: almost every rule and theorem is a conditional, for example "if a triangle has a right angle, then a2+b2=c2a^2 + b^2 = c^2" (where cc is the longest side).
In the lesson Deductive Reasoning you used if-then rules as premises. Now you will learn how they are built, how to write them yourself and how to test them. This is the starting point for the converse, the inverse and the contrapositive, which come next in the lessons Converse and Inverse and Contrapositive.

Real World Applications

Online Shopping

Shops use if-then rules for free delivery, discounts and gifts. To use the offer, you must make the hypothesis true.

Example:

"If your order is at least 40 dollars, then delivery is free." An order of 52 dollars makes the hypothesis true, so delivery must be free.

1Try It Yourself

A shop promises: if your order is at least 40 dollars, then delivery is free. Your basket has a T-shirt for 18 dollars and a cap for 15 dollars.

How many more dollars do you need to spend so that the hypothesis becomes true?

Step 1: Write the mathematical expression

Subtract your total from 40:

Testing Claims in Mathematics

Mathematicians test a conditional by searching for a counterexample. If they find one, the claim is false.

Example:

"If a number is prime, then it is odd" is false, because 2 is prime and even.

2Try It Yourself

A classmate claims: if a whole number is a multiple of 3, then it is odd.

What is the smallest positive counterexample?

Step 1: Write the mathematical expression

The multiples of 3 are 3, 3 + 3, 3 + 3 + 3, ... Write the second one:

Smart Homes and Programming

A thermostat runs on a conditional: if the room is colder than a set value, then the heating turns on.

Example:

"If the temperature is below 18 °C, then the heating turns on." At 17 °C the hypothesis is true, so the heating must turn on. At 20 °C nothing is promised.

3Try It Yourself

The rule is: if the temperature is below 18 °C, then the heating turns on. At 7:00 the room is 22 °C and it cools by 3 °C every hour.

What is the temperature after 2 hours, and is the heating on?

Step 1: Write the mathematical expression

Start at 22 and subtract 3 twice:

Key Takeaways

  • 1A conditional statement has the form "if pp, then qq", written p→qp \to q
  • 2The hypothesis pp is the condition after "if"; the conclusion qq is the result after "then"
  • 3Many sentences hide a conditional: "every A is B" means "if something is A, then it is B"
  • 4p→qp \to q is false only when pp is true and qq is false (T → F); in the other three cases it is true
  • 5A counterexample makes the hypothesis true and the conclusion false, and one is enough to disprove a statement
  • 6Examples that work support a statement, but they do not prove it

Frequently Asked Questions

Because the statement only makes a promise about the case where pp happens. If you say "if it rains, I take an umbrella" and it does not rain, you have not broken your word, whatever you do.
Because the statement only makes a promise about the case where pp happens. If you say "if it rains, I take an umbrella" and it does not rain, you have not broken your word, whatever you do.
No. "If it rains, I stay home", "I stay home when it rains" and "Rain means I stay home" are all the same conditional. Writing it with "if" and "then" just makes the hypothesis and the conclusion easy to see.
Just one. A conditional claims that the conclusion follows every time the hypothesis is true, so a single case with T → F is enough to break it.
You get a new statement that can have a different truth value. "If a shape is a square, then it is a rectangle" is true, but "if a shape is a rectangle, then it is a square" is false. Swapping and negating parts is the topic of the next lessons, Converse and Inverse and Contrapositive.

Glossary

Conditional statement
A statement of the form "if pp, then qq", also called an if-then statement
Hypothesis
The condition of a conditional, the part after "if" (pp)
Conclusion
The result of a conditional, the part after "then" (qq)
Implication
Another name for a conditional; p→qp \to q is read "pp implies qq"
Counterexample
A case where the hypothesis is true and the conclusion is false; it shows that a conditional is false
Truth value
Whether a statement is true (T) or false (F)

Formula Card

Conditional

p→qp \to q

Read "if $p$, then $q$": $p$ is the hypothesis, $q$ is the conclusion

Only false case

T→F=FT \to F = F

A conditional is false only when the hypothesis is true and the conclusion is false

Counterexample

p true and q falsep \text{ true and } q \text{ false}

One such case is enough to disprove $p \to q$

More in This Topic