Does an extremely dense object with no energy generates gravity? or else what happens

I have a kinda shallow understanding in energy and gravity and stuff, so maybe in my post, I affirmed something that isn't true or I forgot something

Alrightt so imaging we have

-object A (which has a huge mass) and

-object B (which has a little mass)

So to my understanding, object A will pull object B towards it, if object B is close enough, because of object A's gravity. And this gives the object B energy, right?

where does that energy come from? if we follow the law of conservation of energy, then we know that energy cannot be created or destroyed

I saw some articles about the same question, that uses an example of dropping a ball from some height

the ball will be attracted to earth, thus gaining energy from earth's gravity

but when lifting the ball, we give potential energy to earth's gravity, and when we drop the ball, the energy we transfered to earth (by lifting) will transfer to the ball

My question is a similar one, but this time we aren't actually lifting anything (which transfers energy to object A). Instead, object A and B just randomly come across into space and then start to attract eachother.

so my question is where does that energy (the energy that object A gave to object B, using its gravity) come from?

• Do you mean within Newtonian physics or within general relativity? Mar 10 '21 at 6:13

Here are some points that may help:

1. Gravitational potential energy (GPE) is defined to be always negative. When object $$B$$ is at an infinite distance away from object $$A$$, the GPE between them is defined to be $$0$$.
2. Kinetic energy (KE) is defined to be always positive. The work-energy theorem tells us that as $$B$$ moves towards $$A$$, $$B$$ loses gravitational potentional energy and gains kinetic energy.

Returning to your question, if $$A$$ and $$B$$ randomly come into existence in space, we can define the starting GPE and KE between them to be both zero.

As $$B$$ gets attracted towards $$A$$ and moves towards it, $$B$$ loses GPE and gains $$KE$$. The total energy GPE & KE in the system still adds to zero.

So, we can actually give zero energy to the system $$A$$ and $$B$$ and the physics still works.

Where does the energy come from?

You can say it comes from the gravitational force. The planet A can be thought of as having a static force field around it. Just like a stationary electric charge. The potential energy of the field is defined in terms of the force by the work. E=Work=(Force)(distance). By convention, the distance is defined in terms of a far away point where the force is nearly 0.

$$E=(\text{Force)}_{\text{at x}}(x) - (\text{Force x}_{\text{at x far away}}) (x_{\text{far away}}) =$$ $$(\text{Force})_{\text{at x}} (x) = mgh$$

we give potential energy to earth's gravity

You don't give potential energy to the earth's gravity. You give potential energy to the ball by lifting it. You have to do work to oppose gravity. When you drop the ball, after lifting it, gravity does the same work on the ball as you did when you lifted it. In this case, Work=(Force)(distance)=Energy.