Proving the invertibility of an $n$ by $n$ matrix (Linear algebra) Let $A$ be an $n\times n$ matrix. Prove or give a counterexample to the following statement.

If $A^{2}=0$ (an $n$ x $n$ matrix), then $A$ is not invertible.

What I tried:
The statement is true. 
Assume the contrapositive of the statement:

If $A$ is an invertible matrix, then $A^{2}\neq0$.

Since we know that $A$ is invertible, then we can write $A$ in the following form $AX=I_{n}$ and if we let $X=A$ then $A^{2}=I_{n}\neq0$ hence proving that $A^{2}\neq0$. 
Is my proof correct?
 A: Your proof is incorrect.
You say:

If we let $X=A$ then $A^2 = I_n$

If this proof was correct, then what you just did was prove that if $A$ is invertible, then $A^2=I_n$. This is obviously false, since $A=2\cdot I$ is invertible, but $(2I)^2\neq I$.
The problem is that knowing that $A$ is invertible means that

There exists such a $X$ that $AX=I$.

While you supposed that $AX=I$ for every $X$.

To actually prove that if $A^2=0$, then $A$ is not invertible, I advise you to not try to prove by contraposition, but rather try to prove there exists at least some vector $x\neq 0$ such that $Ax=0$.
A: We will prove the contrapositive:
If $A$ is invertible then $A^2 \neq 0$. As $A$ is invertible, $AA^{-1}=I \implies A^2A^{-1} = A \implies A^2A^{-2} = I \implies A^2 \neq 0$ and $ A^{-2} \neq 0$
Hence, proved 
A: You can use $\det(A^2)=\det(A)\cdot\det(A)=\det(0)=0$. Hence, 
$$\det(A)=0$$ 
This tells you the determinant of $A$ is $0$ and $A$ is not invertible.
You can also find an counterexample using a nilpotent Matrix.
$$M=
\begin{Bmatrix} 
0 & 1\\
0 &0
\end{Bmatrix}
$$
$M$ is clearly not invertible.
A: $\det(A^2)=\det(A)\cdot \det(A)=0\Rightarrow \det(A)=0$
