What is the relationship of “if A then B” and “A only if B”?

Consider the following, "if A then B" implies "A only if B". For example, take "if it is raining, the sidewalk will be wet,". Therefore, "it is raining only if the sidewalk is wet."

The first expression is straightforward, but what about the second? Only if the sidewalk is wet, is it possible it is raining. This does not mean other things, such as a water hose, cannot make the sidewalk wet, rather if it's wet, only then is it possible it is raining.

So, what is the relationship between "if A then B" and "A only if B"? In other words, does the first expression guarantee the truth of the second?

From the recent book by Jan von Plato, Elements of Logical Reasoning (Cambridge UP, 2013), pag 11:

The two sentences if A, then B and B if A seem to express the same thing. Natural language seems to have a host of ways of expressing a conditional sentence that is written A→B in the logical notation. Consider the following list :

From A, B follows; A is a sufficient condition for B; A entails B; A implies B; B provided thet A; B is a necessary condition for A; A only if B.

The last two require some thought. The equivalence of A and B, A↔B in logical notation, can be read as A if and only if B, also A is a necessary and sufficient condition for B. Sufficiency of a condition as well as the 'if' direction being clear, the remaining direction is the opposite one. So A only if B means A→B and so does B is a necessary condition for A.

It sound a bit strange to say that B is a necessary condition for A means A→B. When one thinks of conditions as in A→B, usually A would be a cause of B in some sense or other, and causes must precede their effects. A necessary condition is instead something that necessary follows, therefore not a condition in the causal sense.

In conclusion :

what is the relationship between "if A then B" and "A only if B"?

They have the same meaning.

Basically, A only if B is a weird way of saying "if not B, then not A". So all this is saying is, if the sidewalk is not wet, then it's not raining. Which is not to say that "since the sidewalk is wet, then it is raining." Does that make sense?

• Indeed that does make sense. If the sidewalk is not wet outside, then it is not raining (modus tollens). However, listen to what Ernest Sosa said in "Raft and the Pyramid." "I am foundationally justified in believing that I am in pain, only if I am justified in believing that someone (else) is in pain." That translates into "if I'm in pain, then someone else is in pain." And that sounds, well,...unjustified and need of proof. – Michael Lee Jun 30 '14 at 2:12