https://en.wikipedia.org/wiki/Formal_fallacy

While a logical argument is a non sequitur if, and only if, it is invalid, the term "non sequitur" typically refers to those types of invalid arguments which do not constitute formal fallacies covered by particular terms (e.g. affirming the consequent). In other words, in practice, "non sequitur" refers to an unnamed formal fallacy.

A special case is a mathematical fallacy, an intentionally invalid mathematical proof, often with the error subtle and somehow concealed. Mathematical fallacies are typically crafted and exhibited for educational purposes, usually taking the form of spurious proofs of obvious contradictions.

Affirming the consequent
Main article: Affirming the consequent
Any argument that takes the following form is a non sequitur

If A is true, then B is true.
B is true.
Therefore, A is true.
Even if the premise and conclusion are all true, the conclusion is not a necessary consequence of the premise. This sort of non sequitur is also called affirming the consequent.

An example of affirming the consequent would be:

If Jackson is a human (A), then Jackson is a mammal. (B)
Jackson is a mammal. (B)
Therefore, Jackson is a human. (A)
While the conclusion may be true, it does not follow from the premise:

Humans are mammals
Jackson is a mammal
Therefore, Jackson is a human
The truth of the conclusion is independent of the truth of its premise – it is a 'non sequitur', since Jackson might be a mammal without being human. He might be an elephant.

Affirming the consequent is essentially the same as the fallacy of the undistributed middle, but using propositions rather than set membership.

Denying the antecedent
Main article: Denying the antecedent
Another common non sequitur is this:

If A is true, then B is true.
A is false.
Therefore, B is false.
While B can indeed be false, this cannot be linked to the premise since the statement is a non sequitur. This is called denying the antecedent.

An example of denying the antecedent would be:

If I am Japanese, then I am Asian.
I am not Japanese.
Therefore, I am not Asian.
While the conclusion may be true, it does not follow from the premise. For all the reader knows, the statement's declarant could be another ethnicity of Asia, e.g. Chinese, in which case the premise would be true but the conclusion false. This argument is still a fallacy even if the conclusion is true.

Affirming a disjunct
Main article: Affirming a disjunct
Affirming a disjunct is a fallacy when in the following form:

A is true or B is true.