Minimal polynomial of an affine function of a projection (source code)

= Minimal polynomial of an affine function of a projection
{title2=$m_{\alpha I+\beta P}(x)=\prod_{\lambda\in\sigma(\alpha I+\beta P)}(x-\lambda)$}

For a <linear projection> $P$ on a nonzero finite-dimensional <vector space>, $V=\ker P\oplus\operatorname{im}P$. The <linear map> $\alpha I+\beta P$ acts by the <scalar> $\alpha$ on the first summand and $\alpha+\beta$ on the second. Its <minimal polynomial> is the product of the distinct corresponding <linear polynomials> whose summands are nonzero. If $\beta=0$ this is $x-\alpha$; if $P=0$ or $P=I$ only the associated single factor remains. Otherwise, for $\beta\ne0$, it is $(x-\alpha)(x-\alpha-\beta)$. This follows directly from an adapted <basis>, so it works in every <characteristic>.