$$\text{Let }\quad f:\mathbb Z \to \mathbb Z \quad \text{ and }\quad M_f:\mathbb Z \to \mathbb R^{3,3}, \quad k\mapsto \begin{bmatrix} 1 & k & f(k) \\ 0 & 1 & k \\ 0 & 0 & 1 \end{bmatrix} .$$ Further let $U:=\operatorname{image}(M_f)$. The function $f$ is chosen such that for all $A,B \in U$ $AB\in U$.
Show that for all $k,l\in \mathbb Z, f(k+l)=f(k)+f(l)+kl$, that $f(0)=0$ and that for all $k\in \mathbb Z\,, f(-k)=k^2-f(k)$.
I do not see how to start here? I am clueless and do not understand what I have to do here. Some approaches are welcome!