  The factorization number $F_2(G)$ of a finite group $G$ is the number of all
possible factorizations of $G=HK$ as product of its subgroups $H$ and $K$,
while the subgroup commutativity degree $\mathrm{sd}(G)$ of $G$ is the
probability of finding two commuting subgroups in $G$ at random. It is known
that $\mathrm{sd}(G)$ can be expressed in terms of $F_2(G)$. Denoting by
$\mathrm{L}(G)$ the subgroups lattice of $G$, the non--permutability graph of
subgroups $\Gamma_{\mathrm{L}(G)}$ of $G$ is the graph with vertices in
$\mathrm{L}(G) \setminus \mathfrak{C}_{\mathrm{L}(G)}(\mathrm{L}(G))$, where
$\mathfrak{C}_{\mathrm{L}(G)}(\mathrm{L}(G))$ is the smallest sublattice of
$\mathrm{L}(G)$ containing all permutable subgroups of $G$, and edges obtained
by joining two vertices $X,Y$ such that $XY\neq YX$. The spectral properties of
$\Gamma_{\mathrm{L}(G)}$ have been recently investigated in connection with
$F_2(G)$ and $\mathrm{sd}(G)$. Here we show a new combinatorial formula, which
allows us to express $F_2(G)$, and so $\mathrm{sd}(G)$, in terms of adjacency
and Laplacian matrices of $\Gamma_{\mathrm{L}(G)}$.
