What do the square brackets mean in $[5-(6-7(2-6)+2)]+4$?

While watching a youtube video about a Simpsons math episode at 1:27 there's a puzzle that includes square brackets.

$$[5-(6-7(2-6)+2)]+4$$

Apparently the answer is $-27$ which I can't figure out how to arrive at that answer. I've Googled that the square brackets mean intervals. But then I don't understand the context of this question as surely an interval should be two numbers separated by a comma?

How do you arrive at $-27$?

• They mean the same than the parantheses, they're just there for better readability. – Jonathan Feb 21 '16 at 7:59
• Square brackets, "curly" brackets, and (so help me) occasionally even diagonal brackets are used as alternatives to parentheses when too many nested parentheses might make it hard to tell which "block" of symbols is "inside" which delimiters. As for the notation you saw on your Google search, a closed interval would contain two numbers separated by a comma, thus $\ [ a \ , \ b ] \$ and is "interval notation" for the "inequality notation" $\ a \ \le \ x \ \le \ b \$ . – colormegone Feb 21 '16 at 8:05
• Square and round brackets are also used to denote intervals, and round brackets are also used to denote ordered pairs. And you will also see $(x_n)_n$ which means $(x_n)_{n\in N}$ which means the sequence $(x_1,x_2,x_3,...)$ – DanielWainfleet Feb 21 '16 at 11:04

In this case, it is a matter of legibility; the square brackets are the same as round parentheses;

$$[5-(6-7(2-6)+2)]+4 = [5-(6-7(-4)+2)]+4 = [5-(6+(28)+2)]+4 = [5-(36)]+4 = [-31+4] = -27.$$ Note that there are instance where the square brackets do mean something different like nearest integer function.

Yes, interval notation must contain a comma;
for example, if $a,b\in \mathbb R$, then $$[a,b] = \{x\in \mathbb R:a\leq x\leq b\}.$$

• Can't believe I've never seen a mix of different bracket types as parenthesis before. I wonder if it's a UK / US difference of preference thing, although I've been googling that and can't find anything. – Ally Feb 21 '16 at 8:28
• Some answers are very good however I must accept one and since you've added an explanation on where square brackets can mean something different I think this is the best answer. Thanks – Ally Feb 21 '16 at 8:30
• It's not a UK/US thing. Brackets are used the same way all over the world. – bubba Feb 21 '16 at 8:41
• @Ally I believe there is a convention: Use square brackets on the out most nesting and parentheses on the inner most nestings. However, I don't believe it's a hard and fast rule. Also, you might see a mix with braces too when evaluating an expression, like $[2+3(8-\{4-2\})]$. Again, the brackets/parentheses/braces would mean the same thing. I do not believe it is a matter of UK/US custom; you'll see commonly see it if you study more math. Thanks for accepting. I would not have answered if I did not believe I could contribute something else/extra. Good luck. – Em. Feb 21 '16 at 8:44
• @SS_C4 I am quite susceptible to typographical errors, hehe. Thanks. – Em. Feb 21 '16 at 10:06

It’s just a parenthesis; the use of square brackets instead of round is to make it easier to match up corresponding left and right brackets.

\begin{align*} [5-(6-7(2-6)+2)]+4&=[5-(6-7(-4)+2)]+4\\ &=[5-(6-(-28)+2)]+4\\ &=[5-(6+28+2)]+4\\ &=[5-36]+4\\ &=-31+4\\ &=-27 \end{align*}

This is simple arithmetic. The square brackets here just indicate that the expressions inside them must be evaluated first. $$[5-(6-7(2-6)+2)]+4=[5-(6-7(-4)+2)]+4=[5-(6+28+2)]+4=[5-(36)]+4=[-31]+4=-27$$

The square brackets mean here just regular parentheses. To make it easily readable the outer parentheses sometimes are substituted to square and the curly brackets. As for the result, start with innermost parentheses and you will get the desired answer.

Square brackets in this context mean the same thing as round parentheses. Would it help you if it was written as $$\left(5-(6-7(2-6)+2)\right)+4=5-(6+28+2)+4=5-36+4=-27$$ You can probably see why they are used from this; as too many $\color{red}{(}$'s make the expression unclear and therefore harder to process. So the $\color{blue}{[}$'s are used.

Or if you really prefer the round parentheses you can just make them larger:

$$\bigg(5-\Big(6-7(2-6)+2\Big)\bigg)+4=5-(6+28+2)+4=5-36+4=-27$$ Start by computing the inner-most (smallest) bracket and work your way outwards.

The other context apart from intervals as you mentioned in your post; like for some $x$ $$[0,1]\implies 0\le x \le 1$$ is that the square brackets are used to return the dimensionality of some formula eg. \begin{align}[\text{Speed}]=\mathrm{ms}^{-1}\ & =\quad\text{meters per second}\end{align}

Here square brackets means parentheses but not interval. While solving these type of questions first solve the expression in ( ) next solve the expression in flower bracket i.e. { } next sole the expression on square brackets i.e. [ ]. Please don't take [.] as greatest integer function. In this problem we must start computing from inner most bracket to outwards. $$[5-(6-7(2-6)+2)]+4$$ $$=[5-(6+28+2)]+4$$ $$=[5-36]+4$$ $$=-31+4$$ $$=-27$$

$$[5-(6-7(-4)+2)]+4 \implies [5-(6+28+2)] + 4 \implies [5-36] +4 \implies -27$$

• If your "->" means "equals", then you should just write "$=$". – bubba Feb 21 '16 at 8:42