How to prove that $-x$ is not equal to $x$ just because they yield the same result when in $x^2$ I know how incredibly stupid this sounds, but bear with me.
Let's take any random $x$, say $3$, and any random $-x$, say $-3$. Let's plug it into $x^2$. They will both give the same result! 
I know this conclusion can't be right, that because of the above, $3 = -3$. But how do we logically prove it wrong? I want to know what is logically flawed about the argument above? 
I know from the instance above, we can draw 2 conclusions:


*

*$x$ is really equals to $-x$. 

*Just because a function gives the same output for 2 separate numbers doesn't mean the 2 numbers are the same. 


Can you please explain why conclusion 2 is the right one to come to? 
As an extension, can you please also disprove conclusion 1 above? Why isn't the fact that both provide identical outputs when being plugged into the same function a legitimate reason to say that both inputs are the same? And when is this line of reasoning legitimate; when is it legitimate to say that because both inputs provide the same output, they are the same? 
Can you explain all this as simply as possible? I'm still a beginner, and will struggle to understand any rigorous mathematical notation without explanation. 
 A: For any non injective function $f(x)$ we have that $a\neq b$ exist such that $f(a)=f(b)$, indeed $f(x)=x^2$ for $x\in\mathbb{R}$ is not injective and for any $a\in \mathbb{R}$ we have that $f(a)=f(-a)=a^2$.
A: Think of this as a case of mistaken identity. There are many functions that give the same output for two different inputs. For example, if two people have the same name, this does not mean that they are the same person.
A: The function that to each student assigns their student number is injective, as every student has a different number. Know the number, you can find the student.
The function that to each student assigns their cohort number is not injective, as there are more than one student in each cohort. Know the number, you only know a set of students the input lies in.
Even in the latter case we still call this a function, even though different inputs can give out the same output.
A: You start from 
$$x = 3,y=-x=-3$$
Then you try to prove that they are not the equal. This you do with a proof by contradiction. So you first assume they are equal:
$$x=y$$
Then you square both. And here's the point. To square a number is not an "equivalent transformation". Meaning that some information just got lost (ie the sign).
Therefore you cannot argue that 
$$x^2=y^2 \Rightarrow x=y$$
Because
$$\sqrt{x^2} = \pm x$$
Only bijective functions (ones that are both injective and surjective) are equivalent transformations. Just injective or just surjective is not enough. 
