I'm not completely sure how to phrase my question, so bare with me.
If I would need to prove 'Suppose $n$ is integer, if $n$ is odd, then $n^2$ is odd' then a proof by contradiction would look something like this.
Suppose $n$ is integer, if $n$ is odd then $n^2$ is even.
Assume $n$ is odd, so $n=2a+1$.
Therefore $(2a+1)^2$ is even
And $4a^2+4a+1$ is even
Therefore $2b+1$ is even.
This is a contradiction.
So in this case you start from the hypothesis to (dis)proof the conclusion.
My confusion is about when this is done the conclusion is used to deal with the hypothesis e.g.
Suppose n is integer, if n^2 is odd, then n is odd.
Proof by contrapositive
If proof by contrapositive would be used, you could rewrite this to: if n is even, then $n^2$ is even.
And this is pretty straight forward to prove since you can plug in the knowledge about $n$ (the hypotheses) into the $n^2$ (the conclusion)
But how can this be proved using contradiction?
I have looked at various resources and it seems that knowledge about the conclusion is plugged back into the hypotheses for example:
Proof by contradiction
Suppose $n$ is integer, if $n^2$ is odd, then $n$ is even.
Assume $n$ is even, then $n=2a$
Now plug this into $n^2$ is odd, then $(2a)^2$ is odd
Let $b$ is $2a^2$
And $(2a)^2$ can be simplified to
$2b$ is odd Which is a contradiction.
But this feels fishy. Normally you work from the hypothesis and to proof the conclusion. But it seems that in this case, the reverse is allowed.
Another example of my confusion: Suppose a is integer. If a^2 is even, then a is even. Proof by contradiction. Suppose a is integer. If a^2 is even, then a is odd. Since a is odd, then a=2c+1. Then a^2=(2c+1)^2=2(2c^2+2c)+1. So a^2 is odd, which is a contradiction.
In the above example you plug knowledge of the conclusion back into the hypothesis. Normally with direct proof you plug knowledge from the hypothesis into the conclusion. This is what is causing my confusion.
And Another example of my confusion:
Is the proof using contradiction for both these statements exactly the same?
1: Suppose n is integer. If n is odd, then n^2 is odd.
2: Suppose n is integer. If n^2 is odd, then n is odd.