Is it okay if a function has two different points that have the exact same coordinates? In math class we are learning about functions.
One of the "stretch" questions is as follows:
"Find the conditions for $a$ and $b$ that make $\{(a,b)(-a,b)(2a,b)(a^2,b)\}$ a function"
Now the books answer, and my original answer was $a \not= -1,0,1,2$.
This makes sense right? if we take $0$ for example we end up with two inputs equaling the same output $(b)$. BUT what we really end up with is something like $\{(0,3)(0,3)(0,3)(0,3)\}$ (if $b=3$) which if they are all the same point should be a function.
In fact, any possible input for either $a$ or $b$ should be a function, as $b$ is always consistent and makes the points plot a horizontal line.
 A: A function is a relation, that is, a set or ordered pairs.
The condtion for such a relation to be a function is :

a relation R is a function iff  there are no two distinct ordered
pairs in R with the same first element ( i.e no two pairs with the same
first element , but distinct second elements)

In case "two" ordered pairs have the same first element but are not distinct ( implying that they also have the same second element) , the condition is satisfied. These "two" identical couples will count as only one element in the set, due to the extensionnality principle ( as is explaied in the comment).
The condition above can be rephrased :

a relation R is a function iff , in case $(a, b)$ and $( a^*, b)$
belong to R, the pairs have to be distinct, that is one must have
$a\neq a^*$.

In terms of your exercice, it means that, since all the pairs have the same second element ( namely $b$), all the first elements must be different numbers.
Note : the extensionnality principle says that sets S and T are identical iff they have exactly the same elements.
Suppose $S=\{a,a, b\}$ and $T=\{a, b\}$. Can you see any element of S that is not an element of T , or reciprocally? If no, it means that S and T are, in fact , the same set.
