Trace zero matrix I have seen a problem where for a real matrix $A$ if $A^2=-I$ then trace $A$ is zero but I didn't understand why it is not true in general for a complex matrix $A.$ 

because a complex matrix can be:
$$A=
\begin{bmatrix}
i&0\\
0&i
\end{bmatrix}
$$
So:
$$
A^2=\begin{bmatrix}
i&0\\
0&i
\end{bmatrix}
\begin{bmatrix}
i&0\\
0&i
\end{bmatrix}=
\begin{bmatrix}
-1&0\\
0&-1
\end{bmatrix}=-I
$$
and note that this is true also for an $n \times n$ diagonal matrix that has all diagonal elements $a_{hh}=i$ 
