# When do you use the brackets [ x, y ] and when do you use the parenthesis ( x, y) when writing the domain and range of a function in interval notation?

The difference is whether the end of the interval in question includes the end value or not. If it includes it, it is called "closed", and is written with a square bracket: [ or ]. If it doesn't include it, it is called "open", and is written with a round bracket: ( or ).
An interval with both ends open or closed is called an open or closed interval. If one end is open and the other closed, then the interval is called "half-open". For example, the set $\left[0 , 1\right)$ includes all numbers $x$ such that $x \ge 0$ and $x < 1$.