# On the Role of Matrix-Weights Elements in Consensus Algorithms for Multi-Agent Systems
## 2 Problem Formulation
### Diagonal Matrix Weights
#### 3.3.1 Positive Definite Matrix Weights  
When diagonal positive definite (PD) matrices constitute the matrix-weights in the weight set \(\mathcal{W}=\{W_{ij}:v_{j}v_{i}\in\mathcal{E}\}\), it implies that \(w_{kk}^{ij}\
eq 0\) for all \(k=1,\ldots,m\), and for all \(v_{j}v_{i}\in\mathcal{E}\).  
Define  
\[x^{[k]}=\left[x_{1}^{[k]}\,\ldots\,x_{n}^{[k]}\right]^{T}\]  
as the vector containing the \(k\)-state of all agents. Its dynamics follow  
\[\dot{x}^{[k]}(t)=-\mathcal{L}_{\mathcal{W}}^{[k]}x^{[k]}(t) \tag{14}\]  
The solution of the above differential equation is given by  
\[x^{[k]}(t)=e^{-t\mathcal{L}_{\mathcal{W}}^{[k]}}x^{[k]}(0). \tag{15}\]  
The choice of \(w_{kk}^{ij}\) will affect the rate of convergence of the consensus algorithm of the \(k\)-state of all agents.  
Consider the case when the matrix weights are scalars multiples of the identity matrix. We know that for any square matrices \(A_{n}\in\mathbb{R}^{n\times n}\) with \(\lambda_{1},...,\lambda_{n}\), and \(B_{m}\in\mathbb{R}^{m\times m}\) with \(\mu_{1},...,\mu_{m}\) that the eigenvalues of \(A_{n}\otimes B_{m}\) are \(\lambda_{i}\mu_{j},i=1,\ldots,n\), \(j=1,\ldots,m\)[21]. Hence,the eigenvalues of \(\mathcal{L}_{\mathcal{W}}=\mathcal{L}_{w}(\mathcal{G})\otimes l_{m}\) are the eigenvalues of \(\mathcal{L}_{w}(\mathcal{G})\) repeated \(m\) times, and \(\mathcal{L}_{\mathcal{W}}^{[k]}=\mathcal{L}_{w}\) for all \(k=1,\ldots,m\). Then Equation (15) becomes  
\[x^{[k]}(t)=e^{-\mathcal{L}_{w}t}x^{[k]}(0),\]  
which implies \(GC\).  
**Theorem 3**.: _Assume that all the matrix-weights are diagonal PD matrices. The following statements hold:_  
1. _If the_ \(k\)_-state graph is connected, there will be a global consensus (GC) across the_ \(m\) _states of all agents._
2. _If the_ \(k\)_-state graph is not connected, there will be a global cluster consensus (GCC) across the_ \(m\) _states such that_ \(\mathcal{C}^{i}=\mathcal{C}^{l}\) _for all_ \(i\
eq j\)_,_ \(i=1,\ldots,m\)_, and_ \(j=1,\ldots,m\)_. Moreover, the number of clusters of the states is determined by the number of connected components of the_ \(k\)_-state graph._  
Proof of Theorem 3.: If the \(k\)-state graph is connected, all agents are connected at the agent level. Since all matrix weights are diagonal PD matrices, all \(l\)-state graphs for all \(l=1,\ldots,m\) are connected without incoming links. Hence, there will be a GC.  
Assume that the \(k\)-state graph is not connected. If the \(k\)th states of agents \(v_{i}\) and \(v_{j}\) are in different connected components, (that is, \(w_{kk}^{ij}=0\)), then, \(v_{i}\) and \(v_{j}\) are not adjacent at the agent level, (that is, \(W_{ij}=0\)) because all matrix weights are diagonal PD matrices. This implies that \(w_{ll}^{ij}=0\) for all \(l=1,\ldots,m\). In other words, if agents \(v_{i}\) and \(v_{j}\) are not adjacent in the \(k\)th state, they are not adjacent in any other states. If the \(k\)th states of \(v_{i}\) and \(v_{j}\) are in the same connected components, then all other states of \(v_{i}\) and \(v_{j}\) are in the same connected components since all matrix weight are diagonal PD matrices. Hence, there will a GCC.