How does “If $P$ then $Q$” have the same meaning as “$Q$ only if $P$ ”?

Every lecture that I watched on mathematical logic and my textbook say that
$P \Rightarrow Q$ has the same meaning as $\text{"If$P$then$Q$"}$ which has the same meaning as $\text{$Q$only if$P$}$.

How does " $\text{if$P$then$Q$}$ " have the same meaning as " $\text{$Q$only if$P$}$ ?

i think that is not true. For instance, let $P = \text{a human$x$killed human$y$}$

and $Q = \text{the human$x$will be arrested}$.

Then $P \Rightarrow Q$ means $(\text{a human$x$killed human$y$}) \Rightarrow (\text{the human$x$will be arrested})$
which means

$$\text{if a human x killed human y, then the human x will be arrested} \quad (1)$$

but if we say ,

$$\text{a human x will be arrested, only if the human x killed human y} \quad (2)$$

then the meaning of (1) differs from (2). Statement (2) says that the human $x$ will be arrested in only one case which is killing $y$.

-
+1 Nice question, Fawzy – Babak S. Aug 25 '13 at 7:10
It may help to consult my answer at <math.stackexchange.com/questions/181178/…;. – LePressentiment Aug 25 '13 at 7:33
It has already been explained that you have probably misread your textbook. One additional comment: I personally translate “Q only if P” in my head to “if not P then not Q”, which of course is equivalent (well, in standard logic) to “if Q then P”. – Carsten S Oct 28 '13 at 9:48
It's not. You probably misread your textbook slightly. – Akiva Weinberger Sep 1 '14 at 23:05

I think you're mixing up the difference between:

• $p\;$ if $\;q$, which IS translated $q\rightarrow p$, (and is equivalent to $q \rightarrow p\;$, versus
• $p\;$ only if $\;q,\;$ which is translated $p \rightarrow q \;\equiv\;$ "if $p$ then $q$".

They are completely different statements, as "only if" $\;\not\equiv\;$ "if".

The "only if" is a "cue" that $q$ is a necessary condition for $p$. When only "if" appears, as in "$p$ if $q$", then the "if," alone, is a cue that $q$ is a sufficient condition for $p$

$$\text{(Sufficient condition)}\quad \rightarrow \quad \text{(Necessary condition)}$$

See also this thread and the corresponding answers which is consistent with the logical translations of many sorts of "if $p$ then $q$" statements, as Zev cites, and there's some scattered explanations as to "why" these are logically equivalent statements.

Also, search math.se for "material implication" and/or "if...then...". This material implication is perhaps one of the most confusing or unintuitive of the basic logical connectives students encounter.

-
this website , math.se , is not in english , i think i understand this mixing now . thanx :) – Maths Lover Feb 22 '13 at 14:57

It does not have the same meaning and any texts that say that they do (which I doubt there are many of; more likely you are misinterpreting) are wrong.

$(P\implies Q)$ has the truth table $$\begin{array}{c|c|c|} & P=T & P=F\\\hline Q=T & T & T\\\hline Q=F & F & T\\\hline \end{array}$$ whereas "$Q$ only if $P$", i.e. $(\lnot P\implies \lnot Q)$, has truth table $$\begin{array}{c|c|c|} & P=T & P=F\\\hline Q=T & T & F\\\hline Q=F & T & T\\\hline \end{array}$$

Here is the relevant passage from the book you cited (p.25):

-
for instance , Mathematical logic by Angelo Margaris mentioned that , and i heared the same thing in many online lectures on internet . – Maths Lover Feb 22 '13 at 13:40
@MrWhy: See my edit. – Zev Chonoles Feb 22 '13 at 13:47
The second option quoted there, that "P only if Q" being the same as $\,P\rightarrow Q\,$ is one of the most confusing literal equivalences in english...and not only for people not having english as first language. There was a pretty heated up debate about this in another site some 8-9 years ago and the more or less general consensus was that this option should be ruled out to avoid mess...alas, it hasn't or, at least, no completely. – DonAntonio Feb 22 '13 at 14:19
@MrWhy: You're still not reading the picture carefully enough. It says that "$P$ only if $Q$" means exactly the same as "if $P$ then $Q$". Yet another way of saying the same (which may make the connection clearer is) "$P$ only when $Q$". "$Q$ only if $P$" means $Q\to P$, which by contraposition is the same as $\neg P\to\neg Q$. – Henning Makholm Feb 22 '13 at 14:21
Would the downvoter care to comment on how this answer needs improvement? – Zev Chonoles Feb 22 '13 at 15:00

I agree that "only if" is the most confusing of the group. I think of it this way.

Say $p \implies q$. The only way this can be false is if ♦ either p is false, ♦ or q is true.

Say p is true. If q is false that makes the implication false.
So if p is true, then q must be true.

In toto, if p => q is true, then p can be true only if q is true.

Example: Remember, if 2 + 2 = 5 then I am the Pope. That's true.

So 2 + 2 = 5 only if I am the Pope. Can't be any other way.

-