Great question, Shahd.
We can "technically" only use the Keq expression to relate the concentrations of reactants and products when the system is AT equilibrium.
When we know that a system is NOT at equilibrium, or if we want to test and see if whether or not a system is at equilibrium, we use a Q expression. I remember it as Q for "question: are you at equilibrium?"
Here's the annoying thing: the expression looks IDENTICAL to the Keq expression. But its meaning is very different!!!
For example:
For the equilibrium reaction 2NO(g) + Cl2(g) <---> 2NOCl(g), we get the equilibrium expression
Keq = [NOCl]²/([NO]²[Cl2]) = 2.2 x 10³ (this number is from literature and would be given to you)
Now, if you change the concentrations of any of the species, you are no longer at equilibrium. You cannot use the Keq expression anymore. You need to use a Q expression, which is
Q = [NOCl]²/([NO]²[Cl2])
Hey, isn't that the same formula? ALMOST, but not quite. Notice that the Q expression ISN'T EQUAL TO 2.2 x 10³. Instead, the Q expression will be equal to another value.
Then, you will COMPARE that value to the value of Keq, and make a conclusion.
If Q > Keq, then the system is "overbaked" (like a cake), and you have added too many products. The system will now shift towards the reactants side.
If Q = Keq, you are at equilibrium!
If Q < Keq, then the system is "underbaked" (again, like a cake), and you have added too many reactants. The system will now shift towards the products side.
I hope this explanation helps. 😄