# category là gì

From Wikipedia, the không tính phí encyclopedia This is a category with a collection of objects A, B, C and collection of morphisms denoted f, g, g ∘ f, and the loops are the identity arrows. This category is typically denoted by a boldface 3.

In mathematics, a category (sometimes called an abstract category to tát distinguish it from a concrete category) is a collection of "objects" that are linked by "arrows". A category has two basic properties: the ability to tát compose the arrows associatively and the existence of an identity arrow for each object. A simple example is the category of sets, whose objects are sets and whose arrows are functions.

Bạn đang xem: category là gì

Category theory is a branch of mathematics that seeks to tát generalize all of mathematics in terms of categories, independent of what their objects and arrows represent. Virtually every branch of modern mathematics can be described in terms of categories, and doing sánh often reveals deep insights and similarities between seemingly different areas of mathematics. As such, category theory provides an alternative foundation for mathematics to tát mix theory and other proposed axiomatic foundations. In general, the objects and arrows may be abstract entities of any kind, and the notion of category provides a fundamental and abstract way to tát describe mathematical entities and their relationships.

In addition to tát formalizing mathematics, category theory is also used to tát formalize many other systems in computer science, such as the semantics of programming languages.

Two categories are the same if they have the same collection of objects, the same collection of arrows, and the same associative method of composing any pair of arrows. Two different categories may also be considered "equivalent" for purposes of category theory, even if they bởi not have precisely the same structure.

Well-known categories are denoted by a short capitalized word or abbreviation in bold or italics: examples include Set, the category of sets and mix functions; Ring, the category of rings and ring homomorphisms; and Top, the category of topological spaces and continuous maps. All of the preceding categories have the identity map as identity arrows and composition as the associative operation on arrows.

The classic and still much used text on category theory is Categories for the Working Mathematician by Saunders Mac Lane. Other references are given in the References below. The basic definitions in this article are contained within the first few chapters of any of these books.

Group-like structures
Totalityα Associativity Identity Divisibilityβ Commutativity
Partial magma Unneeded Unneeded Unneeded Unneeded Unneeded
Semigroupoid Unneeded Required Unneeded Unneeded Unneeded
Small category Unneeded Required Required Unneeded Unneeded
Groupoid Unneeded Required Required Required Unneeded
Magma Required Unneeded Unneeded Unneeded Unneeded
Quasigroup Required Unneeded Unneeded Required Unneeded
Unital magma Required Unneeded Required Unneeded Unneeded
Loop Required Unneeded Required Required Unneeded
Semigroup Required Required Unneeded Unneeded Unneeded
Associative quasigroup Required Required Unneeded Required Unneeded
Monoid Required Required Required Unneeded Unneeded
Commutative monoid Required Required Required Unneeded Required
Group Required Required Required Required Unneeded
Abelian group Required Required Required Required Required
The closure axiom, used by many sources and defined differently, is equivalent.
Here, divisibility refers specifically to tát the quasigroup axioms.

Any monoid can be understood as a special sort of category (with a single object whose self-morphisms are represented by the elements of the monoid), and sánh can any preorder.

## Definition

There are many equivalent definitions of a category. One commonly used definition is as follows. A category C consists of

• a class ob(C) of objects,
• a class mor(C) of morphisms or arrows,
• a domain or source class function dom: mor(C) → ob(C),
• a codomain or target class function cod: mor(C) → ob(C),
• for every three objects a, b and c, a binary operation hom(a, b) × hom(b, c) → hom(a, c) called composition of morphisms. Here hom(a, b) denotes the subclass of morphisms f in hom(C) such that dom(f) = a and cod(f) = b. Morphisms in this subclass are written f : ab, and the composite of f : ab and g : bc is often written as gf or gf.

such that the following axioms hold:

• the associative law': if f : ab, g : bc and h : cd then h ∘ (gf) = (hg) ∘ f, and
• the (left and right unit laws): for every object x, there exists a morphism 1x : xx (some authors write idx) called the identity morphism for x, such that every morphism f : ax satisfies 1xf = f, and every morphism g : xb satisfies g ∘ 1x = g.

We write f: ab, and we say "f is a morphism from a to tát b". We write hom(a, b) (or homC(a, b) when there may be confusion about to tát which category hom(a, b) refers) to tát denote the hom-class of all morphisms from a to tát b.

Some authors write the composite of morphisms in "diagrammatic order", writing f;g or fg instead of gf.

From these axioms, one can prove that there is exactly one identity morphism for every object. Often the map assigning each object its identity morphism is treated as an extra part of the structure of a category, namely a class function i: ob(C) → mor(C). Some authors use a slight variant of the definition in which each object is identified with the corresponding identity morphism. This stems from the idea that the fundamental data of categories are morphisms and not objects. In fact, categories can be defined without reference to tát objects at all using a partial binary operation with additional properties.

## Small and large categories

A category C is called small if both ob(C) and hom(C) are actually sets and not proper classes, and large otherwise. A locally small category is a category such that for all objects a and b, the hom-class hom(a, b) is a mix, called a homset. Many important categories in mathematics (such as the category of sets), although not small, are at least locally small. Since, in small categories, the objects size a mix, a small category can be viewed as an algebraic structure similar to tát a monoid but without requiring closure properties. Large categories on the other hand can be used to tát create "structures" of algebraic structures.

## Examples

The class of all sets (as objects) together with all functions between them (as morphisms), where the composition of morphisms is the usual function composition, forms a large category, Set. It is the most basic and the most commonly used category in mathematics. The category Rel consists of all sets (as objects) with binary relations between them (as morphisms). Abstracting from relations instead of functions yields allegories, a special class of categories.

Xem thêm: get out là gì

Any class can be viewed as a category whose only morphisms are the identity morphisms. Such categories are called discrete. For any given mix I, the discrete category on I is the small category that has the elements of I as objects and only the identity morphisms as morphisms. Discrete categories are the simplest kind of category.

Any preordered mix (P, ≤) forms a small category, where the objects are the members of P, the morphisms are arrows pointing from x to tát y when xy. Furthermore, if is antisymmetric, there can be at most one morphism between any two objects. The existence of identity morphisms and the composability of the morphisms are guaranteed by the reflexivity and the transitivity of the preorder. By the same argument, any partially ordered mix and any equivalence relation can be seen as a small category. Any ordinal number can be seen as a category when viewed as an ordered mix.

Any monoid (any algebraic structure with a single associative binary operation and an identity element) forms a small category with a single object x. (Here, x is any fixed mix.) The morphisms from x to tát x are precisely the elements of the monoid, the identity morphism of x is the identity of the monoid, and the categorical composition of morphisms is given by the monoid operation. Several definitions and theorems about monoids may be generalized for categories.

Similarly any group can be seen as a category with a single object in which every morphism is invertible, that is, for every morphism f there is a morphism g that is both left and right inverse to tát f under composition. A morphism that is invertible in this sense is called an isomorphism.

A groupoid is a category in which every morphism is an isomorphism. Groupoids are generalizations of groups, group actions and equivalence relations. Actually, in the view of category the only difference between groupoid and group is that a groupoid may have more phàn nàn one object but the group must have only one. Consider a topological space X and fix a base point of X, then is the fundamental group of the topological space X and the base point , and as a mix it has the structure of group; if then let the base point runs over all points of X, and take the union of all , then the mix we get has only the structure of groupoid (which is called as the fundamental groupoid of X): two loops (under equivalence relation of homotopy) may not have the same base point sánh they cannot multiply with each other. In the language of category, this means here two morphisms may not have the same source object (or target object, because in this case for any morphism the source object and the target object are same: the base point) sánh they can not compose with each other.

Any directed graph generates a small category: the objects are the vertices of the graph, and the morphisms are the paths in the graph (augmented with loops as needed) where composition of morphisms is concatenation of paths. Such a category is called the free category generated by the graph.

The class of all preordered sets with monotonic functions as morphisms forms a category, Ord. It is a concrete category, i.e. a category obtained by adding some type of structure onto Set, and requiring that morphisms are functions that respect this added structure.

The class of all groups with group homomorphisms as morphisms and function composition as the composition operation forms a large category, Grp. Like Ord, Grp is a concrete category. The category Ab, consisting of all abelian groups and their group homomorphisms, is a full subcategory of Grp, and the prototype of an abelian category. Other examples of concrete categories are given by the following table.

Category Objects Morphisms
Grp groups group homomorphisms
Mag magmas magma homomorphisms
Manp smooth manifolds p-times continuously differentiable maps
Met metric spaces short maps
R-Mod R-modules, where R is a ring R-module homomorphisms
Mon monoids monoid homomorphisms
Ring rings ring homomorphisms
Set sets functions
Top topological spaces continuous functions
Uni uniform spaces uniformly continuous functions
VectK vector spaces over the field K K-linear maps

Fiber bundles with bundle maps between them size a concrete category.

The category Cat consists of all small categories, with functors between them as morphisms.

## Construction of new categories

### Dual category

Any category C can itself be considered as a new category in a different way: the objects are the same as those in the original category but the arrows are those of the original category reversed. This is called the dual or opposite category and is denoted Cop.

### Product categories

If C and D are categories, one can size the product category C × D: the objects are pairs consisting of one object from C and one from D, and the morphisms are also pairs, consisting of one morphism in C and one in D. Such pairs can be composed componentwise.

Xem thêm: shampoo là gì

## Types of morphisms

A morphism f : ab is called

• a monomorphism (or monic) if it is left-cancellable, i.e. fg1 = fg2 implies g1 = g2 for all morphisms g1, g2 : xa.
• an epimorphism (or epic) if it is right-cancellable, i.e. g1f = g2f implies g1 = g2 for all morphisms g1, g2 : bx.
• a bimorphism if it is both a monomorphism and an epimorphism.
• a retraction if it has a right inverse, i.e. if there exists a morphism g : ba with fg = 1b.
• a section if it has a left inverse, i.e. if there exists a morphism g : ba with gf = 1a.
• an isomorphism if it has an inverse, i.e. if there exists a morphism g : ba with fg = 1b and gf = 1a.
• an endomorphism if a = b. The class of endomorphisms of a is denoted end(a).
• an automorphism if f is both an endomorphism and an isomorphism. The class of automorphisms of a is denoted aut(a).

Every retraction is an epimorphism. Every section is a monomorphism. The following three statements are equivalent:

• f is a monomorphism and a retraction;
• f is an epimorphism and a section;
• f is an isomorphism.

Relations among morphisms (such as fg = h) can most conveniently be represented with commutative diagrams, where the objects are represented as points and the morphisms as arrows.

## Types of categories

• In many categories, e.g. Ab or VectK, the hom-sets hom(a, b) are not just sets but actually abelian groups, and the composition of morphisms is compatible with these group structures; i.e. is bilinear. Such a category is called preadditive. If, furthermore, the category has all finite products and coproducts, it is called an additive category. If all morphisms have a kernel and a cokernel, and all epimorphisms are cokernels and all monomorphisms are kernels, then we speak of an abelian category. A typical example of an abelian category is the category of abelian groups.
• A category is called complete if all small limits exist in it. The categories of sets, abelian groups and topological spaces are complete.
• A category is called cartesian closed if it has finite direct products and a morphism defined on a finite product can always be represented by a morphism defined on just one of the factors. Examples include Set and CPO, the category of complete partial orders with Scott-continuous functions.
• A topos is a certain type of cartesian closed category in which all of mathematics can be formulated (just lượt thích classically all of mathematics is formulated in the category of sets). A topos can also be used to tát represent a logical theory.