Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have read this question. I am now stuck with the difference between if and only if and only if. Please help me out.


share|improve this question
The moon is made of lemon meringue only if $1+1=2$. –  Ilmari Karonen Sep 28 '11 at 20:08
Also try to understand in terms of plain translation. AiffB means A is true 'if' B is true & A is true 'only if' B is true.The 'only if' means that A is true in no other cases.'A if B' can be written as B => A.And 'A only if B' can be written as notB => notA. It is the property of => sign that c=>d is same as notd=>notc. Thus , you can replace notB=>notA by A=>B. Thus A iff B can be written as A=>B and B=>A . Of course what I am saying is same as what others have already said . I just wanted to emphasise how we can intuitively try to understand the logic from the meaning of 'if' and 'only if'. –  ameyask86 Feb 11 '14 at 11:18

5 Answers 5

up vote 12 down vote accepted

Let's assume A and B are two statements. Then to say "A only if B" means that A can only ever be true when B is true. That is, B is necessary for A to be true. To say "A if and only if B" means that A is true if B is true, and B is true if A is true. That is, A is necessary and sufficient for B. Succinctly,

$A \text{ only if } B$ is the logic statement $A \Rightarrow B$.

$A \text{ iff } B$ is the statement $(A \Rightarrow B) \land (B \Rightarrow A)$

share|improve this answer
@RossMillikan & Josh: Thanks for the answers. So I can conclude it as 'only if' is same as implies and 'iff' is same as equivalence? –  Fahad Uddin Sep 28 '11 at 20:05
@Akito: that is correct –  Ross Millikan Sep 28 '11 at 20:07

I will find a million dollars inside this locker only if I know the combination.

But that doesn't mean I will find a million dollars there if I know the combination. After all, there might be only a half million in there.

share|improve this answer

If A then B is true unless A is true and B is false and written $A \implies B$.

A only if B is true unless A is true and B is false, equivalent to if A then B.

A if B is true unless A is false and B is true, the converse of the above, and is written $B \implies A$

A iff B, also written A if and only if B, is true if A and B have the same truth value. It represents (A if B) and (A only if B) and is written $A \iff B$

share|improve this answer

A number is positive if and only if it is greater than zero.

A number is real if it is an integer. A real number, however need not be an integer.

share|improve this answer

$A \text{ iff } B$ is the statement

"if B then A" and "only if B then A"

$(B \Rightarrow A) \land (notB \Rightarrow notA)$

$(B \Rightarrow A) \land (A \Rightarrow B)$


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.