## 4 Mathematical Formalism of Consensus Through Path-Laplacian Matrices
### Path-Based Laplacian Matrices  
A _path_ of length \(k\) in \(G\) is a sequence of \(k+1\) distinct vertices \((v_{i_{0}},v_{i_{1}},\ldots,v_{i_{k}})\) such that each consecutive pair \((v_{i_{r-1}},v_{i_{r}})\) is an edge in \(E\). The _distance_\(d(i,j)\) between two nodes \(i\) and \(j\) is defined as the length of the shortest path connecting \(i\) to \(j\). Let \(d_{\text{max}}\) denote the graph's diameter (the maximum distance over all node pairs). For each integer \(k\) with \(1\leq k\leq d_{\text{max}}\), we define the \(k\)_-path adjacency matrix_, denoted \(P_{k}\), as the \(n\times n\) (symmetric) matrix with entries  
\[(P_{k})_{ij}\;=\;\begin{cases}1,&\text{if }d(i,j)=k,\\ 0,&\text{otherwise}.\end{cases} \tag{4}\]  
In other words, \(P_{k}(i,j)=1\) if and only if there exists at least one shortest length path \(k\) between node \(i\) and node \(j\). This matrix generalizes the ordinary adjacency matrix (\(P_{1}=A\)) to connections via longer paths. We also define the \(k\)_-path degree_ of node \(i\) as  
\[\delta_{k}(i)\;=\;\sum_{j=1}^{n}(P_{k})_{ij}. \tag{5}\]  
i.e., the number of nodes at distance exactly \(k\) from \(i\) in the network [9]. By construction, \(\delta_{1}(i)=\deg(i)\) is the usual degree. We introduce the \(k\)_-path Laplacian matrix_\(L_{k}\) of the network \(G\) as follows [9]:  
\[(L_{k})_{ij}\;=\;\begin{cases}-1,&\text{if }d(i,j)=k,\\ \delta_{k}(i),&\text{if }i=j,\\ 0,&\text{otherwise}.\end{cases} \tag{6}\]  
Equivalently, we can write \(L_{k}=D_{k}-P_{k}\), where \(D_{k}=\text{diag}(\delta_{k}(1),\ldots,\delta_{k}(n))\) is the diagonal matrix of \(k\)-path degrees. For \(k=1\), \(L_{1}=D_{1}-P_{1}=D-A\), which is exactly the classical Laplacian \(L\). Each \(L_{k}\) is symmetric and positive semi-definite. In fact, one can verify that for any real vector \(y\in\mathbb{R}^{n}\),  
\[y^{\top}L_{k}y\ =\ \frac{1}{2}\sum_{\begin{subarray}{c}i,j\in V\\ d(i,j)=k\end{subarray}}\left(y_{i}\ -\ y_{j}\right)^{2}\ \geq\ 0.\]  
confirming that all eigenvalues of \(L_{k}\) are non-negative. Moreover, \(L_{k}\) shares the zero-eigenvalue property of the standard Laplacian: since each off-diagonal \(-1\) in row \(i\) of \(L_{k}\) is balanced by the contribution to the diagonal entry \(\delta_{k}(i)\), it follows that \(L_{k}\mathbf{1}=0\). Thus, \(0\) is an eigenvalue of \(L_{k}\) with eigenvector \(\mathbf{1}=[1,1,\ldots,1]^{T}\) for every \(k\). The multiplicity of this zero eigenvalue reflects the number of disconnected components in the graph when considering only \(k\)-distance connections. In particular, if the network \(G\) is such that any node can reach any other node through a sequence of hops of length \(\leq k\) (sometimes said to be \(k\)-path connected', then \(L_{k}\) has a unique zero eigenvalue. In general, \(m\) zero eigenvalues of \(L_{k}\) indicate that the graph can be partitioned into \(m\) disjoint subgraphs that are not linked by any \(k\)-length path. This is a natural generalization of the connectivity interpretation of the ordinary Laplacian (\(L_{1}\)). The family \(L_{k}:1\leq k\leq d_{\max}\) thus provides a spectrum of Laplacian-like operators, each capturing network connectivity at a different path-length scale. Importantly, higher values of \(k\) account for more \"long-range\" links in the network, and as we will see, incorporating such long-range interactions can significantly impact dynamic processes like consensus.