There is no HDMI connector on iMac computers. Only the Mac Mini has an HDMI port.
If your iMac is of recent vintage (generally 2009->present) then it has a miniDisplayPort video out connector or a Thunderbolt port, which is 100% compatible with miniDisplayport port and uses the same connector. To connect to a Sony HDTV that has an HDMI input you need one of the following:
Note that in general while the miniDIsplayPort can output both video & audio, if you use a DVI cable it will probably only carry the video, in which case you will also need to connect your iMac's audio out to the Sony TV audio in.