Why $A$ and $B$ are nilpotent if $A+\lambda_i B $ is nilpotent? Let $A$ and $B$ in $\mathcal M_n(\mathbb C)$ and assume there are $n+1$ different complex numbers $\lambda_1,\ldots,\lambda_{n+1}$ such that for all $i$, $A+\lambda_i B$ is nilpotent. How prove that both $A$ and $B$ are nilpotent? Thanks in advance.

Consider the function
$$\lambda \mapsto (A + \lambda B)^n.$$
All of its components are polynomials in $\lambda$ of degree $\leqslant n$, and have the $n+1$ zeros $\lambda_1,\,\dotsc,\,\lambda_{n+1}$ (because if an $n\times n$ matrix $N$ is nilpotent, then $N^n = 0$). Hence they are the zero polynomial.
Thus $A + \lambda B$ is nilpotent for every $\lambda \in \mathbb{C}$. $\lambda = 0$ yields the nilpotency of $A$. Considering $(\mu A + B)^n$, the previous shows $(\mu A + B)^n = 0$ for all $\mu \neq 0$. Again, that implies that it's also $0$ for $\mu = 0$, hence $B$ is also nilpotent.
