# extension of field homomorphism

Let $$K\subset L\subset M$$, where $$L$$ is an algebraic field extension of $$K$$, and $$M$$ is an algebraic field extension of $$L$$. Consider a $$K$$-homomorphism $$\phi\colon L\to\overline K$$, where $$\overline K$$ is an algebraic closure of $$K$$. I want to show that I can extend $$\phi$$ to some $$K$$-homomorphism $$\tilde\phi\colon M\to\overline K$$. One way of doing this is by looking at an $$L$$-homomorphism $$\psi\colon L\to\overline K$$. I was thinking of defining $$\tilde\phi(x)=\begin{cases} \phi(x)&\text{if }x\notin L\\ \psi(x)&\text{if }x\in L. \end{cases}$$ But I'm not sure if this is a correct extension of a field homomorphism, and I'm not sure how to show that it is a homomorphism. If we have $$x,y\in L$$, then it's trivial that $$\tilde\psi(xy)=\tilde\psi(x)\tilde\psi(y)$$, but if $$x\in L$$ and $$y\notin L$$, I'm not sure what we would get.