iMac (Mid 2011) iMac (Mid 2010) iMac (Late 2009)
The above models support Nonparity RAM configuration, which means it is ok to leave one of the slots empty.
I personally prefer installing RAM of the same brand though. Hope this helps
check out HT1423 for more info
"It is not working better if the first slot has the 4gb the second is empty and in 3 and 4 the 2gb's"
--- are you saying that the computer seem faster when the 4GB stick is in the first slot?
Check (Apple Logo > About this Mac ) if the added RAM is recognized, 4GB to 8GB is a huge jump and you should be able to "feel" the difference.
You can also check About this Mac > More Info> System Report to see if the 4GB stick is recognized when placed on any of the slots.