I'm given that the number of ordered pairs of integers $1 \leq m,n \leq N$ that are relatively prime is
$$\sum_{1 \leq d\le N} \mu(d) \Big\lfloor \frac Nd \Big\rfloor^2$$
where $\mu$ is the Mobius function. I have no idea where to begin with proving this, so I would appreciate some hints to get me started. It looks a little bit like Mobius inversion, but not quite. So far I've tried writing the number of ordered pairs as
$$\sum_{m = 1}^N\sum_{n = 1}^N\sum_{d \mid (m,n)}\mu(d)$$
but I don't know where to go from here, so perhaps it is not the right approach.
For each $d\in[N]=\{1,\ldots,N\}$ there are $\left\lfloor\frac{N}d\right\rfloor$ multiples of $d$ in $[N]$, so there are $\left\lfloor\frac{N}d\right\rfloor^2$ ordered pairs of multiples of $d$ in $[N]\times[N]$. Thus, the number of ordered pairs of relatively prime numbers in $[N]\times[N]$ is
$$\begin{align*} \sum_{m=1}^N\sum_{n=1}^N\sum_{d\mid(m,n)}\mu(d)&=\sum_{d\in[N]}\sum_{m=d}^N\sum_{n=d}^N\mu(d)[d\mid(m,n)]\\ &=\sum_{d\in[N]}\mu(d)\sum_{m=d}^N\sum_{n=d}^N[d\mid(m,n)]\\ &=\sum_{d\in[N]}\big(\mu(d)\cdot|\{\langle m,n\rangle\in[N]\times[N]:d\mid(m,n)\}|\big)\\ &=\sum_{d\in[N]}\mu(d)\left\lfloor\frac{N}d\right\rfloor^2\;. \end{align*}$$
Here $[d\mid(m,n)]$ is an Iverson bracket.