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?
It tells you whether the end point of the interval is included
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:
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