I don't understand why the function "f(x)=x^2 for all real values of x" has no inverse. Isn't sqrt(x) the inverse?
I like to think of a function a bit like a machine. It takes in a number, and turns it into a different number. There are rules about what numbers you are allowed to put into a function. For example, you are not allowed to give a function a number that would result division by zero, or square-rooting a negative number. These restrictions on the numbers you can give to a function mean that it is possible to define all the numbers you are allowed to input. This is known as the domain of f, D(f).
Another rule of functions is that although it is permissible for two different inputs to give the same output (in this example, x=-2 and x=2 both give f(x)=4), it is not allowed for a function to return two answers for the same input. When we talk about the inverse of a function, it is a bit like we are running this machine in reverse; where we input a value that was an output to the original function, and get back our input. Except remember that an inverse is also not allowed to give two answers for the same input. We cannot have f-1(4) = -2 and 2. So for the function f(x) = x^2, we must constrain the domain, to be D(f) >= 0 or D(f) <=0.