Sometimes in math, we trip over words, especially when they are used in ways that differ from everyday usage, or when the associated grammar is complicated. This set of three answers from our archive, each of which is referred to by the next one, look at relationships among the ideas of “necessary and sufficient conditions”, and “if and only if”.

## Does “necessity” mean “if” or “only if”?

First, from 1999, we have a question about the words “necessary” and “sufficient” in the statement of a theorem to be proved; such a statement is also called a “biconditional”, as we have conditions in both directions. The geometrical theorem here is simple, probably intended just to demonstrate the form of this sort of theorem. It happens to tie in to our recent discussions of inclusive definitions:

Parts of a Biconditional Statement I came across the following arguments (in a book) involving the biconditional and the author's proof confused me. The author stated the following theorem: A quadrilateral is a squareif and only ifit is both a rhombus and a rectangle, and proved the theorem in two steps as follows: Step 1 (the"if"part): Let Q be a quadrilateral which is both a rhombus and a rectangle. From the definition of a rhombus, all four sides are equal in length. From the definition of a rectangle, all four angles are right. A square is a four-sided figure in which all angles are right and all sides are equal. Therefore, Q is also a square. Step 2 (the"only if"part): Let Q be a square. By definition, all four sides are equal, so Q is also a rhombus. Again by definition, all angles are right, so Q is a rectangle. Until here I have followed the author's proof, but further he re-proves the same biconditional using "necessary" and "sufficient"; and there he wrote that: step 1 (the"necessity"part): the same as "if" part in the last proof. Step 2 (the"sufficiency"part): same as the "only if" part above. I believe it's just the other way around: that is, "necessity" corresponds to "only if" and "sufficient" corresponds to "if." Could anybody be of some help? Am I right? More explanation to make the idea clearer is very welcome.

Unfortunately, Abdellah didn’t quote the “necessary and sufficient” formulation of the theorem; there are two possibilities, and if the book itself didn’t state it explicitly, that may be the source of confusion.

My first thought was that the restatement of the theorem would most naturally be something like this, where the condition is the more complicated statement:

“A **necessary and sufficient condition** *for* a quadrilateral to be a square *is* that it is both a rhombus and a rectangle.”

If so, then Abdellah is arguing that the statement that being both a rhombus and a rectangle is **necessary** for being a square is equivalent to “A quadrilateral is a square **only if **it is both a rhombus and a rectangle.” He would be right, though honestly it took me a while to convince myself of this, because the words are so convoluted!

On the other hand, it could be this, swapping the roles of the clauses to put “necessary and sufficient condition” where “if and only if” was:

“For a quadrilateral, being a square *is* a **necessary and sufficient condition ***for* it to be both a rhombus and a rectangle.”

If that is what they meant, the book is right!

Doctor Mike properly assumes that the book is correct (taking the first clause to be the “condition” for the second, as in my second version), and explains the meaning of the words:

Maybe it would help to actually write out the sentences, but let's use "S" to mean Square and "R+R" to mean Rhombus and Rectangle. The first one is "S is a sufficient condition for R+R." This means that if you are given S, then you have "sufficient" (or "enough") information to prove R+R. That's exactly what was done for the "only if" part. Next, look at "S is a necessary condition for R+R". This should be the other direction, so let's see why. If you focus on the first part, "S is a necessary condition," then you see we really are talking about S beinga necessary and logical consequenceof something, namely R+R. Assuming R+R and proving S is what was done above in the "if" step. Here is a summary. The following 4 sentences mean the same. S ----> R+R S implies R+R S only if R+R S is sufficient for R+R The other direction also has the 4 similar variants. S <---- R+R S is implied by R+R S if R+R S is necessary for R+R

He left out two forms that can help clarify (or confuse): \(\text{S} \rightarrow \text{R+R}\) can be read as “**if** S, **then** R+R”, Similarly, “S **if** R+R” means the same thing as “**if** R+R, **then** S”. Often, putting the “if” first clarifies the meaning.

As I think about the use of “necessary” and “sufficient” in logic, I realize that these are, in a sense, two different senses of what we think of as a “condition” in everyday life, and part of the confusion may be the ambiguity of that ordinary usage.

When I look up “condition” in a dictionary, the relevant definition is “prerequisite”; in the Merriam-Webster dictionary, an example given is “Available oxygen is an *essential condition* for animal life”. A condition in this sense is something without which something wouldn’t happen – it will happen *only if* the condition is satisfied. That’s exactly what a “necessary condition” is. As Doctor Mike said, we can just as well think of this as a logical *consequence*: If someone is alive, then we know he must have oxygen. But this is not to say that life *causes* the oxygen! Nor is oxygen a *sufficient *condition for life; you need other things as well, such as food.

On the other hand, “condition” also means, in grammar, the “if clause” in a conditional sentence like “If A, then B”; in this sense a “condition” is only *sufficient*, giving a condition under which B will be true, but saying nothing about what happens if A is false. So when we connect the words “condition” and “if”, we tend to think of a *sufficient* condition (a fact *from* which we can conclude that something else is true), not a *necessary* condition (a fact that is *required* in order for something else to be true).

The same is true in logic: When we talk about a “conditional statement”, we mean \(\text{A} \rightarrow \text{B}\), or “If A, then B”, where again A is a sufficient, not necessary, condition for B. If A is true, we can be sure that B is true. (In logic, A is called the antecedent and B the consequent – the word “condition” is not used.)

When we use the words “necessary” or “sufficient” with “condition”, we are overriding these uses, and taking a “condition” merely as any statement, which has whichever relation we specify with the other statement.

## Necessary or sufficient

Adeel asked about these words in 2002:

What do we mean by 'necessary condition' and 'sufficient condition' (and sometimes we call a condition both 'necessary and sufficient')? I am very much confused. Help!

I used an example (unlike Abdellah’s question above) in which only one part is true, which makes it a little easier to see the distinctions:

Let's look at the two statements (predicates), "X is a mammal" and "X is a dog". Call the first statement A, and the second B. Now, A is a _necessary_ condition for B, because A _must_ be true in order for B to be true. B can only be true if A is true; if A is not true, then B can't be true. We can say this in several ways: A is a necessary condition for B A <== B (A is implied by B) B ==> A (B implies A) A if B (whenever B is true, A will be true) B only if A (B is true only when A is true) On the other hand, A is not a _sufficient_ condition for B, which would mean that in order to know that B is true, it is _enough_ to know that A is true. It is not enough to know that X is a mammal, because there are other mammals besides dogs. But if we reverse the two statements, we find that B is a sufficient condition for A: if we know that X is a dog, we know that it is a mammal. So these statements are equivalent: A is a sufficient condition for B B <== A (B is implied by A) A ==> B (A implies B) B if A (whenever A is true, B will be true) A only if B (A is true only when B is true)

I needed a different example to illustrate “necessary *and* sufficient”:

Note that "necessary condition" and "sufficient condition" are opposites; "A is a necessary condition for B" means the same thing as "B is a sufficient condition for A". Now, if A is a necessary AND sufficient condition for B, then the implication works both ways; it can be expressed as A <==> B (A is equivalent to B) A iff B (A if and only if B) This means that if A is true, B must be true, and if B is true, A must be true. That is not the case in our example statements; but it would be true, for example, if A were "X is less than Y" and B were "Y is greater than X". These two statements mean the same thing; if one is true, then the other is true. So if we want to prove B, it is necessary for A to be true, and it is sufficient to prove that A is true.

## What does “only if” mean?

I think some additional explanation is needed for the meaning of “only if”; but I couldn’t find a good discussion of this in the archive. What follows is an unarchived question from 2011:

The statement "A if and only if B" can be taken apart as "A if B" and "A only if B". Both parts need to be either true or false for the biconditional to be true. Shown with a truth table, easily proven. Wanting to deeply understand the meaning of the parts, I ran into some struggle. Since I'm not native English speaking, probably I have some problems with the words...but I don't know if that is really the case. "A only if B" This is the easy one for me. It says, only if B is true, A is true. So, if B is true and A is true, the formula is true. And if B is true but A is false, the formula is false. And for the rest of possibilities, there is nothing we can say. So this is equivalent to "B --> A". "A if B" This is the difficult one for me. Since 'B' comes syntactically after the 'if', this looks for me like "B --> A". But this case is already given above. So how can I rephrase this in a way making sense in English? Or is this just some sloppiness of the definition and I have to get over it? Or did I not understand the real meaning? Can you explain on this? Thank you.

Panny actually got the “if” case *right*, but wrongly thinks that “only if” means the same thing. That’s easy to do! I replied, first about the language issue:

I think most native English speakers have trouble with this! In fact, they may have more trouble, because they are somewhat familiar with the phrases but have never stopped to think about exactly what they mean. When you think you understand something, you are in greater danger of fooling yourself!

Then, about the “only if” case:

This is actually the harder part; you got it wrong, as most of us do at first. Even I have to think about it a moment to be sure I'm explaining it correctly. Take an example: "The road is wetonly ifit rains". What does that statement claim? It says that the only time the road will be wet is if it rains. (This is not really true, of course; snow may have melted on the road.) So if you see that the road is wet, it must be because it rained. Therefore, we can restate this as, "if the road is wet, then it has rained". Do you see what this means? The statement "A only if B" turns out to mean "if A, then B", or "A -> B". (In my example, A is "the road is wet" and B is "it has rained".) Again, it is saying that A is true ONLY if B is true, which means that if A is true, you know that B must be true!

Finally, the “if” case:

Here your reasoning is correct; "A if B" means "if B then A", which means "B -> A". So (a) "A if B" and (b) "A only if B" mean (a) "B -> A" and (b) "A -> B" respectively.

## Another example

I will quote only parts of one last question and answer on this, because the example is from modular arithmetic, which not everyone will want to get into. Read the whole thing if you do!

Necessary and/or Sufficient Conditions with Modular Math ... identify which of the conditions below are "sufficient", "necessary", "necessary and sufficient" or none of these ... I don't understand what is meant by sufficient, necessary, and sufficient and necessary.

Here is the generally useful part of the answer, which touches on the “only if” question as well:

A condition A is "necessary" for a result B if B is true ONLY if A is true; that is, A HAS TO be true in order for B to be true. We say that B implies A, or "B only if A". A condition A is "sufficient" for a result B if B is true WHENEVER A is true; that is, A is ENOUGH to force B to be true. We say that A implies B, or "B if A". A condition A is "necessary AND sufficient" for a result B if both of the above are valid; we say that A is true IF AND ONLY IF B is true. A and B are equivalent. As an example, suppose I asked whether "x and y are both even" is a necessary and/or sufficient condition for the product xy to be even. Since IF x and y are both even, THEN xy is even, it is a sufficient condition; knowing they are both even is enough to be certain that the product is even. But xy will also be even if only one of the factors is even; so having both even is NOT necessary.

Pingback: Translating Logic Statements – The Math Doctors