TITLE: $\varnothing$ in the category of sets
QUESTION [6 upvotes]: Wikipedia says that $\varnothing$ is the initial object in the category of sets. However, this seems to be false.
Any function $F$ with domain $\varnothing$ is necessarily empty, i.e. $F=\varnothing$. So in the category of sets, there is only one morphism whose source is $\varnothing$, namely, the empty function. Since the axiom of category requires that $\varnothing$ has an identity morphism, the empty function is its identity morphism. Suppose for the sake of contradiction that there is morphism $g: \varnothing \longrightarrow A$, where $A\not= \varnothing$. Then $g$ is the empty function. Then $g$ is a morphism with two targets, namely, $\varnothing$ and $A$, contradicting category axioms.  
Did I make a mistake somewhere?

REPLY [4 votes]: The situation is very simple really and you already half-guessed it yourself.
A morphism $A \to B$ of the category $\mathrm{Set}$ is simply defined as the triple $\langle A,f,B \rangle$ where $f$ is a subset of $A \times B$ with total-functional properties (to each element of $A$ corresponds exactly one of $B$). If you omit the total-functional properties, then you define the category $\mathrm{Rel}$ of sets and relations.
These are just definitions. You can easily check that these structures are indeed categories according to the definition of category.
You may call the morphisms of $\mathrm{Set}$ functions if you like and probably nobody will shoot you, but bear in mind that they are different – yet related – things than the functions you learned before
So $\varnothing \to A$ is really $\langle \varnothing,\varnothing,A \rangle$ and $\varnothing \to B$ is really $\langle \varnothing,\varnothing,B \rangle$ and thus can be different.
Category theory can and usually is based on some set theory. Categories are just another type of mathematical structures like groups, rings, ect. They just happen to be more general. 
You can find slightly different set theories on the market. Tarski-Grothendieck (TG) set theory is the one which gives you the most bang for your dollar, in my opinion. It is successfully used in the Mizar project to build (ie. express and prove) the whole edifice of mathematics in a formal and computer-checked way. Who can ask for more? 
TG set theory has basically the usual axioms of other set theories (ZFC, NBG) with the addition of the TG axiom claiming (roughly) that any collection you can come up with, is contained in a larger collection called a universe. 
Other foundations of mathematics are alternative, still experimental and certainly not mainstream. I would not bother with them as a beginner in category theory.