Show, using your own examples, how affirming the consequent and denying the antecedent are deductively invalid argument forms. What makes these examples of forms of fallacious reasoning?

I answered half of the question already but i'm stuck on these two key points related to the question .can you please help me..

1.Explain invalidity with reference to deduction.
2. Explain how the argument forms are fallacious.

1. Invalidity in Deduction:

In deductive reasoning, arguments are evaluated based on their logical structure to determine their validity. Validity refers to the property of an argument where the truth of the premises guarantees the truth of the conclusion. If the argument is invalid, it means that the truth of the premises does not necessarily ensure the truth of the conclusion.

2. Fallacious Reasoning in Affirming the Consequent:
Affirming the consequent is an argument form that is deductively invalid. It is commonly represented as the following form:

1. If A, then B.
2. B.
3. Therefore, A.

Example:
1. If it is raining, the ground will be wet.
2. The ground is wet.
3. Therefore, it is raining.

Explanation:
This argument form is fallacious because even though it is true that if it is raining, the ground will be wet, it does not mean that if the ground is wet, it must be raining. There could be alternative explanations for the wet ground, such as a sprinkler system or a spilled water bottle. So, the truth of the premises (1 and 2) does not guarantee the truth of the conclusion (3), making the argument invalid.

Fallacious Reasoning in Denying the Antecedent:
Denying the antecedent is another argument form that is deductively invalid. It can be represented as:

1. If A, then B.
2. Not A.
3. Therefore, not B.

Example:
1. If it is raining, the ground will be wet.
2. It is not raining.
3. Therefore, the ground will not be wet.

Explanation:
This argument form is fallacious because even though it is true that if it is raining, the ground will be wet, it does not mean that if it is not raining, the ground will not be wet. There could be other reasons for the ground to be wet, such as a previous rainfall or a leaking pipe. Therefore, the truth of the premises (1 and 2) does not ensure the truth of the conclusion (3), making the argument invalid.