Given a matrix $A$ with $\operatorname{tr} (A) = 0$, prove that there is a B such that $\forall 1\leq i\leq n :(B^{-1}AB)_{i,i}=0$ I've tried using some matrices $B^{-1}$ that switch the rows, but the $B$ at the end placed the elements back in the diagonal (in different order) so I couldn't find a rule.

Hint: 
For a $2 \times 2$ matrix, consider one with $1$ and $-1$ on the diagonal. (Note that there cannot be any off-diagonal elements here, because the evalues differ). Then picking $B$ to be rotation by $\pi/4$ i.e., the matrix
$$
s\begin{bmatrix}
1 & -1 \\
1 & 1
\end{bmatrix},
$$
where $s = \frac{\sqrt{2}}{2}$, 
produces a matrix of the desired form, and this clearly generalizes to other eigenvalues besides $1$. 
How'd I find this? I looked for a vector $v$ that the original matrix sent to a vector $w$ with $v \cdot w = 0$, since that's what helps produce a 0 on the diagonal. Since the original matrix simply reflects through the $x$-axis, the vector $(1, 1)$ goes to $(1, -1)$, which is perpendicular to it. When I found two such independent vectors (a similar argument applies to $(1, -1)$, for example), I chose them as my columns for $B$ (i.e., I represented the original transform in that basis).  (Along the way, I made them unit vectors so that it'd be easier to compute $B^{-1}$.)
For $3 \times 3$, there are three cases to consider: diagonal with three distinct e-values that sum to zero, diagonal with entries $a, a, -2a$, and the same thing, but with a $1$ in the superdiagonal entry above $a$ and $a$. 
In each case, you need to do a similar analysis/discovery of vectors. 
