$\operatorname{Hom}_A(K,A)\neq0$ iff $A=K$ I can prove this result in one way that is if $A=K$. Then there exists a natural morphism from $K$ to $K$. But I have no idea how to prove the converse part. I am new to this course please help by providing a good explanation.
Here A is integral domain and K is quotient field.

Suppose that we have a non-zero $A$-module morphism $\phi : K \to A$. Notice that $\phi (1) \neq 0$ (because otherwise $\phi = 0$). We have $\phi (1) \phi (\frac{1}{\phi (1)}) = \phi (\phi (1) \cdot \frac{1}{\phi (1)}) = \phi (1)$ and therefore $\phi (\frac{1}{\phi (1)}) = 1$.
Let $0 \neq a \in A$. We want to show that $a$ has an inverse in $A$. We have $ a \phi (\frac{1}{\phi (1)a}) = \phi (a \cdot \frac{1}{\phi (1) a}) = \phi (\frac{1}{\phi (1)}) = 1$ and therefore $a$ has an inverse in $A$.
