A function has an input value and an output value. And the output is related somehow to the input value. A function has only one relationship for each input value. Every element in the input must be related to an output value. x is usually the input while y is the output value.
Therefore, the question above is a function .