I struggle to get my head even round the beginning parts of category theory. My fundamental problem is that I don't understand why it exists.

Eg, I stumble at this introductory sentence:

https://bartoszmilewski.com/2014/11/04/category-the-essence-of-composition/

<< A category is an embarrassingly simple concept. A category consists of objects and arrows that go between them.>>

And right there I'm screaming: That's a graph. You're literally describing a graph. Why did you invent a whole bunch of new terms to describe what already exists?

Category: The Essence of Composition

I was overwhelmed by the positive response to my previous post, the Preface to Category Theory for Programmers. At the same time, it scared the heck out of me because I realized what high expectati…

  Bartosz Milewski's Programming Cafe

Also: things-with-arrows are also literally mathematical relations (and also mathematical functions if the arrows with one label from one thing are guaranteed to only go to one other thing).

So that's my big dumb first question:

We already have plenty of mathematical tools which are 'things-with-arrows'. Why did the category theorists feel that they needed their OWN set of things-with-arrows, and that they couldn't use other people's things-with-arrows?

h/t @charlag for the link

@natecull @charlag You are confusing abstraction levels. It's like looking at the axioms for a commutative group, saying "a bunch of objects with addition and an identity element? That's literally just the integers.", and wondering why the integers weren't good enough for group theorists and they needed to make up their OWN integers.
An arrow
can be a function or relation between sets, but the whole point is not to assume that.

@starbright @charlag

<< An arrow can be a function or relation between sets, but the whole point is not to assume that. >>

Can you explain to me how "something which can be represented in language, or in a computer database, as a network of discrete symbols linked to each other" could possibly NOT be a relation or a graph?

@starbright @charlag

Eg: at what point does the literal graph representing a category stop being a graph and start being that category?

Does a category only exist when a mathematician is thinking about it?

Can a category exist as a representation in a computer, or is part of the idea of categories that they can't ever be represented?

@starbright @charlag

(Eg maybe part of the conventional idea of 'graph' that I'm not quite getting is that typically they are assumed to be a finite number of nodes, while categories can have an infinite number of nodes? Is that the bit that's important and that needed another theory? So when I say 'isn't a category literally a graph because it has nodes and arrows' is it that it can't be a graph because it has infinite nodes, and the uncountability is important?)

@natecull @charlag Cardinality (whether there are infinitely many of anything) is not relevant to the distinction between categories and graphs. Both categories and graphs can be finite or infinite, although in terms of what is studied infinite categories and finite graphs are more frequent. But not overwhelmingly in either case.
@natecull @charlag
1. Never; describing a category requires giving more information than is present in a description of its underlying graph.
2. No more or less than any other mathematical object.
3. Categories can be represented. A category is no more or less than two sets and four functions between products of those sets. You can represent functions either as a lookup table or as code that computes that function.
@natecull @charlag I don't understand that question, so no. Categories do have an underlying directed graph, it's just not all of the information about them.
An example: there is a category with one object (say x) and one arrow f from x to itself. (The composition law is that f composed with f is f.) It's not necessary to interpret f as a function; it's just an arrow.

@starbright @charlag

Okay, so for background to my questions:

I am contemplating a computer-based knowledge representation database in which every piece of knowledge in it (as in Wikipedia, Wikidata, Linked Data, RDF et al) is a graph-like structure of nodes and labelled arrows between them.

If the body of human knowledge known as 'category theory' were to be expressed in this system, it would necessarily be expressed *as* graphs, because everything in the system is a graph.

@starbright @charlag

Given the existence of such a system, and the fact that one would be expressing both the graphs representing categories *and* the laws describing those categories as graph structures...

It seems to be that the most natural way of describing operations on the knowledge in such a system, would be as some kind of graph theory.

one might even use the tools of category theory to do it, but they would operate on graphs.

@starbright @charlag

So I guess I'm wondering if there's a way to reduce category theory to its simplest possible form, and if this simplest possible form would be useful as, eg, a practical database schema, query and manipulation language.

Something like, say, XSD and XSLT are/were for XML.

@natecull @charlag Yes, if these are the questions you're asking, you definitely want to read David Spivak. He's thought about stuff like this way more than I have.

@starbright @charlag

Yay! Thanks for the link - that looks like a really interesting book.

"Category theory was developed in the 1940s as a communication mechanism between different branches of mathematics" sounds like a pretty good mission statement.

@starbright @charlag

It's pretty amazing to see a big 600-page textbook with an open copyleft license, too.

@natecull @charlag Makes sense, but seemingly not very relevant to understanding category theory; since as you say everything is represented as a graph, "X is represented as a graph" is maximally uninformative.
However, this post of yours reminds me of a book I bet you'd like: https://archive.org/details/cattheory/mode/2up Category theory for [scientists | the sciences] (same book different edition, I think) by Spivak is all about treating categories as knowledge representations. It's meant to be introductory, too.
Category Theory for the Sciences : David I. Spivak : Free Download, Borrow, and Streaming : Internet Archive

Category theory was invented in the 1940s to unify and synthesize different areas in mathematics, and it has proven remarkably successful in enabling powerful...