  Quadratic Lyapunov functions are prevalent in stability analysis of linear
consensus systems. In this paper we show that weighted sums of convex functions
of the different coordinates are Lyapunov functions for irreducible consensus
systems. We introduce a particular class of additive convex Lyapunov functions
that includes as particular instances the stored electric energy in RC
circuits, Kullback-Leiber's information divergence between two probability
measures, and Gibbs free energy in chemical reaction networks. On that basis we
establish a general gradient formalism that allows to represent linear
symmetric consensus dynamics as a gradient descent dynamics of any additive
convex Lyapunov function, for a suitable choice of local scalar product. This
result generalizes the well-known Euclidean gradient structures of consensus to
general Riemannian ones. We also find natural non-linear consensus dynamics
differing only from linearity by a different Riemannian structure, sharing a
same Lyapunov function. We also see how information-theoretic Lyapunov
functions, common in Markov chain theory, generate linear consensus through an
appropriate gradient descent. From this unified perspective we hope to open
avenues for the study of convergence for linear and non-linear consensus alike.
