It is possible to define a function which is one-to-one and has a half-open interval domain but a closed interval range. However, one of the simplest ways to do so uses an infinite number of line segments! Such functions are usually described only in university-level math courses with names like real analysis and set theory. I suspect your teacher made a mistake in stating the problem. But technically, he was correct that there is such a function.
Dewie B.
asked 09/18/19Example of a one-to-one function with required domain and range
I missed a question on my last quiz and I don't get why.
"Draw the graph of a function which is one-to-one and has domain [-5,4) and range [-8,5]."
I didn't see how that is possible so I said "no such function" but I got marked wrong. He didn't tell me what the right answer is though.
2 Answers By Expert Tutors

Edward A. answered 09/19/19
High School Math Whiz grown up--I've even tutored my grandchildren
Dewie, here’s a simple way to show such a function:
draw a straight line segment from (-5,-8) to (4,5).
This is a function because for every x-value, there is only one y-value.
The function is 1-1 because no two x-values have the same y-value
There are lots of other 1-1 functions on that domain and range, but this is one of them.
if you have any questions, please ask.

Edward A.
Sorry Dewie, you were careful in your notation and I was careless in my reading and in my answer. Yes, [-5,4) means -5 is included, but not 4. And yes, a line segment as I wrote it would imply 4 was in the domain. At this point, I’m inclined to believe there was a typographical error, and it should have been [-5,4]. But that doesn’t help your quiz score. (It’s extremely hard to imagine how anyone could, with paper and pencil, graph a function over a half-open domain.)09/20/19
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Dewie B.
I still don't see it. The domain is supposed to be [-5,4) and I thought the parentheses means 4 isn't in the domain but wouldn't a segment from (-5,-8) to (4,5) make 4 in the domain? Unless you mean the (4,5) is an open circle but then that makes the range wrong. I'm confused.09/19/19