In general, a function is given as shown below
![\begin{gathered} f:A_1\rightarrow A_2 \\ f(x)\in A_2 \\ A_1,A_2\rightarrow sets \\ A_1\rightarrow\text{ domain} \\ A_2\rightarrow codomain \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/avqs9j6cczf8tpkgf6ntfmtft22fggs2z9.png)
The domain of the function consists of the values that x can take in the example above. All the values of x make up all the possible input values, and x is also known as the independent variable.
Therefore, the domain consists of the input values and the values for the independent variable.
On the other hand, the range consists of the values for the dependent variable or the output values.