Universal property of basis (converse part in functional analysis) Here is the statement of Universal property of basis:

Let $X$ be a $\mathbb K-$ linear space and let $E\subseteq X$.Then E is a basis of X if and only if for every $\mathbb K-$ linear space $Y$ and for every $f:E\to Y$ , there exists a unique $\mathbb K-$ linear extension $T:X \to Y$ of $f$.

Now the ($\implies$) part is clear and I have solved it by taking $\displaystyle T\left(\sum_{i\in I}c_ie_i\right)=\sum_{i\in I}c_if(e_i)$, where $\{ e_i\}_{i\in I}=E, c_i\in \mathbb K.$
I have stuck to solve the converse$(\impliedby )$ part.
Please someone help..
Thank you..
 A: Suppose $E$ is not a basis of $X$.
Then either $E$ is not linearly independent or $E$ is linearly independent but not spanning.
If $E$ is not linearly independent, then there exists $e_1,\ldots,e_n$ in $E$ and
scalars $\lambda_1,\ldots,\lambda_n$ and an index $i\in\{1,\ldots,n\}$ such that
$$
\lambda_1e_1+\cdots+\lambda_ne_n = 0
\quad\text{and}\quad \lambda_i\ne0.
$$
Then the function $f:E\to\mathbb{K}$ given by
$$
f(e) = \begin{cases}
0 & \text{if}\ e\ne e_i \\
1 & \text{if}\ e=e_i
\end{cases}
$$
does not have a linear extension.
To see this, suppose $T:X\to\mathbb{K}$ is a linear extension of $f$. Then we have $0=T(0)=T(\lambda_1e_1+\cdots+\lambda_ne_n)=\lambda_i$, which is a contradiction.
On the other hand, suppose $E$ is linearly independent but not spanning. Extend $E$ to a basis $E'$, with $x\in E'\setminus E$.
Any $f:E\to Y$ extends to distinct functions $f_0,f_1:E'\to Y$ defined by $f_0(e)=f_1(e)=f(e)$ for $e\in E$, $f_0(e)=f_1(e)=0$ for $e\in E'\setminus (E\cup\{x\})$, and $f_0(x)=0$, $f_1(x)=1$. Any linear extension of either $f_1$ or of $f_2$ will be a linear extension of $f$. By the forward direction you know that each $f_1$ and $f_2$ have linear extensions. Since $f_1\ne f_2$, these will be distinct linear extensions of $f$.
