Is there an elegant way to prove a function is linear? I'm reading Hoffman and Kunze's linear algebra book and on page 73 in the exercise 7, they ask to verify this function


  $$T(x_1,x_2,x_3)=(x_1-x_2+2x_3,2x_1+x_2,-x_1-2x_2+2x_3)$$
  is a linear transformation.


This exercise is really simple, but a little bit tedious. We have to define arbitrary $u=(x_u,y_u,z_u)$ and $v=(x_v,y_v,z_v)$ elements of $F^3$ and show $T(u+v)=T(u)+T(v)$ and $T(ku)=kT(u)$ for $k\in F$. (we can see $F$ as $\mathbb R$ or $\mathbb C$)

Is there a way more elegant to prove this function is linear?
You can observe that the function is composed out of smaller linear functions. You know that $f(x) = x$ is linear and so is $f(x,y,z)=x$. Also that the sum of linear functions $f+g$ is linear, as well as a scalar multiplier $2f$. Finally, for linear $f,g,h$, the function $x \mapsto (f(x), g(x), h(x))$ is also linear.

When you know all of the above, you can just say that $F$ is made out of these linearity preserving compositions and a few obviously linear functions. That should be a good enough proof.
For any function, if $f(ax + by) = af(x) + bf(y)$, then the function is linear.

It's easy to show (just write it out) that your T satisfies this.