Question: I need to construct square matrices $A$ and $B$ such that $AB=0$ but $BA \neq 0$. 

I know matrix multiplication is not commutative, but I don't know how to construct such matrices. Thanks in advance.

Edit: looking for some simple way

Answer: 
A whole family:
$$ A=\begin{bmatrix}0&a\\0&a'\end{bmatrix}, \quad B=\begin{bmatrix}b&b'\\0&0\end{bmatrix}$$
with non-orthogonal vectors $(a,a')$ and $(b, b')$.
Pick $\mathrm u, \mathrm v, \mathrm w \in \mathbb R^n \setminus \{0\_n\}$ such that $\neg (\mathrm u \perp \mathrm v)$ and $\mathrm v \perp \mathrm w$. Define

$$\mathrm A := \mathrm u \mathrm v^{\top} \qquad \qquad \qquad \mathrm B := \mathrm w \mathrm v^{\top}$$

whose traces are

$$\mbox{tr} (\mathrm A) = \mathrm v^{\top} \mathrm u \neq 0 \qquad \qquad \qquad \mbox{tr} (\mathrm B) = \mathrm v^{\top} \mathrm w = 0$$

Hence

$$\mathrm A \mathrm B = \mathrm u \underbrace{\mathrm v^{\top} \mathrm w}\_{= \mbox{tr} (\mathrm B)} \mathrm v^{\top} = \mbox{tr} (\mathrm B) \cdot \mathrm u \mathrm v^{\top} = \mbox{tr} (\mathrm B) \cdot \mathrm A = \mathrm O\_n$$

$$\mathrm B \mathrm A = \mathrm w \underbrace{\mathrm v^{\top}\mathrm u}\_{= \mbox{tr} (\mathrm A)} \mathrm v^{\top} = \mbox{tr} (\mathrm A) \cdot \mathrm w \mathrm v^{\top} = \mbox{tr} (\mathrm A) \cdot \mathrm B \neq \mathrm O\_n$$