If I buy an IPhone 4s from AT&T. Could I unlock it and switch it to T-Mobile?

I'm just trying to avoid paying $550. Instead I want to pay $100. Appreciate the help thank you.

No you will be stuck in a contract which would be very expensive to buy out of. The contract subsides the price of the phone.

If you get it from AT&T for $100 must sign a 2-year contract with AT&T, so you can't just switch to t-mobile, unless you pay like a $300 - $350 early termination fee.

Its not as easy as you think.

The 4S is $99, but then there's the activation fee, voice, data, text plans & then to get it unlocked there would be a fee as well. Of course even after getting it unlocked doesn't mean the 2 year AT&T plan ends so you'd have to pay $325 to do so.

Ignoring the voice/data/text costs you'd be spending $480.

Why not simply buy the phone from T-Mobile if the intent is to get one there anyway?

If your going to buy an ATT phone which is under contract the you can't unlock it. You need to buy a non contract phone to have it iphone factory unlock.