How does one derive $\Delta_\mathrm r G^\circ = -RT\ln(K)$? I don't see the connection mathematically or conceptually; how does Gibbs at all relate to the equilibrium constant of a reaction?

This was part one of a three part question which I've split into 3 individual questions as advised. I left this question as the one associated with the original title; the other one is here and I will edit the third in when my post cooldown allows me to post it, if anyone wishes to visit those as well now.


closed as too broad by Karsten Theis, andselisk, Todd Minehardt, Tyberius, airhuff May 1 at 3:40

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.