For a field extension $L\vert K,$show that the following statements are equivalent :
$(i)$$L\vert K$ is algebraic.
$(ii)$ For every $E\in${$E:E$ is a field with $K\subset E\subset L$},every $K-$ algebra homomorphism $\sigma:E\rightarrow E$ is an automorphism.
Please provide some hint so that I can initiate this. I would be better if someone can provide a rough sketch of the above equivalence .