Let $n,\alpha\geq 2$. Let $K$ be an algebraically closed field with characteristic $0$ or greater than $n$. We show that the dimension of the variety of pairs $(A,B)\in {M_n(K)}^2$, with $B$ nilpotent, that satisfy $AB-BA=A^{\alpha}$ or $A^2-2AB+B^2=0$ is $n^2-1$ ; moreover such matrices $(A,B)$ are simultaneously triangularizable. Let $R$ be a reduced ring such that $n!$ is not a zero-divisor and $A$ be a generic matrix over $R$ ; we show that $X=0$ is the sole solution of $AX-XA=X^{\alpha… Expand