[Math] Prove that if $x$ is odd, then $x^2$ is odd

elementary-number-theoryproof-verificationproof-writing

Prove that if $x$ is odd, then $x^2$ is odd

Suppose $x$ is odd. Dividing $x^2$ by 2, we get:
$$\frac{x^2}{2} = x \cdot \frac{x}{2}$$
$\frac{x}{2}$ can be rewritten as $\frac{x}{2} = a + 0.5$ where $a \in \mathbb Z$. Now, $x\cdot\frac{x}{2}$ can be rewritten as:

$$x\cdot\frac{x}{2} = x(a+0.5) = xa + \frac{x}{2}$$

$xa \in \mathbb Z$ and $\frac{x}{2} \notin \mathbb Z$, hence $xa + \frac{x}{2}$ is not a integer. And since $xa + \frac{x}{2} = \frac{x^2}{2}$, it follows that $x^2$ is not divisible by two, and thus $x^2$ is odd.

Is it correct?

Best Answer

Let $x = 2k + 1 \in \mathbb{Z}$ be odd. So, $$ x^{2} = (2k + 1)^2 = 4k^{2} + 4k + 1 = 2(2k^{2} + 2k) + 1$$ Let $t = 2k^{2} + 2k \in \mathbb{Z}$, thus: $ x^{2} = 2t + 1$.