Fairly basic question:
Given the relation d = Dm and the quantities d and a sparse D I can find a solution m = (D'D)^(-1)D'd by subbing the known quantities in the equation for m. However some code that I am studying opts to use an iterative approach to find m. Is there any benefit in doing this?
$\bf D$ is sparse.
However ${\bf D}^{-1}$ or even $({\bf D}^T{\bf D})^{-1}$ is not necessarily sparse and can require lots of memory and computational resources to compute.
By using an iterative method that only use matrix-vector multiplications (and no matrix-matrix operations, like many other solvers do), we can be sure that any operation will be very fast, since multiplication by $\bf D$ on any matrix will be fast thanks to the sparsity.
Another benefit is that an iterative method for many systems you can get an acceptable approximation to a solution a lot faster than an exact solution. Depending on your application this can be a very valuable tradeoff.