Deep Learning · MT2 · section

Brackets before everything else

Mathematics revision

1. Brackets tell us what must stay together

An expression is a written calculation. Brackets group part of that calculation. In 1 ÷ (1 + 3), the whole quantity 1 + 3 is the divisor, so calculate it before dividing.

Follow the bracketed calculation from left to right. The bottom line shows why removing brackets changes the answer. Tap the diagram to enlarge.
\frac1{1+3}=\frac14=0.25LaTeX: \frac1{1+3}=\frac14=0.25

Removing the brackets changes the calculation. In 1 ÷ 1 + 3, division comes before addition: 1 ÷ 1 = 1, then 1 + 3 = 4.

1\div1+3=1+3=4LaTeX: 1\div1+3=1+3=4

2. Use this order for the expressions in this course

First calculate inside brackets. Then evaluate powers and roots. Then do multiplication and division, reading left to right. Finally do addition and subtraction, again reading left to right. Multiplication does not have priority over division; they share a level.

For 8 ÷ 2 × 3, calculate 8 ÷ 2 = 4 and then 4 × 3 = 12. Do not change it into 8 ÷ (2 × 3).

3. A full example with brackets and a power

Question. Evaluate (2 + 3)² ÷ 5.

Answer — step by step.

Given

Evaluate (2 + 3)² ÷ 5.

To find

Evaluate each expression and state its value.

Formula — which one and why

Order of operations. Grouping decides which operation is performed first. Evaluate brackets, then powers, then multiplication/division, then addition/subtraction.

A minus sign inside brackets belongs to that number. Subtracting a negative changes the operation to addition.

a-(-b)=a+bLaTeX: a-(-b)=a+b

Yaad rakhne ka cue: Bracket pehle; phir power; phir multiply/divide; aakhir mein plus-minus.

Solution — step by step

Step 1: finish the brackets: 2 + 3 = 5. The expression becomes 5² ÷ 5.

Step 2: square the bracket result: 5² = 25. The expression becomes 25 ÷ 5.

Step 3: divide: 25 ÷ 5 = 5.

\begin{aligned}\frac{(2+3)^2}{5}&=\frac{5^2}{5}\\&=\frac{25}{5}\\&=5\end{aligned}LaTeX: \begin{aligned}\frac{(2+3)^2}{5}&=\frac{5^2}{5}\\&=\frac{25}{5}\\&=5\end{aligned}

4. A full example without grouping the addition

Question. Evaluate 2 + 3² × 4.

Answer — step by step.

Given

Evaluate 2 + 3² × 4.

To find

Evaluate each expression and state its value.

Formula — which one and why

Order of operations. Grouping decides which operation is performed first. Evaluate brackets, then powers, then multiplication/division, then addition/subtraction.

A minus sign inside brackets belongs to that number. Subtracting a negative changes the operation to addition.

a-(-b)=a+bLaTeX: a-(-b)=a+b

Yaad rakhne ka cue: Bracket pehle; phir power; phir multiply/divide; aakhir mein plus-minus.

Solution — step by step

Step 1: calculate the power: 3² = 9. Keep the other numbers where they are: 2 + 9 × 4.

Step 2: multiply: 9 × 4 = 36. The expression becomes 2 + 36.

Step 3: add: 2 + 36 = 38.

\begin{aligned}2+3^2\times4&=2+9\times4\\&=2+36\\&=38\end{aligned}LaTeX: \begin{aligned}2+3^2\times4&=2+9\times4\\&=2+36\\&=38\end{aligned}

5. A fraction bar groups the whole denominator

In a printed fraction, everything below the bar belongs to the denominator. When entering that fraction in a single calculator line, put brackets around the complete denominator. A printed fraction with 1 above and 1 + 3 below must be entered as 1 ÷ (1 + 3).