← mapAlgebra Core

Variables & Expressions

⚗ Dr. Möbius, from the lab

A variable is not a mystery and it is not magic — it is a number whose name tag fell off. Every single arithmetic law you built in Bedrock still applies, word for word, and anyone who taught you to treat letters like alien life forms deserves to be locked out of my lab.

THE BIG IDEA

A variable is a placeholder for a number; every arithmetic law extends unchanged to expressions built from variables.

The name tag fell off

In the Bedrock stratum you built real numbers from scratch — N\mathbb{N}, then Z\mathbb{Z}, then Q\mathbb{Q}, then R\mathbb{R}. You know what those things ARE. Now suppose I hand you a number but tape a sticky note labelled xx over its face so you can't read it. That's a variable. The number is still there. It still obeys every law you derived. The only thing missing is the specific value.

This sounds trivially obvious, and it is — which is why it's the secret weapon of algebra. Because the laws are about STRUCTURE, not about specific values, every truth that holds for all numbers automatically holds for expressions built from variables. When the Laws of Arithmetic node told you that a(b+c)=ab+aca \cdot (b + c) = a \cdot b + a \cdot c for all real numbers aa, bb, cc, it silently handed you the engine of all of algebra. Every manipulation you will ever do in this stratum is the distributive law, the commutative law, or the associative law from Bedrock, wearing a different costume.

Translating English into algebra

The Federation of Boring Textbook Authors wants you to translate "three less than twice a number" into 32x3 - 2x and just accept it. That's wrong, and you should be furious. Let's do it properly.

Let nn be the unknown number. "Twice a number" means 2n2 \cdot n, i.e., 2n2n. "Three less than" means you subtract three from that result: 2n32n - 3. Done. The phrase describes a sequence of operations; translate each operation in the order described, left to right, and you cannot go wrong.

Common phrase-to-algebra dictionary:

  • "the sum of aa and bb": a+ba + b
  • "five more than xx": x+5x + 5
  • "four times a number, decreased by seven": 4n74n - 7
  • "the quotient of yy and three": y/3y / 3
  • "the square of the sum of xx and two": (x+2)2(x+2)^2

The last one is crucial. Order and parentheses encode the STRUCTURE of the phrase. "x2+2x^2 + 2" is something completely different from "(x+2)2(x+2)^2". Get this wrong and every word problem you ever see will quietly hand you a wrong equation while you smile and nod.

Like terms and distributivity, naked

"Like terms" sounds like a grammar rule some dusty pedagogue invented. It isn't. It's the distributive law wearing jeans.

3x+5x=(3+5)x=8x.3x + 5x = (3 + 5)x = 8x.

That middle step IS distributivity — the law a(b+c)=ab+aca(b+c) = ab + ac run in reverse, with x=ax = a, 3=b3 = b, 5=c5 = c. You're not "combining like terms" according to some mystical rule. You're factoring out xx because xx is a common factor, and then adding the coefficients because those are just numbers.

Consequence: you can combine 3x3x and 5x5x but you cannot combine 3x3x and 5x25x^2. Why? Because xx and x2x^2 are different beasts; there's no single factor to pull out. Trying to add 3x+5x23x + 5x^2 is like trying to add 3 wolves and 5 Tuesdays — they share nothing.

This same distributive engine is why (x+2)(x+3)(x+2)(x+3) expands the way it does — we'll dismantle that in the Polynomials lesson. File it away.

Evaluating expressions: parentheses are load-bearing

To evaluate 2x23x+12x^2 - 3x + 1 at x=4x = -4: replace every xx with (4)(-4), parentheses included, ALWAYS.

2(4)23(4)+1=216+12+1=32+12+1=45.2(-4)^2 - 3(-4) + 1 = 2 \cdot 16 + 12 + 1 = 32 + 12 + 1 = 45.

The parentheses around 4-4 are not decoration. Without them, 42-4^2 reads as (42)=16-(4^2) = -16, which hands you the wrong answer and nobody warns you. Wrap every substituted value in parentheses, every time, as a physical reflex. This rule has saved more grades than any other single habit in the entire subject.

Expression vs equation: phrase vs sentence

An expression is a mathematical phrase: 2x+32x + 3, x25x+6x^2 - 5x + 6, 3x1\frac{3}{x-1}. It doesn't claim anything; it just describes a quantity. You evaluate it, you simplify it, you stare at it.

An equation is a mathematical sentence: 2x+3=112x + 3 = 11. It makes a claim: "there exists a value of xx that makes the left side equal to the right side." You solve it. You prove it. The next lesson is entirely about equations.

The distinction matters because the tools are different. You simplify expressions; you solve equations. You never "solve" 2x+32x + 3 for anything — there's nothing to solve, it's a phrase. You never "simplify" 2x+3=112x + 3 = 11 — it already says exactly what it says.

🔬 SPECIMENS (worked examples)

Worked example 1 — translating a phrase and evaluating

Write an algebraic expression for "the square of five more than a number nn", then evaluate it at n=3n = 3.

Translate. "Five more than a number nn" is n+5n + 5. "The square of" that quantity means we square the whole thing: (n+5)2(n+5)^2.

Evaluate at n=3n = 3. Replace nn with (3)(3) — parentheses on:

(3+5)2=82=64.(3 + 5)^2 = 8^2 = 64.

Note what would happen without correct translation: "five more than the square of nn" would be n2+5n^2 + 5, giving (3)2+5=9+5=14(3)^2 + 5 = 9 + 5 = 14. The structure of the phrase determines the structure of the expression, and that structure is encoded in the parentheses.

Worked example 2 — combining like terms the honest way

Simplify: 7x23x+4+2x2+5x17x^2 - 3x + 4 + 2x^2 + 5x - 1.

Sort by type using commutativity and associativity — both laws from Bedrock, both legal:

7x2+2x23x+5x+41.7x^2 + 2x^2 - 3x + 5x + 4 - 1.

Now apply the distributive law to each group of like terms:

x2-terms:7x2+2x2=(7+2)x2=9x2.x^2\text{-terms:}\quad 7x^2 + 2x^2 = (7+2)x^2 = 9x^2. x-terms:3x+5x=(3+5)x=2x.x\text{-terms:}\quad -3x + 5x = (-3+5)x = 2x. constants:41=3.\text{constants:}\quad 4 - 1 = 3.

Result: 9x2+2x19x^2 + 2x - 1.

Each step is justified by a named law. "Combining like terms" is not a spell — it's the distributive law, and you should be able to name it every single time.

Worked example 3 — the trap: evaluating a negative input

Evaluate f(x)=x24x+7f(x) = x^2 - 4x + 7 at x=2x = -2. A student gets f(2)=4(8)+7=11f(-2) = -4 - (-8) + 7 = 11. What went wrong, and what is the correct answer?

The student's error. Writing 22-2^2 instead of (2)2(-2)^2. The expression 22-2^2 means (22)=4-(2^2) = -4, not (2)2=4(-2)^2 = 4. Order of operations says exponentiation precedes the unary minus unless parentheses override it.

Correct computation. Substitute (2)(-2) everywhere:

f(2)=(2)24(2)+7=4+8+7=19.f(-2) = (-2)^2 - 4(-2) + 7 = 4 + 8 + 7 = 19.

Check. (2)2=4(-2)^2 = 4. 4(2)=8-4(-2) = 8. 4+8+7=194 + 8 + 7 = 19. Confirmed.

The moral: every substitution uses parentheses. Full stop. This is not optional.

☠ KNOWN HAZARDS

  • Dropping parentheses when substituting. Evaluating x2x^2 at x=3x = -3 without parentheses gives 32=9-3^2 = -9; with parentheses (3)2=9(-3)^2 = 9. Always wrap. Always.

  • Adding unlike terms. 3x+2x25x33x + 2x^2 \ne 5x^3 and it's not 5x25x^2 either — these are different quantities. The distributive law only lets you factor out an identical factor.

  • Confusing "less than" order. "Three less than xx" is x3x - 3, NOT 3x3 - x. The phrase reads from the thing being diminished, not from the amount subtracted. Read carefully; translate in order.

  • Treating an expression like an equation. "Simplify 3x+63x + 6" does not mean "set it equal to zero and find xx." You can factor: 3(x+2)3(x+2). That's it. The xx remains free.

TL;DR

  • A variable is a number with its value hidden — every arithmetic law from Bedrock applies unchanged.

  • Translating English to algebra: read operations in the order stated; parentheses encode structure, not just style.

  • Combining like terms is distributivity in reverse: 3x+5x=(3+5)x=8x3x + 5x = (3+5)x = 8x. Unlike terms cannot be combined.

  • Substitution discipline: always wrap substituted values in parentheses. f(4)f(-4) means replace xx with (4)(-4), not 4-4.

  • An expression is a phrase (evaluate/simplify); an equation is a sentence with an == that makes a claim (solve).

unlocks