I'm learning linear algebra, specifically linear transformations, and need help with the following exercise:
Consider the endomorphism $f: \mathbb{R^{3}} \to \mathbb{R^{3}}$ defined by $f(x,y,z) = (x+z,2x+y,3x+y+z)$ for all $x, y, z \in \mathbb{R}$. $(1)$ Find the matrix representation of $f$ and $f \circ f$ with respect to the standard basis of $\mathbb{R}^{3}$. $(2)$ Find a base and the dimension of the vector space $\operatorname{Im} f$. $(3)$ Explain why $\operatorname{Im} f \neq \operatorname{Im} (f \circ f)$.
Since I'm having difficulties for $(3)$ I'm going to share my work for $(1)$ and $(2)$.
$(1)$ We consider the standard basis $\mathcal{B}=\{(1,0,0), (0,1,0), (0,0,1)\}$ of $\mathbb{R^{3}}$. Given that $f$ is a linear transformation, it can be represented by a matrix $A$ whose columns are the images of the standard basis vectors. We have
$$f(1, 0, 0) = (1, 2, 3), \quad f(0, 1, 0) = (0, 1, 1), \quad f(0, 0, 1) = (1, 0, 0).$$
Hence, the matrix representation of $f$ with respect to the basis $\mathcal{B}$ is given by
$$A = \begin{pmatrix}1 & 0 & 1\\2 & 1 & 0\\3 & 1 & 1\end{pmatrix}.$$
Now, since $f$ is represented by A, then $f \circ f$ is represented in $\mathcal{B}$ by the matrix $A⋅A$. One has
$$A^{2} = \begin{pmatrix}4 & 1 & 2\\4 & 1 & 2\\8 & 2 & 4\end{pmatrix}.$$
$(2)$ Since the set $\mathcal{B}=\{(1, 0, 0), (0, 1, 0), (0, 0, 1)\}$, as a base of $\mathbb{R^{3}}$, spans $\mathbb{R^{3}}$, it follows that the set $f(\mathcal{B})=\{f(1, 0, 0), f(0, 1, 0), f(0, 0, 1)\}$ spans $\operatorname{Im} f$. We have
$$\operatorname{Im} f = \operatorname{Span}\{f(1, 0, 0), f(0, 1, 0), f(0, 0, 1)\} = \operatorname{Span}\{(1, 2, 3), (0, 1, 1), (1, 0, 1)\}$$ and
$$\begin{pmatrix}1 & 2 & 3\\0 & 1 & 1\\1 & 0 & 1\end{pmatrix} \rightarrow \ldots \rightarrow \begin{pmatrix}1 & 0 & 1\\0 & 1 & 1\\0 & 0 & 0\end{pmatrix}.$$
Therefore $\operatorname{Im} f = \operatorname{Span}\{(1,0, 1), (0, 1, 1)\}$ and $\dim (\operatorname{Im} f) = 2$.
Is my work correct for $(1)$, $(2)$? Any help for $(3)$ would be appreciated. At first, I wanted to say that since the matrix representation of $f$ and $f \circ f$ are different, then $\operatorname{Im} f \neq \operatorname{Im} (f \circ f)$ but I don't think this is a good explanation (I don't even know if this is true in general).