Let $f:\mathbb{R}^3 \to \mathbb{R}^3, f(x,y,z) = (x+y+z,2x-y+3,3x+z+1)$, $$\pi : x+y-z = 1$$and $$d:\frac{x-1}{2} = \frac{y-1}{0} = \frac{z}{3}.$$I want to find $f(d)$ and $f(\pi)$.
I found that $f(x,y,z)=\begin{pmatrix}1 & 1 & 1\\2 & -1 & 0 \\ 3 & 0 & 1\end{pmatrix}\begin{pmatrix}x \\ y \\ z\end{pmatrix} + \begin{pmatrix}0 \\ 3 \\ 1\end{pmatrix}$ so it is an affine map. I found somewhere that if $A,B \in \mathbb{R}^3$ with $A \ne B$ then $f(d) = Af(f(A),f(B))$ (where $Af$ is affine hull) and if $A \ne B \ne C \ne A$ are 4 affine independent points from $\mathbb{R}^3$ then $f(\pi) = Af(f(A),f(B),f(C))$. But I don't know why this works. It is general for any k-dimensional affine subspaces from $\mathbb{R}^n$? Thanks!