It is important to know that a function is defined as a relation which associates one element of its domain with a unique element of the range. In other words, x-values can have two different y-values.
In this case, we observe that x = 2 has two values assigned -4 and 4, which violates the definition of a function.
Hence, the given set doesn't represent a function.