I'm trying to study category theory as an autodidact, using Bartosz Milewski's Category Theory for Programmers, and I've just finished chapter 1, where the last question/exercises is whether a directed graph is a category.
So looking at a simple graph example as this, where there are no arrows connecting a point directly to itself.
But is that necessary? I'd say no, as I can compose the other non-identity morphisms (one is actually not even necessary, the counter-clockwise arrow) to get all of the three identity morphisms.
So, I thought that a directed graph is a category if I can reach any point from any point, as that seems to me as a sufficient condition for being able to write an identity morphism for each of the points.
The convention I stick to firmly is that questions like "is a directed graph a category" are meaningless; it's neither true nor false, the question is just ungrammatical. You can see this blog post awhile ago for examples and discussion of other ungrammatical questions in mathematics.
Here is a simpler example to understand: the question "is a set a group" is also meaningless, because being a group is a structure, not a property. The definition of a group breaks up into two bits: a group is a collection of data subject to some axioms, and the meaningful way to ask "is $X$ a group" is for $X$ to be a collection of the appropriate data for which you are being asked to check the axioms, namely
You might call such a tuple $(X, m, e)$ a pregroup; then it's meaningful / grammatically correct to ask whether a pregroup is a group, since satisfying the group axioms is a property of a pregroup.
It is similarly meaningless to ask whether a directed graph is a category. The definition of a category again breaks up into two bits, a bunch of data subject to a bunch of axioms, and again the meaningful way to ask "is $C$ a category" is for $C$ to be a collection of the appropriate data for which you are being asked to check the axioms, namely
And again you might call such a tuple $(C_1, C_0, s, t, \circ, \text{id})$ a precategory, and then it's meaningful / grammatically correct to ask whether a precategory is a category, since satisfying the category axioms is a property of a precategory.
A directed graph does not supply the necessary data for a precategory; it consists at best of candidates for $C_1$ (the edges), $C_0$ (the vertices), and $s, t$ (the source and target maps identifying the endpoints of the edges), but contains no candidates for either composition or identity morphisms. This is true whether or not there exist such candidates (and there generally won't); every set admits at least one group structure but I still maintain that this does not imply that the answer to "is a set a group" is "yes."