Determine whether $f(x_1,x_2 )=x_1^2-x_2$ is linear or not: I understand that I need to check if  f(x+y) = f(x) + f(y) and f(rx) = rf(x)  (and check the 0 vector)
What I don't understand is because my input is taking two values, and my output is only one value, how do I apply the definition of linear transformations?
 A: As multiplication with scalars and addition of vectors is defined component-wise, the different dimensions don't make a difference. For example: \begin{align}F(\alpha v) &= F(\alpha x_1, \alpha x_2) \\ &= (\alpha x_1)^2 - (\alpha x_2).\end{align} Is this equal to $\alpha F( x_1, x_2) = \alpha(x_1^2 - x_2)$?
A: A linear transformation, $T:U→V$, is a function that carries elements of the vector space $U$ (called the domain) to the vector space $V$ (called the codomain), and which has two additional properties


*

*$T(u_1+u_2)=T(u_1)+T(u_2) \text{ for all $u_1,u_2\in U$}$

*$T(\alpha u)=\alpha T(u) \text{ for all $u\in U$ and any scalar $\alpha$}$
In your example, the domain is two dimensional while the codomain is one dimensional. Letting
$$f(x_1,x_2 )=x_1^2-x_2$$
we check the first property
$$f(x_1+y_1,x_2+y_2)=f(x_1,x_2 )+f(y_1,y_2 )$$
where
$$f(x_1+y_1,x_2+y_2)=(x_1+y_1)^2-(x_2+y_2)$$
$$f(x_1,x_2 )=x_1^2-x_2$$
$$f(y_1,y_2 )=y_1^2-y_2$$
It is clear that this property doesn't hold for every value of $x_1,y_1,x_2,y_2$. Therefore, the transformation isn't linear. Before performing this analysis, one can observe that the transform isn't linear due to the square term.
A: The definition works just fine. The codomain is the real line, considered as a one dimensional real vector space.
Your intuition should tell you that this is probably not linear because of the squared term. That will help you when you do the formal check.
