How does density affect gravity?

Say we have two masses, mass A and mass B. These two masses are identical in every dimension. The only difference is the density. Do they not curve the same amount of space-time, and if not, why?

• Well... which one has more mass, and hence a stronger gravitational field around it? Feb 4, 2019 at 21:48
• @AaronStevens If they're the same size, yet one is denser, how does the denser one have a stronger gravitational field? I'm visualizing two masses taking up the same amount of space but one is "hollow" and one is not. If the less dense one has less gravity, does that mean space-time goes through mass? Feb 4, 2019 at 22:12
• I am unsure what you mean by "does that mean space-time goes through mass?". The masses exist in space-time. Feb 4, 2019 at 22:14
• @SamBTz Are you familiar with the fact that in Newton's theory of gravity, the strength of the gravitational field at a distance $r$ from the center of a spherically symmetric mass $M$ is independent of the density? The corresponding result in general relativity is called Birkhoff's theorem. Newton's theory of gravity is an excellent approximation to general relativity for most practical purposes, and it's much simpler mathematically. Newton's theory doesn't express the strength of the gravitational field in terms of spacetime curvature, but there's a relatively easy way to transcribe it. Feb 5, 2019 at 0:48
• @SamBTz I forgot to mention that the independent-of-density statement at the beginning of my previous comment assumes that all of the mass is contained in a sphere of radius less than $r$. But aside from that restriction, it doesn't matter how dense the mass is. In Newton's theory, this is called the shell theorem. Feb 5, 2019 at 0:53

Let's assume our two masses are spherical and not rotating, and they have the same mass. In that case Birkhoff's theorem tells us the geometry outside the masses is the same in both cases i.e. the Schwarzschild metric. So if you are some distance $$r$$ away, where $$r$$ is greater than the radius of either object, then the curvature is exactly the same. You would not be able to tell the difference between the two objects from their gravitational fields.