  This paper proposes the matrix-weighted consensus algorithm, which is a
generalization of the consensus algorithm in the literature. Given a networked
dynamical system where the interconnections between agents are weighted by
nonnegative definite matrices instead of nonnegative scalars, consensus and
clustering phenomena naturally exist. We examine algebraic and algebraic graph
conditions for achieving a consensus, and provide an algorithm for finding all
clusters of a given system. Finally, we illustrate two applications of the
proposed consensus algorithm in clustered consensus and in bearing-based
formation control.
