What does the notation $f : \mathbb R \rightarrow \mathbb R$ mean? Alright, I've done research regarding this question have attained answers that identify $f$ as the function (which is obvious) and identify $\mathbb R \rightarrow \mathbb R$ as meaning "the domain is the set of all real numbers and the codomain is the set of all real numbers", 
I've also read that, say $f :  x \rightarrow x^2$ can be used as the notation for a function, and can otherwise be written as $f(x) = x^2$, which makes sense, but say for example, $f : 2\sqrt x \rightarrow \displaystyle \frac{x}{4}$, would this be equivalent to $f(x) = \displaystyle \frac{x^2}{64}$? 
Furthermore, can the use of symbols indicating the sets of, for example, all real or rational numbers always be used to distinguish between when this notation is referring to a function and when it is referring to the domain and codomain of a function? All I would like is confirmation to these ideas so that I am aware of how to use them in the future. Thank you.
 A: You are making this more complicated than it is.
The proper notation for a function is $$f:X\rightarrow Y:x\mapsto f(x).$$
The part $f:X\rightarrow Y$ means that $X$ is the domain of the function and $Y$ is the target/codomain. The part $x\mapsto f(x)$ explains what happens to elements of $x$. Here a particular $x$ is mapped to $f(x)\in Y$.
In case the domain and target are understood, people often use the bad notation $f(x)=\mbox{some expression}$. For example $f(x)=\sqrt{x}$, however this does not completely define the function as it is not clear what the domain and target are. Indeed comparing the functions $f:[0,1]\rightarrow [0,1]:x\mapsto \sqrt{x}$ and $g:\mathbb{R}^+\rightarrow \mathbb{R}^+:x\mapsto f(x)$, we see that $f$ has a maximum whereas $g$ does not, a huge difference.
The notation $x\mapsto f(x)$ is the same story as it really only specifies $f(x)$.
Writing $f:2\sqrt{x}\mapsto \frac{x}{4}$ is not done. The problem is that you do not specify the domain and a priori it's not clear that any element in $X$ can be written as $2\sqrt{x}$. Indeed, writing $\sqrt{x}$ implies that $x$ should be positive, but when you rewritre this function as $f(x)=\frac{x^2}{64}$, this restriction dissapears.
For sake of completeness, let me give some examples of functions which have weirder domains and codomains.
Consider the map $f:C([0,1])\rightarrow \mathbb{R}:h\mapsto \max_{x\in [0,1]}h(x)$, it's non-trivial that this map is well-defined, i.e. the maximum exists. Here $C([0,1])$ is the set of all real-valued continuous functions on $[0,1]$. Here's another one $g:\mathbb{R}[X]\rightarrow \mathbb{R}[X]:p(X)\mapsto p'(X)$. Here $\mathbb{R}[X]$ is the set of all polynomials in $X$ with real coefficients and $p'(X)$ denotes the derivative of $p(X)$.
A: The notation $f:A\to B$ is read "f is a function from $A$ to $B$."  I always have imagined the colon to be "is a" or "has the type."  (You could potentially also write $f\in B^A$ if you are comfortable with $B^A$ being the set of functions $A\to B$.)
I wouldn't use $f:x\to x^2$ as notation for an algebraic definition of a function since, if $x$ is a set, it could mean "$f$ is a function from $x$ to the set of pairs of values from $x$."  Perhaps $f:x\mapsto x^2$, though I usually say "let $f$ be a function defined by $x\mapsto x^2$" or better "let $f:\mathbb{R}\to\mathbb{R}$ be the function defined by $x\mapsto x^2$."  It is not unheard of to write $f=(x\mapsto x^2)$.
You may define a function implicitly, like $2\sqrt{x}\mapsto x/4$, but you must make sure it is well defined.  For instance, it cannot be defined for negative numbers since $2\sqrt{x}$ is not negative.  It is indeed equivalent to $f(x)=x^2/64$ if you make the domain of $f$ clear.
If I'm parsing it correctly, I think the answer to your last question is that you should use $\mapsto$ when you give an algebraic definition of a function and $\to$ when you give the type (domain and codomain) of a function.
