I am working on a question about domain and codomain. So far, I know that domain is all the $x$ values of the function, and that the codomain is all the possible values that could be in the domain, and I also know that for it to describe a function it has to be a one to one relation. But what I'm not understand is how to read that from a question such as $f: \mathbb{N} \to \mathbb{N}$ where $f(n) = \sqrt{n}$, I don't see where to get the domain and codomain from it.
Thanks!
You could define $f(x) = \frac{1}{\sqrt{x}}$ for complex numbers different from 0, but depending of your problem you can consider only positive real number, natural numbers, rational number, so on. And about the codomain, who it is written on your question is not true, since the multiplicative inverse of the square root of a natural number is not always a natural number, so the codomain cannot be $\mathbb{N}$. And about a function being a relation one to one is not necessaraly true, since $f(x) = x^{2}$ is a function but not one to one, i.e, not injective.