If I take out my logic board in my MacBook Air 2011 11-inch i5 2 GB RAM and put in a MacBook Air 2011 11-inch i7 4 GB RAM, will it work? If not why?
Yes, it will work.
The only thing you need to understand is that logic board is a determinative component in a MacBook and all the other parts (like flash drive, Wi-Fi module, etc.) just connected to it. But all of them are completely changeable.
So if you got two MacBook Air 11" 2011 you can interchange their parts in any order you want.
Just don't forget to use credible disassemble guide. I strongly recommend you ifixit.com.