Prependix C: Basic Algebra Concepts KCT logo

© 1996 & 1999 by Karl Hahn

Note: This page of Karl's Calculus Tutor has recently been reorganized.

Contents of this Page

Stuff You Should Already Know

You can't build a house from the roof down. In order to learn calculus, you have got to be able to do algebra. If you have no confidence in your algebra ability, perhaps you ought to see your advisor about putting off calculus for a semester in order to get some remediation in algebra.

If you are not sure whether you need remediation or not, I recommend that you review the following material. If it all comes back to you, great. But if it brings back bad memories of never having understood it in the first place, consider your options carefully. You could be in over your head.


Whatever you do identically to both sides of an equation is fine, providing it is not dividing it by zero. So, for example, if you have:

   y + a  =  3x + b                                               eq. c-1
You can subtract b from both sides to get:
   y + a - b  =  3x                                               eq. c-2
Then you can divide both sides by 3 to get a solution for x:
   y + a - b
              =  x                                                eq. c-3
If you know, for example, that a=14 and b=7, then for any value of y you could tell me the value of x.

If you have two equations, you can add them together (that is add the expressions to the right of the equals and add the expressions to the left of the equals and set those two expressions equal to each other).

   y + a   =  3x + b

   y       =  4x - a                                              eq. c-4
   2y + a  =  7x + b - a
By the same token, you can add the left side of the first equation to the right side of the second, and vice versa, and set those two expressions equal to each other. Likewise with subtraction and multiplication. With division, you can still do the same thing, but you must be aware that the results only count in the cases when the divisor is not zero.

The Distributive Law

When you take a sum times some multiplier, the multiplication is said to distribute over the sum. The general rule is

   a(b + c)  =  ab + ac
So, for example,
  2(x + y)  =  2x + 2y
If you take the product of two sums, you can still use the distributive law:
   (p + q)(r + s)  =  (p + q)r  +  (p + q)s  =  pr + qr + ps + qs
You can also apply the distributive law in reverse. If you have an expression like  x2 + 3x,  you can factor out the common factor of x from each of the summands and find that the expression is equal to  x(x + 3).

Division also distributes over addition:

   a + b     a   b
          =    +  
     c       c   c
And both multiplication and division distribute over subtraction:
   a(b - c)  =  ab - ac

   a - b     a   b
          =    -  
     c       c   c

Equation of a Straight Line

Whenever you have an equation in the form of

   y  =  mx + b                                                    eq. c-x1
you have the equation of a straight line. The m is called the slope. The b is called the y-intercept. Some examples are
  • y = 3x + 7      slope = 3y-intercept = 7
  • y = -0.5x + 4   slope = -0.5y-intercept = 4
  • y = x - 3       slope = 1y-intercept = -3
Whenever you graph an equation of this form in Cartesian coordinates, you always get a straight line. Furthermore, the line will never be vertical. If m is positive, the line will slope up as you follow it left to right. If m is negative, the line will slope down as you follow it left to right. The greater the magnitude of m, the steeper the line will be. If  m = 0, then the line will be horizontal. If  m = 1, then the line will slope up at 45 degrees -- that is it will go up one square for each square it goes to the right. Indeed, that is what m measures. Whatever m is, the line will go up (or down if m is negative) that number of squares for each square it goes to the right.

The y-intercept, on the other hand, tells you where the line will cross the y-axis. Whatever b is, the line will cross the y-axis at  y = b.

Often you will have an equation that is not exactly in the  y = mx + b  form, but with a little algebra, you can get it into that form.

   3x + 5y  =  15

   5y  =  -3x + 15

   y  =  -   + 3

   m  =  -      b  =  3
Sometimes you will be asked to find the equation of a line that passes through a particular point and has a particular slope. For example, finding the equation of the line that passes through  (3,5)  and has slope of 2. Clearly you can immediately see that  m = 2. So the only thing you have to do here is find b. Setting up the equation of what you already know, you have  x = 3  and  y = 5. So you substitute those values in for x and y into the equation of the line:
   y  =  mx + b

   5  =  3m + b
since  m = 2
   5  =  6 + b

   -1  =  b
And there you have the b you were looking for. So the equation of that line is
   y  =  2x - 1
The shortcut method of doing this is simply, if a line has a slope, m, and must pass through the point, (h,k), write the equation
   y - k  =  m(x - h)
In the previous example, where  h = 3 k = 5,  and  m = 2,  this leads to a very quick solution:
   y - 5  =  2(x - 3)

   y  -  5  =  2x - 6

   y  =  2x - 1
Other times you may be asked to find the equation of a line that passes through two points,  (x1,y1 and  (x2,y2). All you need to do is write
              y2 - y1
   y - y1  =          (x - x1)
              x2 - x1
which you then convert to the  y = mx + b  by doing some algebra on it. Here's an example: Find the equation of the line that passes through the points  (1,3)  and  (2,5):
             5 - 3             2
   y - 3  =        (x - 1)  =    (x - 1)
             2 - 1             1

   y - 3  =  2x - 2

   y  =  2x + 1

   m  =  2     b  =  1
Of course whenever you do such a problem, you should check it by plugging the coordinates of your points for x and y into the equation and making sure it works. If it doesn't, go back and check your work for mistakes.

Sometimes you will be asked to find the point at which two straight lines intersect. Suppose you had  y = 2x - 1  as one equation and  y = 0.4x + 3  as the other. Here is how you find the intersection point. Assuming both equations are in the  y = mx + b  form (which these two equations are), your first step is to subtract one equation from the other:

   y  =  2.0x - 1
   y  =  0.4x + 3
   0  =  1.6x - 4

  4  =  1.6x

  x  =  2.5
Once you know x, all you have to do is substitute it into either of the two equations to get y.
   y  =  2x - 1

   y  =  (2 × 2.5) - 1

   y  =  4
So the point of intersection is  (2.5,4).

Quadratic Equations

If you have an equation in the form of:

   ax2 + bx + c  =  0                                             eq. c-5
You can solve for the values of x by applying the quadratic formula:
         -b ± sqrt( b2  -  4ac )
   x  =                                                           eq. c-6

or in the more readable graphics:

         -b ± Öb2 - 4ac
   x  =                                                           eq. c-6
Click here to see the derivation of the quadratic formula)

Of course, a, b, and c need not be nice neat symbols, as I have here, but each might be an entire expression. You need to recognize when something is in the form of:

   (expression1) × x2  +  (expression2) × x  +  (expression3)   =   0
and also to be able to massage equations like it into this form. You can always solve for x when you have something like this simply by using the quadratic formula, provided the value inside the square root sign is not negative (if it is negative, you can still find solutions using complex numbers, but we won't be discussing that until well into the program).

Suppose you have

   ax2  +  bx  +  c   =   0                                       eq. c-7
and you have applied the quadratic formula and discovered that the solutions for x are x1 and x2. That means that if you take:
   (x - x1)  ×  (x - x2)                                          eq. c-8
and multiply it out, then gather up like terms, you will get:
          b       c
   x2  +    x  +                                                  eq. c-9
          a       a
For example, you have:
   2x2  -  6x  +  4   =   0                                       eq. c-10
in which a = 2, b = -6, and c = 4. Applying the quadratic formula, you get x = 1 and x = 2. If you now take:
   (x - 1) (x - 2)
and multiply it out using the distributive law (which you ought to know well), you get:
   x2  -  3x  +  2                                                eq. c-11
which agrees with the above.


A polynomial is an expression in the form of:

   Cnxn + Cn-1xn-1 + ... + C2x2 + C1x + C0                         eq. c-12
The Cindex values are called coefficients. The highest power of x, which in this case is n, is said to be the degree of the polynomial.

The quadratics given in the previous section were examples of 2nd degree polynomials. x3 + 4x2 + 6x + 3 is an example of a 3rd degree polynomial (commonly called a cubic). In that example, C3 is 1, C2 is 4, C1 is 6, and C0 is 3.

We can use the summation notation to express polynomials as well:

   å  Cjxj                                                        eq. c-13
You can add polynomials simply by adding the terms of like powers, term by term. For example:
   x3  +  4x2  +  6x  +  3

          2x2  +  6x  +  4
                                                                  eq. c-14
   x3  +  6x2  + 12x  +  7
You can subtract one polynomial from another in the same way. Adding or subtracting polynomials always gives you another polynomial. So does multiplying two polynomials, which you must do using the distibutive law. If the polynomials are of any degree higher than 2, it's a real pain in the neck. Here I show the product of two 2nd degree polynomials.
   (x2  -  x  +  1) × (x2  +  2x  -  3)  =

                 x4  +  x3  -  4x2  +  5x  -  3

                                                                  eq. c-15
A rule of thumb when multiplying polynomials is that the degree of the product is always the sum of the degrees of the two polynomials you multiplied. Here we multiplied two 2nd degree polynomials and got a 4th degree as a result.

Polynomials can be factored. That is they can be shown to be the product of other polynomials. We have already seen in the last section how we can do that with 2nd degree polynomials using the quadratic formula. The fundamental theorem of algebra states that every polynomial, no matter what its degree, can be factored into the product of polynomials, all of which have degree no greater than 2. The theorem doesn't say how to do it, and, in general, there is no sure-fire recipe that will give you a factorization. And the fundamental theorem of algebra, for being so fundamental, is not easy to prove (and I will not do so in this section). In fact, every proof I've seen requires the use of calculus. I mention the theorem and what it asserts only because your calculus professor might assume that you already know it.

When a 1st degree polynomial can be factored out of a higher degree polynomial, the 1st degree polynomial is said to represent a root of the higher degree polynomial. Recall that a 1st degree polynomial can always be written in the form of:

  A × (x - r)                                                     eq. c-16
where A and r are both real numbers. If you factor such an expression out of a polynomial, the real number, r, is said to be a root of the original polynomial.

Polynomials take a real number in and give another real number out. If you stick in a value for x and do all the exponentiation, multiplying, and adding, you will get another value. For example, if you stick in 4.0 for x into:

   x2  -  3x  +  2                                                eq c-17
you get the value 6.0. Try it. Any value you can stick in for x into any polynomial will always give you some value back. Because of this, you can graph polynomials. Fig c-1: graph of y = x^2 - 3x + 2 Figure c-1 shows the graph of eq. c-17. All 2nd degree polynomials have this characteristic shape, called a parabola, although it can be inverted, with the bowl pointing down. That happens if and only if the x2 term has a negative coefficient. If you apply the quadratic formula to eq. c-17, you find that it has roots at 1 and 2. Observe on the graph that those are precisely the x values at which the parabola crosses the x-axis. This is not a coincidence. The value of a polynomial at a root is always zero. In other words, if you substitute one of a polynomial's roots in for x and evaluate it there, you will always come up with zero. For that reason, a polynomial's roots are sometimes called its zeros.

Polynomial Long Division

You can apply a procedure called polynomial long division in order to divide a polynomial of greater degree by one of lesser degree. Suppose you wanted to divide 2x3 - 7x2 + 8x - 3 by x - 1. Set it up like this

            x - 1 ) 2x3 - 7x2 + 8x - 3
Observe that the leading term of x - 1 (that is x) divides the leading term of 2x3 - 7x2 + 8x - 3 (that is 2x3) giving a quotient of 2x2. That is what we put for the leading term of the quotient.
            x - 1 ) 2x3 - 7x2 + 8x - 3
Now multiply that quotient term by the divisor and write the negative of the result under the dividend, just as you do when you divide ordinary numbers. Then do the implied subtraction (notice that we do the implied subtraction by adding. That is because we wrote the negative of the product on the bottom line).
            x - 1 ) 2x3 - 7x2 + 8x - 3
                   -2x3 + 2x2
                     0  - 5x2
Observe that the leading terms exactly cancel. If they don't, you did something wrong. Now bring down the next term of the dividend, just as you do with digits in numerical division
            x - 1 ) 2x3 - 7x2 + 8x - 3
                   -2x3 + 2x2
                         -5x2 + 8x
and divide the leading term of the divisor into the leading term of the expression on the bottom line here.
                    2x2 - 5x
            x - 1 ) 2x3 - 7x2 + 8x - 3
                   -2x3 + 2x2
                         -5x2 + 8x
and again multiply the divisor by the new quotient term and write negative of the result under the bottom line. Then do the implied subtraction.
                    2x2 - 5x
            x - 1 ) 2x3 - 7x2 + 8x - 3
                   -2x3 + 2x2
                         -5x2 + 8x
                          5x2 - 5x
                           0  + 3x
Keep doing the procedure until you run out of dividend terms. In this case we have to do it once more.
                    2x2 - 5x  + 3
            x - 1 ) 2x3 - 7x2 + 8x - 3
                   -2x3 + 2x2
                         -5x2 + 8x
                          5x2 - 5x
                                3x - 3
                               -3x + 3
                                 0 + 0
Notice that in this case we got zero at the bottom line. That means it divided evenly. Sometimes you will not get zero at the bottom line. When that happens, whatever you're left with at the bottom line is called the remainder (just as it was when you used long division on numbers). The top line is the quotient. If you multply the quotient by the divisor and then add the remainder, you will get the dividend -- always (unless, of course, you've made a mistake).

Factoring Polynomials

Often you will be asked to factor a polynomial. This means that you must find a term or terms in the form of  (ax + b)  that evenly divide the polynomial to be factored. Typically the polynomials you will be asked to factor have integers as their coefficients. Not only that, but in the  (ax + b)  terms that are the factors, a and b will usually be integers as well. Suppose you had the polynomial,

   2x2 + 7x - 15
You could find the factors by using the
quadratic formula. Or you could remember that if  (ax + b)  is a factor of this polynomial, then a must evenly divide the leading coefficient of the polynomial (that is the 2 in the 2x2 term) and b must evenly divide the constant term (that is the -15 at the end of the polynomial). So there are only a few candidates to try here. You know that a can only be 1 or 2 and b can only be ±3, ±5, ±1 or ±15. You are looking for a's and b's that make the following equation true:
   (a1x + b1)(a2x + b2)  =  2x2 + 7x - 15
Now remember that one of the a's must be 1 and the other must be 2. That is, the product of all the a's must be equal to the leading coefficient of the polynomial. The product of the b's must be -15, that is the product of the b's must be equal to the constant coefficient. So if one of the b's is ±3, the other must be ±5. You only have to decide which a goes with which b and what the signs of the b's are. The middle term of the polynomial can give you some help. It's coefficient is 7. And when you multiply out the factors you can see that
   a1b2 + a2b1  =  7
So try out the possible combinations in your head to see if you can make this equation true. When you hit on the combination that does it, you have factored the polynomial.
   2×5 + 1×(-3)  =  7

   (2x - 3)(x + 5)  =  2x2 + 7x - 15
This method of using the middle term works with second degree polynomials (i.e., quadratics) only. If the polynomial is of higher degree, you will have to rely more on guess-work. But the rule of the factor,  (ax + b),  having to have a that divides the leading coefficient and b that divides the constant coefficient still holds. And that limits the range of your guesses. For example
   x3 - 2x2 - 5x + 6
You know that all the a's must be 1. For the b's your choices are ±1, ±2, and ±3. So you simply try a combination, say  (x - 1),  by dividing it into the original polynomial using polynomial long division. If it comes out with no remainder, then it's a factor. In this case it does, and the quotient is
   x2 - x - 6
Now all you have left to do is factor the quotient. Using the methods we have already discussed you can find that the remaining factors are  (x + 2)  and  (x - 3)

Factoring will not become easy for you unless you have practiced it. The more polynomial factoring problems you do, the better you will become at making the right guess on the first or second try. And remember that with second degree polynomials, if all else fails, you can always resort to the quadratic formula.

The Difference of Squares

This is a special case of factoring. Any time you have an expression in the form of a2 - b2, it can be factored into (a + b)(a - b). Likewise, whenever you see a product in the form of (a + b)(a - b), you can rest assured that when you multiply it out you will get a2 - b2. It is easy to see why when you apply the distributive law to such a product.

   (a + b) (a - b)  =  a2 - ab + ab - b2
Clearly the ab cancels with the -ab, leaving only the a2 and the -b2.

This is useful to know when you have expressions that have square roots in them -- especially when you have square roots in the denominator of some quotient. For example, if you have

   Ö5 + 1
You can simplify it by multiplying the numerator and the denominator both by sqrt(5) - 1 (recall that if you multiply numerator and denominator of a quotient by the same nonzero quantity, the quotient remains unchanged). If you do this, in the denominator you will get a difference of squares:
                     _                _
      4           4(Ö5 - 1)        4(Ö5 - 1)
           =                    =             =
   Ö5 + 1     (Ö5 + 1)(Ö5 - 1)       5 - 1

   4(Ö5 - 1)      _
              =  Ö5 - 1
Observe that the square root expression is gone from the denominator. This procedure is called rationalizing the denominator, and it's useful because square root expressions are easier to deal with when they occur in the numerator.

You can use this same procedure even if the square root expression contains an unknown, say x. For example:

                     _____             _____
        x         x(Öx + 1 + 2)     x(Öx + 1 + 2)
               =                 =               
   Öx + 1 - 2      (x + 1) - 4          x - 3
Again, the right-hand expression is easier to deal with than the left-hand one. Of course sometimes there are cases where you will want to simplify the numerator and let the denominator be the form left with the square root in it. The same method will work:
   Öx + 1 - 1      (x + 1) - 1            1
               =                  =            
        x         x(Öx + 1 + 1)      Öx + 1 + 1
Notice that we got a cancellation of a factor of x from top and bottom.

The Pythagorean Distance Formula

If both Jane and Mary start out at the corner of the barn, and Jane walks 12 meters north, and Mary walks 16 meters west, how far apart are they? Pythagoras pondered this problem over two thousand years ago and came up with a formula that still works today. The key here is that the directions in which Jane and Mary walked are exactly at right angles to each other. This means that the path Jane walked and the path Mary walked are two sides of a right triangle. The third side, or hypotenuse, represents the line that would join them once they have stopped walking.

Pythagoras showed that for any right triangle, the square of the hypotenuse is the sum of the squares of the other two sides. So in the case of Jane and Mary, you have

   d2  =  122 + 162  =  144 + 256  =  400
To find the distance between Jane and Mary, you need only take the square root of 400. Hence they are separated by 20 meters as the crow flies.

So if you have two points on an x-y graph, one at (x1, y1) and the other at (x2, y2), then the x-distance between them is |x2 - x1| and the y-distance between them is |y2 - y1|. Those two distances are at right angles to each other and form two sides of a right triangle. Consequently, the square of the distance between (x1, y1) and (x2, y2) is

   d2  =  (x2 - x1)2 + (y2 - y1)2
And you can find the distance itself by taking the square root of this expression.

You can find a brief biography of Pythagoras by clicking here.


The idea of a polynomial returning a value based upon some value you put in for x is just a single example of a much more general concept called a function. A function is simply a rule by which if I tell you the identity of some item from group A, you can tell me a unique item in group B that goes with it. For example, if you have a wardrobe of three piece suits, I can point to a pair of trousers, and you can point to the jacket that goes with those trousers. But there can only be one jacket that goes with those particular trousers. Remember, a function has to point me to a unique item in collection B. On the other hand, I can have more than one pair of trousers that goes with the same jacket. That is still a function, because there is no requirement that the item in group A be unique.

The group A of a function is called its domain. That is, the domain is the entire collection of items I might point to. In the suits example, the domain is all the pairs of trousers that are part of your suits. The group B of a function is called its range. That is, the range is all of the items you might point to in response to the ones I might point to. In the suits example, the range is all the suit jackets you own.

Sometimes the domain and the range might be the same. In the same closet where you keep your suits, you also keep your shoes. If I point to one shoe anywhere in your closet, you can point to its mate. That too is a function, but both the domain and the range are all the shoes in your closet.

Mostly calculus is concerned with functions in which both the domain and the range are the real numbers, or at least subsets of the real numbers. So polynomials certainly qualify. If you take a real number x, apply the polynomial, without fail you will get back a real number. So a polynomial is an example of a real valued function of a real variable. The term real valued indicates that its range is the real numbers (or at least a subset of the real numbers). The term of a real variable indicates that its domain is the real numbers (or at least a subset of the real numbers).

Often we will be talking about functions in generalities. We will say, "a function, f(x)." And that will mean that x is a variable that can take on any value in the domain of the function, f. If you have two real valued functions, f and g, then you can talk about their sum, f(x) + g(x), or their difference, f(x) - g(x), or their product, f(x) × g(x), or their quotient, f(x) / g(x). You can also talk about taking a function of the sum, difference, product, or quotient of various values from the domain. So, for example, you could talk about f(x + y), where x and y are both real numbers. As such, their sum is also a real number and can be stuck into a function of a real variable. Likewise with differences, products, and quotients. But be forewarned. It is NOT generally true that f(x + y) = f(x) + f(y). Likewise with differences, products, and quotients. Assuming that it is is a common mistake that beginning students make.

One neat thing that happens with real valued functions of a real variable is that you can take a function of a function. So, for example, you could take a real number, x, apply one of the polynomials from the last section to it, and then apply yet another real valued function of a real variable to the result. If you have two functions, f(x) and g(x), then the composite of them is just that, and you can denoted it as f( g(x) ), or as a shorthand, fg(x) (both notations refer to applying g first to x, then applying f to the result). But note well that it is NOT generally true that f( g(x) ) = g( f(x) ).

Sometimes when you take the composite of two functions, it always gives you back the original value you put in. For example,  f(x) = x3  and  g(x) = cube_root(x). No matter what you put in for x, you find that with these two function,  f(g(x)) = x  and  g(f(x)) = x. When two functions have this relationship to each other, they are called inverses of each other.

Substitution of variables: This is something you can do with any function, and you must get comfortable with it before you can be proficient at calculus. The x in the expression, f(x) is what is called a dummy variable. When you say

   f(x)  =  x2 + 3x + 2
you are saying that f is a rule you apply to x, no matter what x is. Here is a rule: square x, add to that three times x, and then add two. So, if that is the f rule, then what about f(a + b)? It means that you apply that identical rule to a + b as you would to x.
   f(a + b)  =  (a + b)2 + 3(a + b) + 2
If you multiply that out, it is the same as
   f(a + b)  =  a2 + 2ab + b2 + 3a + 3b + 2
This kind of thing comes up time after time in calculus. It is the method of attack for solving countless calculus problems. So you have no choice but to get the feel of it.

Imagine you are an editor at a children's storybook publisher. Your boss comes to you and says, "The illustrator went and drew lots of pigs for this story. But in the text, the story is about sheep. So go fix the text. Everywhere you see 'sheep' replace it with 'pig'." Not difficult, eh? That's all substitution of variables is. If your boss had told you to replace every sheep in the text with "a pig and a mouse" you could have done that just as easily. So when you have to substitute an expression for a variable into a function, remember that the function is nothing but a storybook text and you are just substituting a particular phrase for some word wherever it occurs.

The Unity of Calculus. In your previous studies, you have already encountered a wide variety of real valued functions of real variables. Besides polynomials there are square roots, nth roots, logs, exponentials, and trig functions (and we will be reviewing logs, exponentials, and trig functions as we encounter them). In calculus, we will be learning a whole new aspect of the lives of these functions. They will all be much in the news. You probably remember each group of functions being taught separately, as if each were a separate garden with fences dividing it from the others. In calculus, you will discover that there are no fences. They are all tied together -- all part of the same perfect garden that is yours to discover if only you keep your eyes wide and don't be afraid to explore under every leaf.

Exercises for prependix c

Return to Main Text