How this calculation works
Compute exact Hochschild cohomology dimensions HH⁰, HH¹ and HH² of a small rational unital associative algebra. Validate the multiplication, build the unnormalized cochain differentials and verify consecutive differentials compose to zero.
HH^k(A,A)=ker(d_k)/im(d_{k-1}); dim HH^k=n^(k+1)−rank(d_k)−rank(d_{k-1})A worked example
For A=Q[e]/(e²) with basis1,e, the cohomology dimensions in degrees0,1,2 are2,1,1. The differential ranks are0,3,4.
Good to know
Dimension1–3 over Q. Explicit unit and nonzero structure constants, zero-based indices, rational entries within parser limits. Returns degrees0–2 and d0,d1,d2 only; no cup product, Gerstenhaber bracket, deformation integration or general bimodule coefficients.
Reference: Sarah Witherspoon: Hochschild Cohomology for Algebras (opens in a new tab) ↗
Study multiplication through cochains
Hochschild cohomology measures algebraic features of an associative multiplication by arranging multilinear maps into a cochain complex. Degree zero recovers the center. Degree one identifies derivations modulo inner derivations. Degree two detects infinitesimal deformation classes, although an infinitesimal class need not extend to a complete deformation.
This calculation uses the algebra itself as coefficient bimodule, with its natural left and right multiplication. The coefficient choice is essential to the answer. Changing the bimodule or the ground field produces a different calculation, even if the same basis names and multiplication table are retained in the input description.
Compare this with the Finite algebra Jacobson radical calculator from multiplication constants. Compute HH0,HH1 and HH2 from Hochschild coboundary matrices;an algebra radical is a different invariant.
Encode the algebra without ambiguity
Choose an ordered basis e0 through e(n−1). A row i,j,k,c means that coefficient c contributes to ek in the product ei ej. Omit zero coefficients and supply each ordered triple once. The products ei ej and ej ei are separate data unless the algebra is commutative.
The unit is a coordinate vector, rather than a special reserved basis label. All multiplication identities are tested over exact rational arithmetic. The program checks associativity on every basis triple and verifies that the supplied unit acts identically on both sides. Failed identities stop cohomology construction immediately.
Build the Hochschild differential
A degree-k cochain is a linear map from the kth tensor power of A into A. For the unnormalized complex, its coordinate count is n to the power k plus one. Coordinates are ordered by the input basis tuple, followed by the output basis index of that multilinear map.
The differential combines left multiplication, alternating terms that multiply adjacent inputs, and right multiplication. In degree zero it is the commutator map. The implementation constructs matrices through degree two, including the outgoing differential needed to compute HH²; truncating before that outgoing map would overcount degree-two cocycles.
Explain the dual-numbers result
The default algebra has basis1,e and relation e squared equals zero. Both basis elements commute, so its center has dimension two and d0 has rank zero. The four-dimensional degree-one cochain space has differential rank three, leaving one non-inner derivation class after the degree-zero contribution is removed.
The degree-two cochain space has dimension eight. Its outgoing differential has rank four, giving a four-dimensional cocycle space. The incoming degree-one differential contributes three independent coboundaries, leaving one cohomology class. These separate kernel and image counts explain the displayed sequence2,1,1 and provide a check beyond merely reporting a familiar example.
Read dimensions and certificates
For each reported degree, subtract the outgoing rank and incoming rank from the cochain dimension. The first degree has no incoming differential. These formulas require the image of one map to lie inside the next kernel, so the program also multiplies consecutive differential matrices and demands exact zero entries.
The returned matrices allow independent rank checking or comparison with a hand-derived bar-resolution calculation. A center basis is included in degree zero. Higher cohomology is reported by dimensions rather than selected quotient representatives, so the output does not prescribe canonical bases for HH¹ or HH² or their algebra products.
Keep deformation interpretations precise
A nonzero second cohomology dimension suggests directions for first-order changes to the multiplication, after identifying changes caused by infinitesimal coordinate transformations. It does not certify unobstructed deformations, classify all associative structures nearby, or produce a new associative multiplication for a nonzero finite parameter value by itself.
Likewise, HH¹ records outer derivation classes rather than all linear symmetries of an algebra. The distinction between cocycles and cohomology matters: coboundaries represent directions already identified as equivalent. Read the differential ranks together with the final dimensions to see exactly which quotient has been taken in each reported degree.
Respect exact but small scope
Even low-degree Hochschild cochains grow exponentially with the algebra dimension. The dimension-three cap keeps all constructed matrices small enough to inspect, and rational arithmetic avoids threshold-dependent rank decisions. Decimal entries are treated as their exact finite rational values, not as noisy estimates of a multiplication measured in an experiment.
The calculator does not infer missing products, repair a nearly associative algebra, or compute an entire infinite cohomology ring. For larger algebras, specialized projective resolutions can be dramatically more efficient than the full bar complex. Here the explicit matrices prioritize a transparent, reproducible calculation in the stated bounded setting.
A few questions, answered
Why is an outgoing d2 needed?
HH² consists of degree-two cocycles modulo coboundaries, so the kernel of d2 is required.
Is HH0 the center?
Yes, with coefficients in A it is the kernel of the commutator differential.
Does nonzero HH2 prove a finite deformation exists?
No. Higher obstruction conditions can prevent extension of a first-order class.
Does this return the cohomology ring?
It returns low-degree dimensions and differential matrices, not cup products or brackets.