The balance between excitation and inhibition (E-I balance) is maintained across brain regions though the network size, strength and number of synaptic connections, and connection architecture may vary substantially. We use a culture preparation to examine the homeostatic synaptic scaling rules that produce E-I balance and in vivo-like activity. We show that synaptic strength scales with the number of connections K as ∼ , close to the ideal theoretical value. Using optogenetic techniques, we delivered spatiotemporally patterned stimuli to neurons and confirmed key theoretical predictions: E-I balance is maintained, active decorrelation occurs and the spiking correlation increases with firing rate. Moreover, the trial-to-trial response variability decreased during stimulation, as observed in vivo. These results-obtained in generic cultures, predicted by theory and observed in the intact brain-suggest that the synaptic scaling rule and resultant dynamics are emergent properties of networks in general.