# Question on proof regarding unique homomorphism in finitely generated vector spaces

So as homework I currently have to show the opposite implication of a theorem we had which is:

Let $V$ be a finitely generated $K$-Vector space and let $v_1,...v_n$ $n \in \mathbb{N}$ a family of vectors in $V$

Show the following: If there is for every $K$-Vector space $W$ and every family of vectors $w_1,...w_n$ in $W$ exactly one homomorphism $f:V \to W$ with $f(v_i)=w_i$ for $i=1,...,n$ then $v_1,...v_n$ is a basis of V.

So I tried to proof that by contradiction: Consider $W=V$. Since V is finitely generated there exists a basis of length $dim(V):=m$ we set that basis $e_1,...e_m$. Let $v_1,...v_m$ be a family of vectors in $V$ which are not a basis. By our assumption there exists a unique homomorphism $f$ with $f(v_i)=e_i$ with $i=1,...,m$. Since $e_1,...,e_m$ is a basis of $W$ it follows that $f$ is surjective and since $\dim(V)=\dim(W)$ it is also an isomorphism. But since $f$ is an isomorphism and $e_1,...e_m$ a basis it follows that $v_1,...v_m$ has to be a basis too which is a contradiction to our assumption.

I don't feel like this is the right way to prove it since it only views one special case where the opposite argument would fail. Can anyone tell me at which part I've gone a wrong way? What do I actually have to find a contradiction for? - Every family of vectors in ever vector space, every vectorspace or just a example as I've shown. Or maybe something complete different? (The main question here is probably how to work out a right way on proofs by contradiction - if there are any hints for a real solution I would be happy too) Thanks ahead as always

This is not correct, because you assume that the set $\{v_1,\ldots,v_n\}$ has as many elements as $\dim V$. That's an extra assumption. However, there's nothing wrong in applying your hypothesis in a single case.
So, suppose that $\{v_1,\ldots,v_n\}$ generates $V$ and that for every $K$-vector space $W$ and every family of vectors $w_1,\ldots,w_n\in W$ exactly one homomorphism $f:V \longrightarrow W$ with $f(v_i)=w_i$ (for each $i\in\{1,2,\ldots,n\}$) exists. Suppose that $\{v_1,\ldots,v_n\}$ is not a basis of $V$. Then some $v_j$ is a linear combination of all the others. We can assume without loss of generality that $j=n$. So, if $f$ is a linear map from $V$ into $K$ such that $f(v_1)=f(v_2)=\cdots=f(v_{n-1})=0$, then $f(v_n)=0$ too, since $f$ is linear and $v_n$ is a linear combination of $v_1,v_2,\ldots,v_{n-1}$. So, if you take $w_1,\ldots,w_n\in K$ with$$w_j=\begin{cases}0&\text{ if }k<n\\1&\text{ otherwise,}\end{cases}$$then there is no linear map $f\colon V\longrightarrow K$ such that $(\forall j\in\{1,2,\ldots,n\}):f(v_j)=w_j$, which goes against our assumption.
Now, I will prove that $\{v_1,\ldots,v_n\}$ generates $V$. Let $W$ be the subspace of $V$ generated by them and let $W^\star$ be a subspace of $V$ such that $V=W\oplus W^\star$. Then, for each linear map $F\colon W^\star\longrightarrow W$, there is one and only linear map $f\colon V\longrightarrow W$ such that $f|_W=\operatorname{Id}$ and that $f|_{W^\star}=F$. Note that then $f$ has the property$$(\forall k\in\{1,2,\ldots,n\}):f(v_k)=v_k.$$But we are assuming that there's only one such map. That can only happen when $W^\star=\{0\}$, but\begin{align}W^\star=\{0\}&\iff W=V\\&\iff\langle v_1,\ldots,v_n\rangle=V.\end{align}
• That is indeed very neat. The only thing which I do not understand is why we can assume that $\{v_1,\ldots,v_n\}$ generates $V$. Especially because we can choose $n$ to be less them $dim(V)$ right? – K. Hoffmann Dec 4 '17 at 15:04
• @K.Hoffmann I misread your second sentence and it seemed to me that you were assuming that $V$ is generated by the $v_k$'s. I've added another paragraph to my answer. – José Carlos Santos Dec 4 '17 at 15:20