  We discuss certain identities involving $\mu(n)$ and $M(x)=\sum_{n\leq
x}\mu(n)$, the functions of M\"{o}bius and Mertens. These identities allow
calculation of $M(N^d)$, for $d=2,3,4,\ldots\ $, as a sum of $O_d \left(
N^d(\log N)^{2d - 2}\right)$ terms, each a product of the form $\mu(n_1) \cdots
\mu(n_r)$ with $r\leq d$ and $n_1,\ldots , n_r\leq N$. We prove a more general
identity in which $M(N^d)$ is replaced by $M(g,K)=\sum_{n\leq K}\mu(n)g(n)$,
where $g(n)$ is an arbitrary totally multiplicative function, while each $n_j$
has its own range of summation, $1,\ldots , N_j$. We focus on the case $d=2$,
$K=N^2$, $N_1=N_2=N$, where the identity has the form $M(g,N^2) = 2 M(g,N) -
{\bf m}^{\rm T} A {\bf m}$, with $A$ being the $N\times N$ matrix of elements
$a_{mn}=\sum _{k \leq N^2 /(mn)}\,g(k)$, while ${\bf m}=(\mu (1)g(1),\ldots
,\mu (N)g(N))^{\rm T}$. Our results in Sections 2 and 3 assume, moreover, that
$g(n)$ equals $1$ for all $n$. In this case the Perron-Frobenius theorem
applies: we find that $A$ has an eigenvalue that is approximately $(\pi^2
/6)N^2$, with eigenvector approximately ${\bf f} = (1,1/2,1/3,\ldots ,1/N)^{\rm
T}$, and that, for large $N$, the second-largest eigenvalue lies in $(-0.58 N,
-0.49 N)$. Estimates for the traces of $A$ and $A^2$ are obtained. We discuss
ways to approximate ${\bf m}^{\rm T} A {\bf m}$, using the spectral
decomposition of $A$, or Perron's formula: the latter approach leads to a
contour integral involving the Riemann zeta-function. We also discuss using the
identity $A = N^{2\,} {\bf f}^{\,} \!{\bf f}^T - \textstyle{1\over 2} {\bf u}
{\bf u}^T + Z$, where ${\bf u} = (1,\ldots ,1)^{\rm T}$ and $Z$ is the $N\times
N$ matrix of elements $z_{mn} = - \psi(N^2 / (mn))$, with $\psi(x)=x - \lfloor
x\rfloor - \textstyle{1\over 2}$.
