I have iMac 2011 with ThunderBolt and MacBook Air 2011 with Mini DisplayPort. Can I connect them with a ThunderBolt cable? It is for work in Photoshop on two displays. Thanks!
To use Target Display mode with a Thunderbolt equipped iMac you need another Thunderbolt equipped Mac and a Thunderbolt cable [emphasis is mine]:
iMac (21.5-inch, Mid 2011) and iMac (27-inch, Mid 2011) support Target Display Mode via Thunderbolt to Thunderbolt cable (2 m) when the source is another Thunderbolt-equipped computer.
If your MacBook Air has Mini DisplayPort then it will not work. More here about what options will work.