Let $f:\mathbb R^n\to\mathbb R$ and $f(x_1,x_2,...,x_n) = x_k$ such that $1 \leq k \leq n$. $f$ then is a projection and is a linear map.
However, if I compute $f(x+y)$, I should get $x_k$ as defined. Since $f$ is a linear map, I can expand by doing $f(x+y) = f(x) + f(y) = 2 x_k$. That doesn't look right to me, because it implies $x_k = 2 x_k$ and $x_k = 0$.
Does that mean $f$ is not linear? However, $f$ is a project and has to be linear based on my understanding.
What did I do wrong?
In words, your function $f$ just means "the $k$th component of". So $$\displaylines{ f({\bf x})=f(x_1,\ldots,x_n)=x_k\cr f({\bf y})=f(y_1,\ldots,y_n)=y_k\cr f({\bf x}+{\bf y})=f(x_1+y_1,\ldots,x_n+y_n)=x_k+y_k\ ,\cr}$$ no problem.