In mathematics, category theory deals in an abstract way with mathematical structures and relationships between them: it abstracts from sets and functions to objects linked in diagrams by morphisms or arrows.
One of the simplest examples of a category (which is a very important concept in topology) is that of groupoid, defined as a category whose arrows or morphisms are all invertible. Categories now appear in most branches of mathematics and also in some areas of theoretical computer science where they correspond to types and mathematical physics where they can be used to describe vector spaces. Category theory provides both with a unifying notion and terminology. Categories were first introduced by Samuel Eilenberg and Saunders Mac Lane in 1942–45, in connection with algebraic topology.
Category theory has several faces known not just to specialists, but to other mathematicians. A term dating from the 1940s, "general abstract nonsense", refers to its high level of abstraction, compared to more classical branches of mathematics. Homological algebra is category theory in its aspect of organising and suggesting manipulations in abstract algebra. Diagram chasing is a visual method of arguing with abstract "arrows" joined in diagrams. Note that arrows between categories are called functors, subject to specific defining commutativity conditions; moreover, categorical diagrams and sequences can be defined as functors (viz. Mitchell, 1965). An arrow between two functors is a natural transformation when it is subject to certain naturality or commutativity conditions. Both functors and natural transformations are key concepts in category theory, or the " real engines" of category theory. To paraphrase a famous sentence of the mathematicians who founded category theory: 'Categories were introduced to define functors, and functors were introduced to define natural transformations'. Topos theory is a form of abstract sheaf theory, with geometric origins, and leads to ideas such as pointless topology. A topos can also be considered as a specific type of category with two additional topos axioms.