Mathematical logic and contrapositives. I have the following statement

If $x^2=4$, then $x=2$ or $x=-2$
  I have to write its corresponding contrapositive.

I know that this should be stated as follows:

If $x$ is not equal to $2$ and $-2$, then $x^2$ is not equal to $4$'.

However, I learned something about conditional statements and it has confused me.
I learned that I can write the conditional statement above also as:
$$
x^2=4 \quad \Rightarrow \quad x=2 \text{ or } x=-2,
$$
this is supposedly logically equivalent to $x^2$ is not equal to $4$ or $x=2$ or $x=-2$.
Then to write the contrapositive of this would lead me to believe I should write $x$ is not equal to $2$ and $-2$ and $x^2=4$, however I know that this isn't correct. Can someone explain how to manipulate if-then statements to lead to contrapositives and negations?

I guess you are confusing the terminology.


*

*Implication: $P \implies Q$.

*Contrapositive: $\neg Q \implies \neg P$.

*Inverse: $\neg P \implies \neg Q$.

*Converse: $Q \implies P$.

*Negation: $\neg (P \implies Q)$.

*Logical equivalence: $\neg P \lor Q$ and $\neg(P \land \neg Q)$.


In your case $(x^2 = 4) \implies (x = 2 \quad\text{or}\quad x = -2)$ you have


*

*contrapositive $(x \ne 2 \quad\text{and}\quad x \ne -2) \implies (x^2 \ne 4)$,

*logically equivalent to $(x^2 \ne 4) \quad\text{or}\quad (x = 2 \quad\text{or}\quad x = -2)$,

*also, logically equivalent to $\text{not}\;[(x^2 = 4) \quad\text{and}\quad (x \ne 2 \quad\text{and}\quad x \ne -2)]$.


The equivalence $\neg(P \land \neg Q)$ is usual in a proof by contradiction: supposing $P$ and no $Q$ we obtain a contradiction. So you can conclude $P \implies Q$, beacuse is logically equivalent to $\neg(P \land \neg Q)$, and $P \land \neg Q$ leads a contradiction.
The contrapositive is usefull when it is easier to prove than $P \implies Q$.
The converse is used when one need to show $P \iff Q$, becuase we have to prove $P \implies Q$ and $Q \implies P$.

Edit. Another way to use the logical equivalence $\neg P \lor Q$ is in a proof by contradiction. For instance, if you want to prove

For every rational number $\epsilon > 0$, there exists a non-negative rational number $x$ such that $x^2 < 2 < (x + \epsilon)^2$.

Then suppose for sake a contradiction that there is no non-negative rational number $x$ such that $x^2 < 2 < (x + \epsilon)^2$, i.e., for all $x$ you have $x^2 \ge 2 \text{ or } 2 \ge (x + \epsilon)^2$. Thus you can use the logical equivalences
$$x^2 < 2 \implies 2 \ge (x + \epsilon)^2$$
$$2 < (x + \epsilon)^2 \implies x^2 \ge 2$$
to lead a contradiction (maybe using induction).
