# Difference between 'if' and 'only if'

1. Jul 30, 2012

### bonfire09

I'm having trouble understanding the difference between the two. such as in this example.

I will pass logic if I score 100 on every exam
I will pass logic only if I score 100 on every exam

2. Jul 30, 2012

### MLP

Your first example is typically translated into sentential logic the same way as

If I score 100 on every exam, then I will pass logic.

This first sentence is false if I score 100 on every exam and do not pass logic.

Your second example is typically translated the same way as

If I pass logic, then I score 100 on every exam.

This second sentence is false if I pass logic but do not score 100 on every exam.

3. Jul 30, 2012

### Number Nine

Will you pass logic if you score 99 on every exam? Not according to your second sentence.
"Only if" specifies that a condition is necessary for an event to occur, whereas "if" specifies that the event is sufficient.

Last edited: Jul 30, 2012
4. Jul 30, 2012

### bonfire09

In the first sentence if the student only gets 99 on every exam then he fails. Same thing with the second sentence. so only if and if are the same thing?

5. Jul 30, 2012

### Number Nine

The first sentence says no such thing; it specifies a sufficient condition, not a necessary one.

6. Jul 30, 2012

### D H

Staff Emeritus
Not at all. The two statements are quite different if the student does not get 100 on every test. The first statement says nothing about this situation. The student might pass, might fail, if the student fails to get 100 on every test. The second statement says that the student will not pass. Another difference: Suppose the student does get 100 on every test. The first statement says the student will indeed pass. The second doesn't say anything about the pass/fail outcome if the student does get 100 on every test. Yet another difference: Suppose you know the student passed. The first sentence doesn't tell you whether the student made a 100 on each test. The second sentence does tell you that the student made all 100s.

7. Jul 30, 2012

### acabus

"A number is odd if it ends in a 3" is true.
"A number is odd if and only if it ends in a 3" is false.

Alternatively,
"A number has a real square root if it is bigger or equal to 0" is true.
"A number has a real square root if, and only if it is bigger or equal to 0" is also true.

With "if", there could be other conditions that lead to that outcome. With "only if", that is the only condition.

8. Jul 30, 2012

### DaveC426913

Eloquently and succinctly put.

9. Jul 30, 2012

### D H

Staff Emeritus
Not quite. acabus' answer is about if versus if and only if. The question asks for the difference between if and only if.

The difference between if and only if is pretty simple.

"P if Q" is the same as "if Q then P."
"P only if Q" is the same as "if P then Q."

10. Jul 30, 2012

### Nano-Passion

The way I look at is the following:

If is used to imply that it can be a condition to satisfy the statement.
If and only if is used to imply that it be the only condition satisfying the statement.

11. Jul 30, 2012

### Number Nine

We can refine it a bit, maybe.

A number is even if it is divisible by 4 (true)
A number is even only if it is divisible by 4 (false)