Denying the antecedent is a formal fallacy: If P then Q; not-P; therefore not-Q. This is invalid because Q might be true via other pathways besides P.