# Does the domain of a real valued function need be a $\mathbb{R}$ or some subset of $\mathbb{R}$?

My text book says the domain and co-domain need to be either $\mathbb{R}$ or some subset of $\mathbb{R}$ but sometimes I read on the internet, a function that gives real values is a real valued function.

I'm not sure which one's correct though, can anyone help me out here?

For instance, would you say $$f \, : \mathbb{C} \to \mathbb{R}$$ is a real valued function even though the domain is a set of complex numbers?

• Sometimes the term "real function" is used to denote functions whose domain and range are both subsets of $\mathbb{R}$. The potential for confusion with "real-valued function" is of course big. – Daniel Fischer Aug 27 '18 at 18:37
• @DanielFischer hold on now, a quick google search tells me they are same? :/ – William Aug 27 '18 at 19:01
• – Daniel Fischer Aug 27 '18 at 19:08

If $X$ is an arbitrary set, we call a function $f$ defined on $X$ real-valued so long as it maps $X$ into some subset (possibly the entirety of) the real numbers $\mathbb{R}$.

• My man you didn't answer my question. You just said exactly what I said. $X$ is a set of what? Real numbers? Complex Numbers? – William Aug 27 '18 at 18:12
• @William The question in your comment, "set of what?" was already answered in WarTurtle's answer: "an arbitrary set". – Andreas Blass Aug 27 '18 at 18:14
• @William $X$ can be anything; it doesn't have to be a set of numbers. – Sir_Math_Cat Aug 27 '18 at 18:14
• @WarTurtle Now that I think of it, it makes sense. +1 – William Aug 27 '18 at 18:17

It depends on the context. If you're taking a first course in calculus, it's usually assumed that all functions have a subset of real numbers as their domain.

But if it's a course in multivariable calculus, or complex analysis, or topology, then the domains may be subsets of the space, the complex plane, or some other arbitrary topological space.

When looking for definitions and conventions, it's better to use one reference (in this case, your textbook) and follow it. Other sources may not match it, for reasons of convention or context.

• Tell me something, why does Math depend on contexts? Isn't everything in math properly defined? – William Aug 27 '18 at 18:27
• Contexts are important because audiences vary. Students in a first year calculus course do not need to know about topological spaces to understand functions of a real variable. Everything in math is properly defined, but not all definitions agree. For instance, what is your definition of the set of natural numbers $\mathbb{N}$? In some books you will find it defined to be the positive integers, and in others the nonnegative integers. There are good reasons for either convention. – Matthew Leingang Aug 27 '18 at 18:47