All grass is green.
This emerald is not grass.
Therefore this emerald is not green.

Most people will immediately recognize that the above syllogism is flawed. Clearly, there are other qualities besides “being grass” that might cause an object to be green. The syllogism is incorrect because it commits the formal logical fallacy of “Denying the Antecedent.” More formally, this fallacy looks like:

If A, then B
Not A
Therefore not B

Denying the Antecedent occurs when, given a syllogism, one attempts to prove the inverse by negating the initial premise (the antecedent). The problem with this approach is that most categorical syllogisms only define sufficient conditions, and not necessary conditions. In other words, such syllogisms show that if A is true, then B follows. It doesn’t show that A is the only way that B could possibly be true. So a thing being grass is enough to show that it is green, but it doesn’t exclude other categories or qualities that might also prove “greenness”.

Like all fallacies, Denying the Antecedent is easy to see in formal examples, but much trickier to spot in the real world. One place where it this fallacy is employed quite a bit is as an attempt to take one common condition as the only possible reason for a particular outcome. For instance, a common response to increased police powers or broad government surveillance is something along the lines of: “if you’re not a criminal, then why are you worried? You have nothing to hide.”

Put slightly more formally, the (flawed) argument goes something like this:

All criminals should fear surveillance.
But you’re not a criminal.
Therefore you shouldn’t fear surveillance.

Where this argument breaks down is that there are plenty of other reasons why one might reasonably fear increased surveillance or police powers. Being a criminal is a sufficient condition to fear government surveillance, but it is not necessary. That is to say, being a criminal is enough to cause a fear of surveillance, but there might be other reasons not admitted by the original syllogism.

I should note that there are instances in which denying the antecedent will result in a valid logical argument. This is only true in the case where the condition stated is both necessary and sufficient. This is condition is usually described in syllogisms using the phrase “if and only if”, often shortened to “iff”. For example:

Iff you are Ada Lovelace, then you invented computer programming.
You are not Ada Lovelace
Therefore you didn’t invent computer programming.

This syllogism works, because there is exactly one condition under which you could have invented computer programming: you have to be Ada Lovelace. Since you’re not, you can’t possibly be the inventor of computer programming.

A trick for spotting this fallacy in the wild is to look for instances in which people portray some quality or condition as the only way a certain outcome can occur. When you notice someone making such an argument, take a moment to think of other conditions that might lead to that consequence or to carefully write out the argument their making in a more formal way. Odds are, you’ll find that they’ve relied on a denied antecedent somewhere in their reasoning.