A relation f from set A to set B is said to be a function if each element of A has one and only one image in B.
Thus, it is necessary for every element of A to have an image in B. It is also necessary that an element of A has a unique image in B.
Thus, both the statements are true.