What is the Earth made of? What is the universe made of? These are arguably two of the biggest questions asked by anyone from young children to senior scientists. Unfortunately, direct observations of the answer to either question are difficult to come by. We can only dig so far down into the crust, and only fly so far out into space. As such, we must infer the answers to these questions from their effects on other observable systems. This is what is known as an inverse problem. In this presentation I investigate methods used to solve the inverse problems of imaging the Earth’s deep interior and mapping the distribution of dark matter in the universe. I investigate whether the methods used for one problem are transferrable to the other, creating a transfer of knowledge between the fields of geophysics and astrophysics, aiming to substantially advance imaging methods and uncertainty quantification in both fields. My focus is on probabilistic methods, that is to say methods which solve the inverse problem by drawing millions of images according probability distributions in a Bayesian manner. The key benefit of these methods is that they lend themselves naturally to full uncertainty quantification, with the drawback of being extremely slow particularly as the resolution of the images increases. First, I create new images of the upper-most mantle and their associated uncertainties using a sparsity-promoting wavelet prior and an advanced probabilistic inversion scheme. This particular scheme is designed to improve con- vergence in high-dimensional and non-smooth parameter spaces. These new images exhibit the expected tectonic features such as plate boundaries and continental cratons. Importantly, the uncertainties obtained are physically reasonable and informative, in that they reflect the heterogenous data distribution and also highlight artefacts due to an incomplete forward model. These inversions are a first step towards building a fully probabilistic upper-mantle model in a sparse wavelet basis. I then apply the same advanced probabilistic method to the problem of full-sky cosmological mass-mapping. However, this is severely limited by the computational complexity of high-resolution spherical harmonic transforms. In response to this, I use, for the first time in cosmology, a trans-dimensional algorithm to build galaxy cluster-scale mass- maps. This new approach performs better than the standard mass-mapping method, with the added benefit that uncertainties are naturally recovered. With more accurate mass-maps and uncertainties, this method will be a valuable tool for cosmological inference with the new high-resolution data expected from upcoming galaxy surveys, potentially providing new insights into the interactions of dark matter particles in colliding galaxy cluster systems.