# Some questions in the Category theory.

I have two simple questions about the category theory.

1. In any category, is $Hom(A, B)$ always nonempty? In some typical categories, it seems right but the definition of morphism does not give any information.

2. In the category $\textbf{Set}$ of all sets, what is in $Hom(\varnothing, A)$ and $Hom(A, \varnothing)$?

-
It can be empty, and the a relation on some empty set is empty, so there is an empty function. – user40276 Feb 2 '14 at 16:29
$\hom_{\mathsf{Ring}}(\mathbb{Q},\mathbb{Z})=\emptyset$. – Martin Brandenburg Feb 2 '14 at 21:19

In Set, Hom($\emptyset,A$) consist of a single morphism for each $A$, the empty function. $\emptyset$ is the initial object in the category of sets.
Hom($A,\emptyset$) is always empty unless $A = \emptyset$, in which case it has only the identity morphism.
A function $f:A \to B$ is by definition a subset of $f \subset A\times B$ such that for all $a \in A$ there is a unique $b \in B$ so that $(a,b) \in f$. There can be no function from $A \to \emptyset$ if $A$ is non empty, because there are no $b \in \emptyset$ to pair with a given $a \in A$. However, there is a function from $\emptyset \to A$ because the universal quantifier is vacuously satisfied: there are no $a \in \emptyset$ to place any conditions on the relation. – Steven Gubkin Feb 2 '14 at 17:56
$A\times\emptyset =\emptyset$. – Malice Vidrine Feb 2 '14 at 18:11
Also, in any Cartesian closed category $A\times 0\cong 0$, so it's not just a quirk of $\mathbf{Set}$ either. – Malice Vidrine Feb 2 '14 at 18:19
@user40276 Perhaps this will help convince you. It is true for all finite sets that if $|A|=n$ and $|B|=m$ then $|A\times B|=nm$ where $n,m\in\mathbb{N}$. It follows that $|A\times\emptyset|=0$ for all finite sets $A$ and we know that the only set with zero elements is the empty set. Hence $A\times\emptyset=\emptyset$. – Dan Rust Feb 2 '14 at 18:48