Exercices divers

Exercice 2214. Soient $D=\mathrm{diag}(a_1,\ldots,a_n) \in \mathcal{M}_n(\mathbb{K})$ et\\ \[ \varphi : \mathcal{M}_n(\mathbb{K}) \to \mathcal{M}_n(\mathbb{K}),\quad M \mapsto DM - MD. \]
  1. Déterminer noyau et image de l'endomorphisme $\varphi$.\\
  2. Préciser ces espaces quand $D$ est à coefficients diagonaux distincts.