# Demonstrating if a transformation is linear by using linear independence/dependence

Can examining the linear dependence/independence of the vectors in the domain and codomain demonstrate that a transformation is linear?

I think that if there are linearly independent vectors in the domain that have images in the codomain which are also linearly independent, then the transformation is linear. Is this correct?

What about if there are vectors that are found to be linearly dependent in the domain and codomain?

Not true. For example, let $e_1,\ldots,e_n$ be a basis for $\mathbb{R}^n$ and define $T:\mathbb{R}^n\to\mathbb{R}^n$ by $$T(e_1)=e_1,\quad\ldots,\quad T(e_n)=e_n,\quad\text{and}\quad T(v)=0 \text{ for all }v\notin\{e_1,\ldots,e_n\}.$$ This satisfies your description, although it is clearly not linear.