Functions are usually represented using symbols.
These symbols tell us what the domain and codomain are.
This tells us that the function f has a domain of natural numbers and a codomain of natural numbers as well. The first symbol that we see after f represents the domain while the second symbol represents the codomain and in this case, they are both the same.
For this function, the symbols tell us that the function takes in x and returns x squared and it can be written in both ways.
In addition, we can also express domain and range differently. These two notations represent the domain of the function f.
Similarly, these two notations represent the range of the function f.