Equilibrium Constant Explained
Equilibrium is the state at which the rates of the forward and reverse reactions are equal. 

$$\mathrm{rate_{forward}=rate_{reverse}}$$

Let's take a generic reaction:

$$\ce{A + B &lt;=&gt; C + D}$$

For simplicity's sake let's have both the forward and reverse reactions be concerts fundamental reactions. Then we can write the rate laws for the forward and reverse reactions:

$$\begin{aligned}
\mathrm{rate_{forward}}&amp;=k_1 [\ce{A}][\ce{B}]\\
\mathrm{rate_{reverse}}&amp;=k_{-1} [\ce{C}][\ce{D}]
\end{aligned}$$

If we set them equal to each other, we can rearrange the equation to get the rate constants on one side and the concentrations on the other. 

$$\begin{aligned}
k_1 [\ce{A}][\ce{B}]&amp;=k_{-1} [\ce{C}][\ce{D}]\\
\dfrac{k_1}{k_{-1}}&amp;=\dfrac{[\ce{C}][\ce{D}]}{ [\ce{A}][\ce{B}]}
\end{aligned}$$

The ratio of rate constants is the equilibrium constant. Thus is derived the law of mass action.