So by using this definition of entropy and by using the second law of thermodynamics, we can basically derive the equation for Gibbs free energy that we can use to basically determine whether or not a reaction is spontaneous.