Is it possible for a function to have a domain and range that are both restricted? If so, sketch a possible

function. If not, explain why not.

Yes, it is possible for a function to have a domain and range that are both restricted. One possible example is a function where the domain consists of a closed interval (for example, [0, 1]), and the range also consists of a closed interval (for example, [2, 4]).

Here is a sketch of such a function:

|
4 | ┐
| │
| │
| │
| └──────┐
| │
2 |─┬───────────────────┴──────────┐
| │
+─────────────────────────────────┘
0 1

In this example, the function maps values from the domain [0, 1] to the range [2, 4].