Lets call the "operation" of approximating any function $f(x)$ in a given intervall by a polynomial $p(x)$ of degree $n$ such that the least squares error is minimized $\varphi: f(x) \rightarrow p(x)$. Are the following statements valid?: $$\varphi (f(x)+g(x)) = \varphi (f(x)) + \varphi(g(x))$$ $$\varphi (a\cdot f(x)) = a\cdot \varphi (f(x))$$
If not, is it valid in some special cases?
I'm aware of my poor notation, but I hope you still understand my question
Here is one way to make your claim precise.
Let $V$ be the set of (say) continuous real functions on a closed interval $[a,b]$. Then $V$ is a real vector space and $$ \langle f,g \rangle = \int_a^b \! f(x)g(x)dx $$ defines an inner product on $V$. With respect to this inner product, your map $L:f \mapsto p$ is the orthogonal projection $V \to P_n$, where $P_n$ is the subspace of polynomials of degree at most $n$. Therefore, $L$ is a linear transformation.