How to find out what carrier my iPhone 4 is locked to?

I bought an iPhone 4 off of a friend that thought it was with Rogers. My Rogers sim card doesn't work with the iPhone and it is unable to be unlocked. Is there any way that I can find out who this iPhone is locked to, even without sim card?

I'd like to know so that I can either sell it or trade it with someone.

Your phone can be unlocked by your carrier, ask them for help and they will be able to solve your problem. Hope this helps you.