Why does proof by contrapositive make intuitive sense?

If you want to have a "set containment" kind of intuition, you should probably do the opposite: thinking of $P \implies Q$ as $P \subseteq Q$. The intuition is that if you are in some situation where $P$ is true (i.e. "being contained in $P$") then $Q$ is also true for this situation ("contained in $Q$"). In particular, $Q$ may contain more than just $P$, and this makes clear that there are situations where $Q$ is true but $P$ is false. (For example, "$n$ is a multiple of $4$" implies "$n$ is even" but there are numbers like $n=6$ that are even but not multiples of $4$.)

With the correct set-containment formulation, it is easy to see the contrapositive is equivalent. $\lnot Q \implies \lnot P$ can be thought of as $Q^c \subseteq P^c$ where the $c$ denotes set complement, and you can see that this is equivalent to $P \subseteq Q$.

One situation where this set containment idea is realized is in probability of events. For example, $X > 4$ implies $|X| > 4$, so we have $\{X > 4\} \subseteq \{|X| > 4\}$ and $\mathbb{P}(X>4) \le \mathbb{P}(|X|>4)$.


Edit: I should mention that your setup can still show that the contrapositive is equivalent (see JMoravitz's answer). You just have to stay consistent with your setup: the set $P$ denotes all hypotheses that $P$ implies. Under your setup, if $Q$ is not true, then the complement of $Q$ contains all of the complement of $P$, so $\lnot Q \implies \lnot P$, even though the complement of $Q$ can still contain some things in $P$.


Since it seems you are thinking in terms of subsets, It is like saying that if $P\supseteq Q$ then $Q^c\supseteq P^c$ (in the sense that if $P$ is the set of all things we know to be true as our hypothesis, then the entirety of $Q$ is among those things we know as a result to be true. On the other hand if $Q^c$ is the set of all things we know to be true, then the entirety of $P^c$ is among the things we know to be true)

In the following image, $P$ contains $Q$ as a subset. The lighter shade indicates that it is used by both $P$ and $Q$.

enter image description here

On the other hand, looking at the complements, the area outside of $Q$ (part, not all, of which is red) contains the area outside of $P$ (in pink) as a subset. Again, the lighter shade is the area used in both.

enter image description here


If $P$ is true, then $Q$ has to be true.

But then suppose that $P$ is true, and $Q$ is false. But, we already said that if $P$ is true, then $Q$ had to be true. Thus, this is an impossibility. Therefore, we can conclude that $P$ is false.

The true statement of the contrapositive isn't qualified with a truth value, in the way I've done above, but this is a way to think about it.

$P \implies Q \iff \neg Q \implies \neg P$ is of course easily verified with a truth table as well.