Does $\operatorname{Hom}(M,T)\cong\operatorname{Hom}(N, T)$ for all $A$-modules $T$ mean $M\cong N$? The question is contained in title, I'm working with $A$-modules $M$ and $N$. I feel like Yoneda's lemma is what I'm looking for but it applies to functors into the category of sets, whereas $\operatorname{Hom}$ stays in the category of $A$-modules. Another idea is that if we switch the arguments, we can use that $\operatorname{Hom}(A, M)\cong M$ and be instantly done. I fear that something equally trivial can be done here that I'm missing. Thanks for any help you may have!
 A: Yes if we require the isomorphism to be natural in $T$.
If we don't require this, the answer depends on set theory - at least for vector spaces, which may be regarded as the simplest examples of modules.
By Easton's Theorem it is consistent with ZFC that there are different infinite cardinals numbers $\lambda,\mu$ such that $2^\lambda = 2^\mu$. Let $K$ be a finite field, let $V$ be a $\lambda$-dimensional vector space and let $W$ be a $\mu$-dimensional vector space. Then $\dim(V^*) = |K|^\lambda=2^\lambda$ by the Erdős-Kaplansky Theorem and similarly $\dim(W^*) = 2^\mu$. Hence, $V \not\cong W$, but $V^* \cong W^*$. If $U$ is any vector space over $K$, say of dimension $\kappa$, it follows $\underline{\hom}(V,U) \cong (V^*)^\kappa \cong (W^*)^\kappa \cong \underline{\hom}(V,U)$.
Conversely, if $K$ is a finite field and $\forall U(\underline{\hom}(V,U) \cong \underline{\hom}(W,U)) \Rightarrow V \cong W$ holds in the category of vector spaces over $K$, then $\lambda \mapsto 2^\lambda$ is injective. But this is independent from ZFC.
