# dan's prealgebra lesson

A friend of mine once said, "I had algebra, it's that 'a + b = c' stuff." When I asked, the friend couldn't explain what a, b, and c were, what they might have meant, or why you would even "add letters" in the first place. Patty Leitner and I decided to write a book about this very thing:

Prealgebra, Mathematics for a Variable World,
by Daniel Bach and Patricia Leitner, Third edition, McGraw-Hill, 2006.

# Variables

The main idea is that in algebra, a variable represents a number (or name, etc.) whose value might vary; hence the name!

Example:  My sister Emily is 4 years older than me, so:

When I was 10, she was 10 + 4 = 14 .

When I was 17, she was 17 + 4 = 21 .

When I was (Dan's age), she was (Dan's age) + 4 .

We can say (Emily's age) = (Dan's age) + 4 ,

or simply E = D + 4 , where E = Emily's age, and D = Dan's age .

The quantities "Dan's age", "Emily's age", "D", and "E" are variables because they can represent many different numbers.

# Laws of Arithmetic

You know 3 + 5 = 8. Does it matter what order you add?

No; 5 + 3 = 8 too.  So  3 + 5 = 5 + 3

Also (20) + (–3) = (–3) + (20); both are 17.

So we can pretty much say that

a + b = b + a , for any numbers a and b.

This is the commutative law of addition. (when you commute, you go back and forth.)

Which other operations commute? Try subtraction, multiplication, division; even exponentiation. Think about it; I'll wait.

Ok, not subtraction: 7 ­– 3 = 4 , while 3 ­– 7 = –4 .

Multiplication is good: 6 x 8 = 8 x 6 = 48, so we can say

a x b = b x a.

But this x might look like a variable, so let's write a * b = b * a , or even better,

a b = b a   (the commutative law of multiplication.)

Example:  What about adding three numbers? Which do you add first in 3 + 4 + 5? Well,

(3 + 4) + 5 = (7) + 5 = 12 , and

3 + (4 + 5) = 3 + (9) = 12 . It works here, and in general:

(a + b) + c = a + (b + c)   (the associative law of addition.)

This ought to work for multiplication, but we'd better check:

(5*4)*6 = 20*6 = 120 and 5*(4*6) = 5*24 = 120 ; in general

(a * b) * c = a * (b * c)   (the associative law of multiplication.)

For simplicity we write (ab)c = a(bc), both are the same as just abc.

Let's see what happens if we do  4 (7 + 3)  by looking in the parentheses first:

4(7 + 3) = 4(10) = 40 . This follows the order of PEMDAS.

But separately, 4(7) + 4(3) = 28 + 12 = 40, too, as seen in this picture:

```... ....... This is either a
... ....... 4 x 10 rectangle of
... ....... dots, or a 4 x 3
... ....... and a 4 x 7.
```

Let's write this as 4(7 + 3) = 4(7) + 4(3) . We say we "distribute" the 4 to the terms inside.

This translates to the general case :

a (b + c) = a b + a c   (called the distributive law.)

# Like and Unlike Terms

Ever hear the phrase "That's like comparing apples to oranges!"?
Well, that's a lot like the problem you'll have if you try to add or subtract "unlike" terms like 3x and 4y. Huh? Read on!

First, what are "terms"? Then we'll see what "like terms" are.

A term is a product of a number and some variables, like 3xy or –4x^2.

If the letter part is the same in two terms, they're called like terms:

3x and 5x are like terms.

3x and 5y are unlike terms; so are 5ab and 7ab^2. (that's b squared, as in "b there or b^2".)

If two terms are "like" then you can add or subtract them. Notice the use of the "distributive law" (see above):

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

We can keep the same letter part and add the coefficients (the numbers in front of the variables).

But unlike terms can't be added: (The symbol ≠ means "not equal to.")

3x + 4y ≠ 7x or 7y or 7xy,  and  6 + 5x ≠ 11x  (multiply before adding).