Affine maps preserve affine combinations (source code)

= Affine maps preserve affine combinations
{title2=$T(\sum_i\lambda_iP_i)=\sum_i\lambda_iT(P_i)$}

For coefficients with <sum> one, the defining identity follows from <linearity>:
$$
T\left(\sum_i\lambda_iP_i\right)=M\sum_i\lambda_iP_i+b=\sum_i\lambda_i(MP_i+b)=\sum_i\lambda_iT(P_i).
$$
The <translation> appears once on both sides precisely because $\sum_i\lambda_i=1$. In particular, <midpoints> map to <midpoints>, and a parameterized <line segment> $(1-t)P+tQ$, $0\leq t\leq1$, maps to $(1-t)T(P)+tT(Q)$. A whole <line> has the same formula with $t\in\mathbb R$; its image is a <line> if $M(Q-P)\ne0$, and a single point otherwise.