Here is a small piece of arithmetic: half of 2, plus a fifth of 3, plus 1. That comes to 2.6. Every chapter of this course does sums like this one, over and over, with bigger lists of numbers. So why do math books fill those sums with letters like x and w instead of plain numbers? Because the same recipe gets used again with new numbers, thousands of times. A letter is a blank on the recipe card. This section teaches you to read a formula, fill in its blanks, and do the steps in the right order.
Picture a recipe card in a kitchen. It says: half a cup of the first ingredient, a fifth of a cup of the second, and one spoon of sugar. The card never says which foods. Those are the blanks. Today the first item is 2 and the second is 3. Half of 2 is 1. A fifth of 3 is 0.6. Add the spoon of sugar: 1 plus 0.6 plus 1 makes 2.6.
Math writes that card as y = 0.5\,x_1 + 0.2\,x_2 + 1. The letters x_1 and x_2 are the two blanks, "item one" and "item two." The tiny 1 and 2 are just name tags. Writing 0.5 right next to x_1 means "half of it." The y is the name of the finished dish. "Plugging in" is filling the blanks with today's numbers.
There is one rule the card does not print, because every cook knows it. Measure each item before you mix. In math words: multiply before you add. If you add first, you get the wrong dish. Brackets are the one special case. They say "do this part first, no matter what."
Start with the numbers alone. 0.5 \times 2 = 1. Then 0.2 \times 3 = 0.6. Add the two results and one more: 1 + 0.6 + 1 = 2.6. Three ingredients, one answer.
A number is a fixed amount, like 2 or 0.5. A letter in a formula is a blank that a number will fill later. A formula is a recipe written with numbers, letters, and operation signs. The letters that change from one use to the next are called variables.
Write the recipe above with two blanks: y = 0.5\,x_1 + 0.2\,x_2 + 1. Read it symbol by symbol. x_1 ("x one") is the first ingredient, and x_2 ("x two") is the second. The small numbers are labels, not powers. 0.5\,x_1 means 0.5 times x_1; a number written next to a letter means multiply. y is the name of the answer. Plugging in means replacing each letter with its number: with x_1 = 2 and x_2 = 3, y = 0.5(2) + 0.2(3) + 1 = 1 + 0.6 + 1 = 2.6.
The steps have a fixed order, called the order of operations. First, anything inside parentheses. Then powers. Then multiplication and division, left to right. Then addition and subtraction, left to right. In 0.5(2) + 0.2(3) + 1 the two multiplications happen before any adding. Reading the formula strictly left to right, adding as you go, gives (1 + 0.2) \times 3 + 1 = 4.6, which is wrong. Parentheses override the order: 0.5(2 + 3) = 2.5, not 1 + 3.
Three ingredients, added one at a time
Read the line from 0 to the right. The first jump is 0.5 times 2, the second is 0.2 times 3, the third is the plain 1. Before you look at the last mark, say out loud where the three jumps should land.
Loading interactive…
Multiply first, then add
The first box multiplies by 0.5 and the second adds 1.6, the two steps of the recipe when the second ingredient is fixed at 3. Work out on paper what the chip 2 becomes, then click it and press Check. Afterwards press Swap and send 2 again: adding first gives a different number, and that is the whole point of the order of operations.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
Same digits, different answers
Each card uses the digits 2, 3, and 4 with one plus sign and one times sign. Work out each value using multiply-before-add, then sort each card into the bin with its value.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
Worked example
Basic: fill in the two blanks
-
1
The recipe is y = 0.5\,x_1 + 0.2\,x_2 + 1. Find y when x_1 = 2 and x_2 = 3.
-
2a number beside parentheses means multiply
Replace each letter with its number. Keep the operation signs exactly where they were: y = 0.5(2) + 0.2(3) + 1.
a number beside parentheses means multiply
-
3
Do the two multiplications first: y = 1 + 0.6 + 1.
-
4
Now add, left to right: \boxed{y = 2.6} Check: half of 2 is 1, a fifth of 3 is a bit more than half, plus 1. A little over 2.5 is right.
Worked example
Typical: the same recipe, new ingredients, one of them negative
-
1
Same recipe, y = 0.5\,x_1 + 0.2\,x_2 + 1. Find y when x_1 = -4 and x_2 = 5.
-
2
Plug in. Put the negative number in parentheses so the minus sign stays attached to it: y = 0.5(-4) + 0.2(5) + 1.
-
3
Multiply first. Half of -4 is -2. A fifth of 5 is 1: y = -2 + 1 + 1.
-
4
Add left to right: -2 + 1 = -1, then -1 + 1 = 0. \boxed{y = 0} A negative ingredient can cancel the others. Nothing went wrong; zero is a perfectly good answer.
Worked example
Common trap: adding as you go
-
1
A student reads 0.5 \times 2 + 0.2 \times 3 + 1 left to right, doing each operation the moment they reach it. What do they get, and what is the correct value?
-
2the wrong belief: "do the signs in the order you read them"
Left to right, adding as they go: 0.5 \times 2 = 1. Then 1 + 0.2 = 1.2. Then 1.2 \times 3 = 3.6. Then 3.6 + 1 = 4.6.
the wrong belief: "do the signs in the order you read them"
-
3
The order of operations says multiplications come before additions, no matter where they sit. Both products first: \underbrace{0.5 \times 2}_{1} + \underbrace{0.2 \times 3}_{0.6} + 1.
-
4
Then add: 1 + 0.6 + 1. \boxed{2.6,\ \text{not } 4.6} The student multiplied 1.2 by 3, but the 3 only belongs to the 0.2 beside it. Each times sign glues together only its two neighbours.
Where this goes next
This course, Chapter 1 and Chapter 2
The recipe 0.5\,x_1 + 0.2\,x_2 + 1 = 2.6 is not a warm-up you will leave behind. Chapter 1, in the section "A linear model is a weighted sum," uses exactly these numbers as the first prediction the course ever makes: 2 and 3 go in, 2.6 comes out. The 0.5 and 0.2 get a name there, the "weights," and the lonely +1 gets the name "bias." Chapter 2, in "A neuron is a weighted sum with a switch," feeds the same 2.6 into one more step and gets 0.931. Every later chapter multiplies longer lists and adds more terms, but the move never changes: plug in, multiply first, then add. If you can do this section's arithmetic without hesitating, the first four chapters have no surprises in them.
Check your understanding (counts toward your progress)
Write the recipe y = 0.5\,x_1 + 0.2\,x_2 + 1 with x_2 = 3 plugged in but x_1 left as a letter. Simplify the numbers. Use x1 for x_1.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Any equivalent form counts — 2x+3, 3 + 2·x, … Use the keypad below the field for fractions, roots, and other symbols.
Why
A fifth of 3 is 0.6, and 0.6 + 1 = 1.6. So with the second blank filled, the recipe is 0.5\,x_1 + 1.6: one blank left.
Correct answer
Also accepted:
Why
Find y = 0.5\,x_1 + 0.2\,x_2 + 1 when x_1 = -6 and x_2 = 10.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Half of -6 is -3. A fifth of 10 is 2. Then -3 + 2 + 1 = 0.
Correct answer
Also accepted:
Why
The recipe y = 0.5\,x_1 + 0.2\,x_2 + 1 gives y = 4 when x_2 = 5. What was x_1?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
A fifth of 5 is 1, so 0.5\,x_1 + 1 + 1 = 4, which means 0.5\,x_1 = 2 and x_1 = 4. Working a recipe backwards is just undoing each step.
Correct answer
Also accepted:
Why
Check your understanding (counts toward your progress)
Compute 2 \times 3^2.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Powers come before multiplication: 3^2 = 9, then 2 \times 9 = 18. Squaring the 6 would give 36, which is (2 \times 3)^2, a different expression.
Correct answer
Also accepted:
Why
A student computes 0.5 \times 4 + 0.2 \times 10 + 1 as 3 \times 10 + 1 = 31. What went wrong?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
The +1 is there in their answer. The error came earlier.
0.5 \times 4 = 2 was done correctly. The slip came right after it.
The correct value is 2 + 2 + 1 = 5, a long way from 31.
Why
Each times sign binds only its two neighbours. 0.5 \times 4 = 2 and 0.2 \times 10 = 2 must both be done before any adding: 2 + 2 + 1 = 5. The student added 2 + 0.2 first and then multiplied the wrong thing by 10.
Practice: Plugging in and the order of operations, one step at a time (5 problems · doesn’t affect your progress)
In the recipe y = 0.5\,x_1 + 0.2\,x_2 + 1, what does writing 0.5 directly beside x_1 mean?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
A number written next to a letter means multiply. The blank stays a blank until a number is plugged in.
Multiply 0.5 by whatever number fills x_1.
Evaluate y = 0.5\,x_1 + 0.2\,x_2 + 1 when x_1 = 8 and x_2 = 10.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
4 + 2 + 1 = 7.
Correct answer
Also accepted:
Why
Evaluate 5 + 2 \times 6 - 4 using the order of operations.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Multiply first: 2 \times 6 = 12. Then left to right: 5 + 12 = 17, 17 - 4 = 13.
Correct answer
Also accepted:
Why
Work out y = 0.5\,x_1 + 0.2\,x_2 + 1 when x_1 = -2 and x_2 = -5.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Half of -2 is -1, a fifth of -5 is -1, and -1 - 1 + 1 = -1.
Correct answer
Also accepted:
Why
Compute 0.5 \times (2 + 0.2 \times 3) + 1. (Compare it with 0.5 \times 2 + 0.2 \times 3 + 1 = 2.6 from the lesson.)
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Inside the parentheses first: 0.2 \times 3 = 0.6, then 2 + 0.6 = 2.6. Half of that is 1.3, plus 1 is 2.3. The parentheses moved the 0.5 onto the whole bracket, which changed the answer.
Correct answer
Also accepted:
Why