Question: what is the difference between square brackets and parentheses in math?
Answer: A bracket means that end of the range is inclusive -- it includes the element listed. A parenthesis means that end is exclusive and doesn't contain the listed element. So for [first1, last1) , the range starts with first1 (and includes it), but ends just before last1 .