which relation is a function?

A function is a relation which associates every element in the domain to a unique element in the codomain.
In option 1,
2 has more than one image, namely 3 and 7.
In option 3,
11 has more than one image, namely 9 and 5.
In option 4,
3 has more than one image, namely 8 and -2.
Hence, the correct option is 2, where every element in the domain has unique image.