# When does $|\mathrm{Hom}(A,B)| = |\mathrm{Hom}(B,A)|$ imply $A \simeq B$?

In which categories does $|\text{Hom}(A,B)| = |\text{Hom}(B,A)| \neq 0$ and $|\text{Hom}(A,A)| = |\text{Hom}(B,B)|$ imply that $A$ and $B$ are isomorphic?

• Is there some intuition which leads you to ask this question? It's not true in some of the easy categories one normally thinks of: in the category of sets, take $A = 4$ and $B = 2$, and in the category of groups, take $A = \mathbb{Z}/2\mathbb{Z}$ and $B = \mathbb{Z}/3\mathbb{Z}$. It is true in preorder categories though. Oct 30, 2011 at 17:18
• @Zhen Lin: Indeed, I had in mind as an intuition the category of sets, but your example shows that the preconditions are too weak. For my intuitions's sake it's OK to strengthen it by $|\text{Hom}(A,A)| = |\text{Hom}(B,B)|$ (as I did above). Oct 31, 2011 at 7:34
• Category theory is not enriched set theory. Consider the category which has two objects $A$ and $B$, each with a single absorbing non-identity morphism $0$ and morphisms $A \to B$ and $B \to A$ whose composition either way is $0$. By construction there are no non-trivial isomorphisms, but all your conditions are satisfied. Oct 31, 2011 at 9:01
• OK, this is a counter-example, but I asked for categories where the implication does hold. Oct 31, 2011 at 10:33
• I'm not even convinced it holds for infinite sets. Asaf probably knows. If you have natural isomorphisms $\textrm{Hom}(A, -) \cong \textrm{Hom}(B, -)$ then $A \cong B$ by Yoneda's lemma. I think that's the best one could hope for. Oct 31, 2011 at 14:11

I am not expert in category theory, so I don't know if your question as a good answer or it is too general. Also I have some doubt that the notation $|\cdot|$ makes sense in general, because the class of morphismsmight not be a set. But maybe the following observation can help. In some cases you need an abstract version of Cantor-Bernstein theorem. For instance, take the category of sets with injections. In this case it suffices that the two sets $Hom(A,B)$ and $Hom(B,A)$ are both not empty to conclude, thanks to Cantor-Bernstein theorem, that $A$ and $B$ are isomorphic.
Here, instead, a counterexample: take the category of groups with monomorphisms: then the free group on two generators $\mathbb F_2$ embeds into the one on three generators $\mathbb F_3$ and then $Hom(\mathbb F_2,\mathbb F_3)\neq\emptyset$. Now, it's a classical result that also $Hom(\mathbb F_3,\mathbb F_2)\neq\emptyset$ but $\mathbb F_2$ is not isomorphic to $\mathbb F_3$.
• [at]Valerio Capraro: the "union" $\amalg_{a,b}\hom(a,b)$ of all the morphisms in the category might not be (and usually isn't) a set; but in any sensible (i.e. useful) definition of a category, for any couple of objects $a,b$ the collection of morphisms $\hom(a,b)$ is a set (I'm not an expert in these subtleties too, but I would say that this is true at least in any 1-category). Oct 31, 2011 at 10:25
This condition holds for preorder seen as categories: that's because if there's a morphism $A \stackrel{f}{\to} B$ and a morphisms $B \stackrel{g}{\to} A$ then $g\circ f = 1_A$ and $f \circ g = 1_B$. I'm not aware if this condition holds for more general categories, but it seems a too weak condition so I don't think it's worth to considered so general categories (but maybe I'm just ignorant) .
{"ft_lang_label":"__label__en","ft_lang_prob":0.89705837,"math_prob":0.99678296,"size":3486,"snap":"2022-27-2022-33","text_gpt3_token_len":1051,"char_repetition_ratio":0.13210799,"word_repetition_ratio":0.017761989,"special_character_ratio":0.2940333,"punctuation_ratio":0.11614731,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9994962,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-30T01:53:26Z\",\"WARC-Record-ID\":\"<urn:uuid:a9e599a4-9bfb-4812-be19-f4cef577ae71>\",\"Content-Length\":\"238499\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:014d243c-00f8-47e2-92fa-f1370912c5cf>\",\"WARC-Concurrent-To\":\"<urn:uuid:d02e2db7-f688-4ff8-924f-69abd8bdb9db>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/77216/when-does-mathrmhoma-b-mathrmhomb-a-imply-a-simeq-b/77223\",\"WARC-Payload-Digest\":\"sha1:A2VFMTEK4CYACZAYBJAR2DEKQRPD7SNG\",\"WARC-Block-Digest\":\"sha1:SJU7FUSRDJNKOCN2MJK34TAQMRFLSVLY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103646990.40_warc_CC-MAIN-20220630001553-20220630031553-00474.warc.gz\"}"}