I was recently trying to solve a basic Algebra II math problem that relates to Composite Functions. The question is as follows:

Find $[f\circ g](x)$ and $[g\circ f](x)$ if they exist. State the domain and range for each composed function.

The equations that were given were as follows:

$$f(x) = 2x$$ $$g(x) = x + 5$$

Obviously, to solve this problem, I did the following:

$$f(g(x)) = 2(x + 5)$$ $$[f\circ g](x) = 2x + 10$$ $$g(f(x)) = (2x) + 5$$ $$[g\circ f](x) = 2x + 5$$

When it came to finding the domain and range, I assumed that both would be all real numbers for both composite functions. However, when I checked the answer key, the domain for both composite functions were all real numbers, but the range for the first composite function was all even numbers, and the range for the second function all odd numbers. Now I understand the reasoning behind the range if the domain was all real integers, but the domain is all real numbers, so the range couldn't possibly be limited to even and odd numbers, since real numbers like $\sqrt{3}$ would obviously not result in an even or odd number for either function. Hence, my question:

Why are the ranges for both composite linear functions not all real numbers?

Please forgive me for breaking any rules of this website; This is my first time posting, and I tried to be as clear as possible!


Sorry for being unclear before, but it seems that answers are assuming that the brackets are the entier function. However, this is just the notation that the book uses. Here is an example directly from the book:

$f(x) = 2a - 5, g(x) = 4a$. Find $[f\circ g](x)$ and list the domain the range of [the] composite function.

$$[f\circ g](x) = f[g(x)]$$ $$= f(4a)$$ $$= 2(4a - 5)$$ $$= 8a - 5$$ $$D = \{\text{all real numbers}\}$$ $$R = \{\text{all real numbers}\}$$

SCREENSHOT enter image description here

  • $\begingroup$ it is all real numbers, you are right. $\endgroup$
    – Yimin
    Commented Jan 10, 2018 at 22:47
  • $\begingroup$ That's it, there is nothing more to it? The book was just wrong? Wow... $\endgroup$ Commented Jan 10, 2018 at 22:48
  • $\begingroup$ According to the answer by @The Phenotype, your bracket should be $\lfloor\cdot\rfloor$, then the book is right. $\endgroup$
    – Yimin
    Commented Jan 10, 2018 at 22:53
  • $\begingroup$ No, that is just the notation that the book uses. $\endgroup$ Commented Jan 10, 2018 at 22:54
  • 1
    $\begingroup$ @ArnavBorborah Then either the book is wrong (which I doubt in this specific case) or the book uses the same notation for different things: hopefully the book has an appendix for notation, so I suggest you take a look at that as it may clear things up. $\endgroup$ Commented Jan 10, 2018 at 23:01

1 Answer 1


You calculated $(f\circ g)(x)$, but they are asking for $[f\circ g](x)$, where $[\cdot]$ is the entier function.

That means that $[f\circ g](x) = 2[x] + 10=2n+10$ for some $n\in\mathbb{Z}$ and that $[g∘f](x)=2x+5=2[x] + 5=2n+5$ for some $n\in\mathbb{Z}$, which means that the first has the even integers as range and the second odd integers as range.

  • $\begingroup$ Wow, I missed that too. Good point! Usually, the bracket should be like $\lfloor\cdot\rfloor$. $\endgroup$
    – Yimin
    Commented Jan 10, 2018 at 22:52
  • $\begingroup$ Wow, that actually seems correct to me mathematically, but that isn't the answer, since that is just the notation that my textbook uses. Plus, I haven't learned of the entier function in any of my previous textbooks or classes. $\endgroup$ Commented Jan 10, 2018 at 22:53
  • $\begingroup$ Yes, I meant entier function (just forgot the name). I edited it. $\endgroup$ Commented Jan 10, 2018 at 22:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .