Deep Learning · MT2 · section

Drill 1 Signs and brackets

MT2 numerical practice from direct to mixed

Question

Question. Evaluate 2−0.1 × (−3), then (2−0.1) × (−3). Explain why they differ.

Answer — step by step

Given

Expressions: 2−0.1×(−3) and (2−0.1)×(−3).

To find

Evaluate both and explain the effect of grouping.

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

Meaning of the calculation

A minus sign can mean subtraction or a negative number. Brackets tell us which part belongs together. These two expressions have different brackets, so they describe different calculations.

Rule used

Do brackets first, then multiplication, then addition or subtraction. Subtracting a negative number means adding its positive size.

Step 1: First expression: multiply before subtracting.

2-0.1\times(-3)LaTeX: 2-0.1\times(-3)

First multiply: a positive number times a negative number is negative.

0.1\times(-3)=-0.3LaTeX: 0.1\times(-3)=-0.3

Put this complete result back into the expression. Keep its negative sign inside brackets.

2-(-0.3)=2+0.3=2.3LaTeX: 2-(-0.3)=2+0.3=2.3

Step 2: Second expression: finish the bracket first.

2-0.1=1.9LaTeX: 2-0.1=1.9

Now multiply the whole bracket result by negative 3.

1.9\times(-3)=-5.7LaTeX: 1.9\times(-3)=-5.7

Final answer: first expression = 2.3; second expression = −5.7. In a weight update, multiply learning rate by gradient first, then subtract that product from the old weight.