Coalgebra

In mathematics, coalgebras or cogebras are structures that are dual (in the category-theoretic sense of reversing arrows) to unital associative algebras. The axioms of unital associative algebras can be formulated in terms of commutative diagrams. Turning all arrows around, one obtains the axioms of coalgebras.
Every coalgebra, by (vector space) duality, gives rise to an algebra, but not in general the other way. In finite dimensions, this duality goes in both directions (see below).
Coalgebras occur naturally in a number of contexts (for example, representation theory, universal enveloping algebras and group schemes).
There are also F-coalgebras, with important applications in computer science.
Informal discussion.
One frequently recurring example of coalgebras occurs in representation theory, and in particular, in the representation theory of the rotation group. A primary task, of practical use in physics, is to obtain combinations of systems with different states of angular momentum and spin. For this purpose, one uses the Clebsch–Gordan coefficients. Given two systems formula_1 with angular momenta formula_2 and formula_3, a particularly important task is to find the total angular momentum formula_4 given the combined state formula_5. This is provided by the total angular momentum operator, which extracts the needed quantity from each side of the tensor product. It can be written as an "external" tensor product
The word "external" appears here, in contrast to the "internal" tensor product of a tensor algebra. A tensor algebra comes with a tensor product (the internal one); it can also be equipped with a second tensor product, the "external" one, or the coproduct, having the form above. That they are two different products is emphasized by recalling that the internal tensor product of a vector and a scalar is just simple scalar multiplication. The external product keeps them separated. In this setting, the coproduct is the map
that takes
For this example, formula_9 can be taken to be one of the spin representations of the rotation group, with the fundamental representation being the common-sense choice. This coproduct can be lifted to all of the tensor algebra, by a simple lemma that applies to free objects: the tensor algebra is a free algebra, therefore, any homomorphism defined on a subset can be extended to the entire algebra. Examining the lifting in detail, one observes that the coproduct behaves as the shuffle product, essentially because the two factors above, the left and right formula_10 must be kept in sequential order during products of multiple angular momenta (rotations are not commutative). 
The peculiar form of having the formula_10 appear only once in the coproduct, rather than (for example) defining formula_12 is in order to maintain linearity: for this example, (and for representation theory in general), the coproduct "must" be linear. As a general rule, the coproduct in representation theory is reducible; the factors are given by the Littlewood–Richardson rule. (The Littlewood–Richardson rule conveys the same idea as the Clebsch–Gordan coefficients, but in a more general setting).
The formal definition of the coalgebra, below, abstracts away this particular special case, and its requisite properties, into a general setting.
Formal definition.
Formally, a coalgebra over a field "K" is a vector space "C" over "K" together with "K"-linear maps Δ: "C" → "C" ⊗ "C" and ε: "C" → "K" such that
Equivalently, the following two diagrams commute:
In the first diagram, "C" ⊗ ("C" ⊗ "C") is identified with ("C" ⊗ "C") ⊗ "C"; the two are naturally isomorphic. Similarly, in the second diagram the naturally isomorphic spaces "C", "C" ⊗ "K" and "K" ⊗ "C" are identified.
The first diagram is the dual of the one expressing associativity of algebra multiplication (called the coassociativity of the comultiplication); the second diagram is the dual of the one expressing the existence of a multiplicative identity. Accordingly, the map Δ is called the comultiplication (or coproduct) of "C" and ε is the of "C".
Examples.
Take an arbitrary set "S" and form the "K"-vector space "C" = "K"("S") with basis "S", as follows. The elements of this vector space "C" are those functions from "S" to "K" that map all but finitely many elements of "S" to zero; identify the element "s" of "S" with the function that maps "s" to 1 and all other elements of "S" to 0. Define 
By linearity, both Δ and ε can then uniquely be extended to all of "C". The vector space "C" becomes a coalgebra with comultiplication Δ and counit ε.
As a second example, consider the polynomial ring "K"["X"] in one indeterminate "X". This becomes a coalgebra (the divided power coalgebra) if for all "n" ≥ 0 one defines: 
Again, because of linearity, this suffices to define Δ and ε uniquely on all of "K"["X"]. Now "K"["X"] is both a unital associative algebra and a coalgebra, and the two structures are compatible. Objects like this are called bialgebras, and in fact most of the important coalgebras considered in practice are bialgebras. 
Examples of coalgebras include the tensor algebra, the exterior algebra, Hopf algebras and Lie bialgebras. Unlike the polynomial case above, none of these are commutative. Therefore, the coproduct becomes the shuffle product, rather than the divided power structure given above. The shuffle product is appropriate, because it preserves the order of the terms appearing in the product, as is needed by non-commutative algebras.
The singular homology of a topological space forms a graded coalgebra whenever the Künneth isomorphism holds, e.g. if the coefficients are taken to be a field.
If "C" is the "K"-vector space with basis {"s", "c"}, consider Δ: "C" → "C" ⊗ "C" is given by
and ε: "C" → "K" is given by
In this situation, ("C", Δ, ε) is a coalgebra known as trigonometric coalgebra.
For a locally finite poset "P" with set of intervals "J", define the incidence coalgebra "C" with "J" as basis and comultiplication for "x" < "z"
The intervals of length zero correspond to points of "P" and are group-like elements.
Finite dimensions.
In finite dimensions, the duality between algebras and coalgebras is closer: the dual of a finite-dimensional (unital associative) algebra is a coalgebra, while the dual of a finite-dimensional coalgebra is a (unital associative) algebra. In general, the dual of an algebra may not be a coalgebra.
The key point is that in finite dimensions, and are isomorphic.
To distinguish these: in general, algebra and coalgebra are dual "notions" (meaning that their axioms are dual: reverse the arrows), while for finite dimensions, they are dual "objects" (meaning that a coalgebra is the dual object of an algebra and conversely).
If "A" is a "finite-dimensional" unital associative "K"-algebra, then its "K"-dual "A"∗ consisting of all "K"-linear maps from "A" to "K" is a coalgebra. The multiplication of "A" can be viewed as a linear map , which when dualized yields a linear map . In the finite-dimensional case, is naturally isomorphic to , so this defines a comultiplication on "A"∗. The counit of "A"∗ is given by evaluating linear functionals at 1.
Sweedler notation.
When working with coalgebras, a certain notation for the comultiplication simplifies the formulas considerably and has become quite popular. Given an element "c" of the coalgebra ("C", Δ, ε), there exist elements "c"(1)("i") and "c"(2)("i") in "C" such that 
In "Sweedler's notation", (so named after Moss Sweedler), this is abbreviated to
The fact that ε is a counit can then be expressed with the following formula
The coassociativity of Δ can be expressed as 
In Sweedler's notation, both of these expressions are written as
Some authors omit the summation symbols as well; in this sumless Sweedler notation, one writes
and
Whenever a variable with lowered and parenthesized index is encountered in an expression of this kind, a summation symbol for that variable is implied.
Further concepts and facts.
A coalgebra is called co-commutative if formula_25, where is the "K"-linear map defined by for all "c", "d" in "C". In Sweedler's sumless notation, "C" is co-commutative if and only if
for all "c" in "C". (It's important to understand that the implied summation is significant here: it is not required that all the summands are pairwise equal, only that the sums are equal, a much weaker requirement.)
A group-like element (or set-like element) is an element "x" such that and . Contrary to what this naming convention suggests the group-like elements do not always form a group and in general they only form a set. The group-like elements of a Hopf algebra do form a group. A primitive element is an element "x" that satisfies . The primitive elements of a Hopf algebra form a Lie algebra. 
If and are two coalgebras over the same field "K", then a coalgebra morphism from "C"1 to "C"2 is a "K"-linear map such that formula_27 and formula_28.
In Sweedler's sumless notation, the first of these properties may be written as:
The composition of two coalgebra morphisms is again a coalgebra morphism, and the coalgebras over "K" together with this notion of morphism form a category.
A linear subspace "I" in "C" is called a coideal if and . In that case, the quotient space "C"/"I" becomes a coalgebra in a natural fashion.
A subspace "D" of "C" is called a subcoalgebra if ; in that case, "D" is itself a coalgebra, with the restriction of ε to "D" as counit.
The kernel of every coalgebra morphism is a coideal in "C"1, and the image is a subcoalgebra of "C"2. The common isomorphism theorems are valid for coalgebras, so for instance "C"1/ker("f") is isomorphic to im("f").
If "A" is a finite-dimensional unital associative "K"-algebra, then "A"∗ is a finite-dimensional coalgebra, and indeed every finite-dimensional coalgebra arises in this fashion from some finite-dimensional algebra (namely from the coalgebra's "K"-dual). Under this correspondence, the commutative finite-dimensional algebras correspond to the cocommutative finite-dimensional coalgebras. So in the finite-dimensional case, the theories of algebras and of coalgebras are dual; studying one is equivalent to studying the other. However, relations diverge in the infinite-dimensional case: while the "K"-dual of every coalgebra is an algebra, the "K"-dual of an infinite-dimensional algebra need not be a coalgebra.
Every coalgebra is the sum of its finite-dimensional subcoalgebras, something that is not true for algebras. Abstractly, coalgebras are generalizations, or duals, of finite-dimensional unital associative algebras.
Corresponding to the concept of representation for algebras is a corepresentation or comodule.