In order theory, a field of mathematics, an **incidence algebra** is an associative algebra, defined for every locally finite partially ordered set
and commutative ring with unity. Subalgebras called **reduced incidence algebras** give a natural construction of various types of generating functions used in combinatorics and number theory.

A **locally finite** poset is one in which every closed interval

- [
*a, b*] = {*x*:*a*≤*x*≤*b*}

is finite.

The members of the incidence algebra are the functions *f* assigning to each nonempty interval [*a, b*] a scalar *f*(*a*, *b*), which is taken from the *ring of scalars*, a commutative ring with unity. On this underlying set one defines addition and scalar multiplication pointwise, and "multiplication" in the incidence algebra is a convolution defined by

An incidence algebra is finite-dimensional if and only if the underlying poset is finite.

An incidence algebra is analogous to a group algebra; indeed, both the group algebra and the incidence algebra are special cases of a category algebra, defined analogously; groups and posets being special kinds of categories.

Consider the case of a partial order ≤ over any n-element set S. We enumerate S as *s*_{1}, …, *s _{n}*, and in such a way that the enumeration is compatible with the order ≤ on S, that is,

Then, functions f as above, from intervals to scalars, can be thought of as matrices *A _{ij}*, where

The incidence algebra of ≤ is then isomorphic to the algebra of upper-triangular matrices with this prescribed zero-pattern and arbitrary (including possibly zero) scalar entries everywhere else, with the operations being ordinary matrix addition, scaling and multiplication.^{[1]}

The multiplicative identity element of the incidence algebra is the **delta function**, defined by

The **zeta function** of an incidence algebra is the constant function *ζ*(*a*, *b*) = 1 for every nonempty interval [*a, b*]. Multiplying by *ζ* is analogous to integration.

One can show that ζ is invertible in the incidence algebra (with respect to the convolution defined above). (Generally, a member *h* of the incidence algebra is invertible if and only if *h*(*x*, *x*) is invertible for every *x*.) The multiplicative inverse of the zeta function is the **Möbius function** *μ*(*a, b*); every value of *μ*(*a, b*) is an integral multiple of 1 in the base ring.

The Möbius function can also be defined inductively by the following relation:

Multiplying by *μ* is analogous to differentiation, and is called Möbius inversion.

The square of the zeta function gives the number of elements in an interval:

**Positive integers ordered by divisibility**- The convolution associated to the incidence algebra for intervals [1,
*n*] becomes the Dirichlet convolution, hence the Möbius function is*μ*(*a, b*) =*μ*(*b/a*), where the second "*μ*" is the classical Möbius function introduced into number theory in the 19th century. **Finite subsets of some set***E*, ordered by inclusion- The Möbius function is
- whenever
*S*and*T*are finite subsets of*E*with*S*⊆*T*, and Möbius inversion is called the principle of inclusion-exclusion. - Geometrically, this is a hypercube:
**Natural numbers with their usual order**- The Möbius function is and Möbius inversion is called the (backwards) difference operator.
- Geometrically, this corresponds to the discrete number line.
- The convolution of functions in the incidence algebra corresponds to multiplication of formal power series: see the discussion of reduced incidence algebras below. The Möbius function corresponds to the sequence (1, −1, 0, 0, 0, ... ) of coefficients of the formal power series 1 −
*t*, and the zeta function corresponds to the sequence of coefficients (1, 1, 1, 1, ...) of the formal power series , which is inverse. The delta function in this incidence algebra similarly corresponds to the formal power series 1. **Finite sub-multisets of some multiset***E*, ordered by inclusion- The above three examples can be unified and generalized by considering a multiset
*E,*and finite sub-multisets*S*and*T*of*E*. The Möbius function is - This generalizes the positive integers ordered by divisibility by a positive integer corresponding to its multiset of prime factors with multiplicity, e.g., 12 corresponds to the multiset
- This generalizes the natural numbers with their usual order by a natural number corresponding to a multiset of one underlying element and cardinality equal to that number, e.g., 3 corresponds to the multiset
**Subgroups of a finite***p*-group*G*, ordered by inclusion- The Möbius function is if is a normal subgroup of and and it is 0 otherwise. This is a theorem of Weisner (1935).
**Partitions of a set**- Partially order the set of all partitions of a finite set by saying σ ≤ τ if σ is a finer partition than τ. In particular, let τ have
*t*blocks which respectively split into*s*_{1}, ...,*s*_{t}finer blocks of σ, which has a total of*s*=*s*_{1}+ ··· +*s*_{t}blocks. Then the Möbius function is:

Further information: Euler characteristic |

A poset is *bounded* if it has smallest and largest elements, which we call 0 and 1 respectively (not to be confused with the 0 and 1 of the ring of scalars). The **Euler characteristic** of a bounded finite poset is *μ*(0,1). The reason for this terminology is the following: If *P* has a 0 and 1, then *μ*(0,1) is the reduced Euler characteristic of the simplicial complex whose faces are chains in *P* \ {0, 1}. This can be shown using Philip Hall's theorem, relating the value of *μ*(0,1) to the number of chains of length *i*.

The **reduced incidence algebra** consists of functions which assign the same value to any two intervals which are equivalent in an appropriate sense, usually meaning isomorphic as posets. This is a subalgebra of the incidence algebra, and it clearly contains the incidence algebra's identity element and zeta function. Any element of the reduced incidence algebra that is invertible in the larger incidence algebra has its inverse in the reduced incidence algebra. Thus the Möbius function is also in the reduced incidence algebra.

Reduced incidence algebras were introduced by Doubillet, Rota, and Stanley to give a natural construction of various rings of generating functions.^{[2]}

For the poset the reduced incidence algebra consists of functions invariant under translation, for all so as to have the same value on isomorphic intervals [*a*+*k*, *b*+*k*] and [*a*, *b*]. Let *t* denote the function with *t*(*a*, *a*+1) = 1 and *t*(*a*, *b*) = 0 otherwise, a kind of invariant delta function on isomorphism classes of intervals. Its powers in the incidence algebra are the other invariant delta functions *t*^{ n}(*a*, *a*+*n*) = 1 and *t*^{ n}(*x*, *y*) = 0 otherwise. These form a basis for the reduced incidence algebra, and we may write any invariant function as . This notation makes clear the isomorphism between the reduced incidence algebra and the ring of formal power series over the scalars *R,* also known as the ring of ordinary generating functions. We may write the zeta function as the reciprocal of the Möbius function

For the Boolean poset of finite subsets ordered by inclusion , the reduced incidence algebra consists of invariant functions defined to have the same value on isomorphic intervals [*S*,*T*] and [*S*′,*T* ′] with |*T*\*S*| = |*T* ′\*S*′|. Again, let *t* denote the invariant delta function with *t*(*S*,*T*) = 1 for |*T*\*S*| = 1 and *t*(*S*,*T*) = 0 otherwise. Its powers are:

where the sum is over all chains and the only non-zero terms occur for saturated chains with since these correspond to permutations of

Indeed, this computation with formal power series proves that Many combinatorial counting sequences involving subsets or labeled objects can be interpreted in terms of the reduced incidence algebra, and computed using exponential generating functions.

Consider the poset *D* of positive integers ordered by divisibility, denoted by The reduced incidence algebra consists of functions that are invariant under multiplication: for all (This multiplicative equivalence of intervals is a much stronger relation than poset isomorphism; e.g., for primes *p*, the two-element intervals [1,*p*] are all inequivalent.) For an invariant function, *f*(*a*,*b*) depends only on *b*/*a*, so a natural basis consists of invariant delta functions defined by if *b*/*a* = *n* and 0 otherwise; then any invariant function can be written

The product of two invariant delta functions is:

since the only non-zero term comes from *c* = *na* and *b* = *mc* = *nma*. Thus, we get an isomorphism from the reduced incidence algebra to the ring of formal Dirichlet series by sending to so that *f* corresponds to

The incidence algebra zeta function ζ_{D}(*a*,*b*) = 1 corresponds to the classical Riemann zeta function having reciprocal where is the classical Möbius function of number theory. Many other arithmetic functions arise naturally within the reduced incidence algebra, and equivalently in terms of Dirichlet series. For example, the divisor function is the square of the zeta function, a special case of the above result that gives the number of elements in the interval [*x*,*y*]; equivalenty,

The product structure of the divisor poset facilitates the computation of its Möbius function. Unique factorization into primes implies *D* is isomorphic to an infinite Cartesian product , with the order given by coordinatewise comparison: , where is the *k*^{th} prime, corresponds to its sequence of exponents Now the Möbius function of *D* is the product of the Möbius functions for the factor posets, computed above, giving the classical formula:

The product structure also explains the classical Euler product for the zeta function. The zeta function of *D* corresponds to a Cartesian product of zeta functions of the factors, computed above as so that where the right side is a Cartesian product. Applying the isomorphism which sends *t* in the *k*^{th} factor to , we obtain the usual Euler product.