TITLE: Domain and Co-domain of a linear transformation not defined over the same Field
QUESTION [8 upvotes]: I was thinking about linear tramsformations and i came up with this example:
$$f:\mathbb{R}^n \to \mathbb{C}^n\\ 
f(x)=ix$$
for this example, domain and co-domain are not defined over the same field and all linear transformations that i encountered by now had domain and co-domain defined over the same field. I was wondering that if this is a valid linear transformation or not? and if not, why did we put such a constraint?
also, if it is possible, keep the explanation simple because i'm pretty new in pure math. thank you in advance.

REPLY [5 votes]: Linear transformations are always defined with a single underlying field $K$, so that both the domain and the codomain are $K$-vector spaces. This is because for linearity to make sense, we need to have the same notion of scalar multiplication in both the source and the target space. In other words, in order to say that $f: V\to W$ is linear, we must be able to say that $f$ doesn't care if you scalar multiply the argument first and then apply it or apply it then scalar multiply, i.e. $f(\alpha v) = \alpha f(v)$ for all vectors $v\in V$ and scalars $\alpha$. This only makes sense if you can "do the same scalar multiplication" on $V$ and on $W$, namely we need this multiplication by $\alpha$ to make sense in both spaces.
The above is the most general case, but one class of special cases allow you to say a little more. This is when $V$ is a $K$-vector space, $W$ a $L$-vector space, and $L$ is a field extension of $K$, or equivalently, when $K$ is a subfield of $L$. In this case, any $L$ vector space can be viewed as a $K$ vector space, by simply ignoring the "extra scalars" in $L$. Thus when we say a map $f: V\to W$ is linear, we only require that $f(\alpha v) = \alpha f(v)$ for all $\alpha\in K$. Taking the subfield $K$ to be $\mathbb{R}$, and extension field $K$ to be $\mathbb{C}$, this is the situation you find yourself in in your example.
As a side note, a more complicated way to reconcile the two different fields when one is an extension of the other is through an extension of scalars. This goes out of the scope of your original question, so I will only mention it and encourage you to explore.