# Necessity and sufficiency

I'm learning to write mathematical proofs. When the statement to be proven is in the form "p if and only if q", the proof is often broken into two parts: necessity and sufficiency. I wonder whether I should organize my proof like:

Necessity: p=>q

Sufficiency: q=>p

... or vice versa?

Since p<=>q is is equivalent to q<=>p, does it really matter? Is there any accepted practise to put p=>q in necessity or sufficiency, depending on the order in which the statements are presented?

-
It really doesn't matter. – Rasmus Oct 18 '12 at 8:33
Thank you, Rasmus :) – Rashi Oct 18 '12 at 8:38
Regarding the question I think you asked, it does matter. $p\to q$ means $p$ is sufficient for $q$. $q\to p$ means $p$ is necessary for $q$. That's just the English meanings of the words. As to the question I think @Rasmus answered, whether it matters which order you prove $p\to q$ and $q\to p$ in, no, that makes no difference. – Kevin Carlson Oct 18 '12 at 8:40
As to why it should matter, if you're in a situation where $q\to p$ is true but $p\leftrightarrow q$ isn't, you might-though it's not all that common-see someone writing sentences like "$p$ is necessary for $q$ to hold" instead of "$q$ implies $p$" or "$p$ holds only if $q$ does". – Kevin Carlson Oct 18 '12 at 8:43
Yes, I understand that. What I was really asking was when p<=>q, which condition do we call necessary and which sufficient, since each of them is both? – Rashi Oct 18 '12 at 8:53

Strictly speaking, there is no difference, but it is common to put the "subject" first. An example will make more sense.

A subset of $\mathbb{R}^n$ (with the usual topology) is compact if and only if it is closed and bounded.

vs.

A subset of $\mathbb{R}^n$ (with the usual topology) is closed and bounded if and only if it is compact.

They are both the same statement, but the purpose of the theorem is to characterize compactness, not to characterize (closed and bounded)-ness. For this reason, it is more pleasing (I think) to mention compactness first and also to use phrases like "necessary for compactness" and "sufficient for compactness".

-
How can you tell compactness is a necessary or sufficient condition from the first statement in your answer? – math101 Nov 24 '14 at 5:20
@math101 The phrase "if and only if" essentially means "necessary and sufficient". Both versions of my statement say "(closed and bounded)-ness is necessary and sufficient for compactness". The first formulation is just written in a more pleasing way. – Austin Mohr Nov 24 '14 at 21:49
@ Austin Mohr, "iff" means 'necessary and sufficient'. This is a nicest shortest explanation i've seen. Correspondingly, if I want only "necessity", what would be the right sentence? Similarly, the right sentence for "sufficiency"? – math101 Feb 15 at 22:30
@math101 To say "(closed and bounded)-ness is sufficient for compactness", you could say "A subset of $\mathbb{R}^n$ is compact if it is closed and bounded." That is, (closed and bounded)-ness is enough to ensure compactness. To say "(closed and bounded)-ness is necessary for compactness", you could say "A subset of $\mathbb{R}^n$ is compact only if it is closed and bounded." That is, (closed and bounded)-ness is required to ensure compactness. Incidentally, this is why "if and only if" is shorthand for "necessary and sufficient". – Austin Mohr Feb 16 at 2:30
Yes. It is clear now. "If" correspond to sufficiency. "Only if" correspond to necessity. – math101 Feb 16 at 12:11