## Introduction to Variables

Variables are used in mathematics to denote arbitrary or unknown numbers.

### Learning Objectives

Describe the uses of variables in mathematics

### Key Takeaways

#### Key Points

• Variables are generally alphabetic characters that represent numbers and are useful in mathematics for several purposes.
• Parameters of equations are often denoted with variables (such as $a$, $b$, or $c$) and are part of the given information in an equation.
• Unknown variables are those that must be solved for in equations and are often denoted with variables such as $x$ and $y$.

#### Key Terms

• term: A value or expression separated from other such values by an operation.
• variable: An alphabetic character representing a number that is arbitrary or unknown.
• parameter: A number or variable in an equation that is considered “known”.
• coefficient: A quantity (usually a number) that remains the same in value within a problem.
• unknown: A variable in an equation that has to be solved for.

In elementary mathematics, a variable is an alphabetic character representing a number, called the value of the variable, that is arbitrary, not fully specified, or unknown.

Variables are useful for several reasons.

### Unknown Values

Variables can represent numbers whose values are not yet known. For example, if the temperature of the current day, $C$, is 20 degrees higher than the temperature of the previous day, $P$, then the problem can be described algebraically as $\displaystyle C=P+20$.

### Varying Quantities

Variables may describe mathematical relationships between quantities that vary. For example, the relationship between the circumference, $C$, and diameter, $d$, of a circle is described by $\displaystyle \pi =C/d$.

Variables may also describe general problems without specifying the values of the quantities involved. For example, it can be stated specifically that 5 minutes is equivalent to $\displaystyle 60\times 5=300$ seconds. A more general (algebraic) description may state the number of seconds as $\displaystyle s=60\times m$, where $m$ is the number of minutes.

### Mathematical Properties

Variables may describe some mathematical properties. For example, a basic property of addition is commutativity, which states that the order of numbers being added together does not matter. Commutativity is stated algebraically as $\displaystyle (a+b)=(b+a)$.

### Types of Variables

Variables can be used to represent different types of numbers. It is common that many variables appear in the same mathematical formula, and they may play different roles. Some names or qualifiers have been introduced to distinguish them.

For example, in the general cubic equation $\displaystyle ax^{3}+bx^{2}+cx+d=0$, there are five variables. Four of them ($a$, $b$, $c$, $d$) represent given numbers, which are referred to as the parameters of the equation. The last one, $x$, represents the solution of the equation, which is unknown and must be solved for. To distinguish among the different variables, $x$ is called an unknown, and the variables that are multiplied by $x$ are called coefficients. In this equation, the coefficients are $a$, $b$, and $c$. A number on its own (without an unknown variable) is called a constant; in this case, $d$ represents a constant.

Note that a term of an equation is any value (variable or number) or expression that is separated from another term by a space or a character (such as “$+$“). Therefore, a term may simply be a constant or a variable, or it may include both a coefficient and an unknown variable. In the cubic equation described above, there are four terms: $ax^3$, $bx^2$, $cx$, and $d$.

Note that unknown variables are often denoted by $x$, $y$, or $z$ and the parameters of equations by $a$, $b$, $c$, or $d$. However, this is not always the case. For example, you might be asked to solve the following equation for $b$:

$12 - b = 3$

In this case, $b$ is an unknown variable, not a parameter of the equation. We can solve this problem and find that $b = 9$.

## Adding and Subtracting Algebraic Expressions

Simplifying algebraic expressions involves combining like terms, often through addition and subtraction.

### Learning Objectives

Use the concept of like terms to add and subtract expressions containing variables

### Key Takeaways

#### Key Points

• ” Like terms ” are terms in algebraic expressions that are constants or that involve the same variables raised to the same exponents (e.g., $6x^2$ and $x^2$; $14y$ and $3y$).
• In algebraic expressions, like terms can be combined through addition and subtraction: $2{x}^{2}+3ab-{x}^{2}+ab={x}^{2}+4ab$.

#### Key Terms

• like terms: Entities that involve the same variables raised to the same exponents.

### Like Terms

Every algebraic expression is made up of one or more terms. Terms in these expressions are separated by the operators $+$ or $-$. For instance, in the expression $x + 5$, there are two terms; in the expression $2x^2$, there is only one term.

Terms are called like terms if they involve the same variables and exponents. All constants are also like terms.

For example, $5x^2$ and $x^2$ are like terms because they involve the same variable, $x$, raised to the same exponent, 2. Likewise, the following are examples of like terms:

• $3x$ and $25x$
• $y^4$ and $12y^4$
• 13 and 42

Note that terms that share a variable but not an exponent are not like terms. Therefore, $2x^3$and $2x^2$are not like terms because they have different exponents (3 and 2). Likewise, terms that share an exponent but have different variables are not like terms. Therefore, $2x^2$ and $2y^2$ are not like terms, because they have different variables ($x$ and $y$).

### Expressions with Two Terms

We can simplify an algebraic expression by combining like terms. For example, let’s try simplifying $3x + 6x$.

First, let’s write both terms as addition problems:

• $3x = x + x + x$
• $6x = x + x + x + x + x + x$.

Adding these terms together, we have:

$3x + 6x = x + x + x + x + x + x + x + x + x$

If you count, you’ll find that there are 9 $x$s in this expanded expression. Therefore:

$3x+6x=9x$

Note that the expression we started with, $3x + 6x$, had only two terms. When an expression contains more than two terms, it may be helpful to rearrange the terms so that like terms are together.

### Expressions with More than Two Terms

The commutative property of addition says that we can change the order of terms without changing the meaning of the expression (the sum). So, we can rearrange the order of the following expression before attempting to combine like terms:

$4a + 6b + 2a +b$

We can identify that $4a$ and $2a$ are like terms, as are $6b$ and $b$. We want to rearrange the expression to group like terms together:

$4a + 2a + 6b +b$.

Now we can more easily add the like terms together to simplify the expression:

$(4a + 2a) + (6b +b) = 6a + 7b$

The same rules apply when an expression involves subtraction. However, be careful that when you changing the order of terms you ensure that the minus sign follows the term that it applies to. For example, consider $2x - 3 + 5x$. This expression is properly rearranged and simplified as follows:

$2x-3 + 5x = 2x + 5x - 3 = 7x - 3$.

### Summary

In summary, there are three steps to combining like terms:

1. Identify all like terms.

2. Rearrange the expression so the like terms are grouped together.

3. Add or subtract the coefficients of the like terms until there are as few of each kind of term as possible.

### Example 1

Simplify the following expression:

$4x^2 + 3xy - y - 2x^2 + 5xy$

First, identify the like terms: $4x^2$ and $-2x^2$,  $3xy$ and $5xy$. Now group these like terms together:

$4x^2 - 2x^2 + 3xy + 5xy - y$

Add and subtract the coefficients of the like terms:

$2x^2 + 8xy - y$

### Example 2

Simplify the following expression:

$-5x^2 + 3x + 3y - 3x + 21x^2$

First, identify the like terms: $-5x^2$ and $21x^2$, $3x$ and $-3x$. Now group these like terms together:

$-5x^2 + 21x^2 + 3x - 3x + 3y$

Add and subtract the coefficients of the like terms. Notice that the terms $3x$ and $-3x$ cancel, because $3x - 3x = 0$. The expression therefore simplifies to:

$16x^2 + 3y$

## Multiplying Algebraic Expressions

The process for multiplying algebraic expressions differs for monomials and polynomials.

### Learning Objectives

Calculate the product of expressions containing variables

### Key Takeaways

#### Key Points

• To multiply two monomials, multiply the integer coefficients together and add the exponents of any variables that are the same.
• To multiply a monomial by a polynomial, multiply the monomial by each individual term in the polynomial.
• To multiply two binomials, follow the FOIL method: multiply the First, Outside, Inside, and Last terms before adding all the resulting terms together.

#### Key Terms

• binomial: A polynomial with two terms.
• polynomial: An algebraic expression with more than one term.
• monomial: A single term consisting of a product of numbers and variables.
• trinomial: A polynomial with three terms.

### Multiplication of Two Monomials

A monomial is a single term consisting of a product of numbers and variables. It is a relative of the polynomial, which is an algebraic expression with more than one term. The following are examples of monomials:

• $3x$
• $6xy$
• $12$
• $4x^2$

(Note that multiplying monomials is not the same as adding algebraic expressions—monomials do not have to involve ” like terms ” in order to be combined together through multiplication.)

When you multiply monomials, you multiply their integer coefficients together and, if they contain any of the same variables, add the exponents on those variables together.

For example:

• $(3x^2)(4x) = 12x^3$
• $(4xy)(5y^2) = 20xy^3$
• $(9)(2y^2) = 18y^2$
• $(5x)(3y) = 15xy$

### Multiplication of Monomials and Polynomials

A monomial can be multiplied by a polynomial of any size (note that a polynomial is called a binomial if it has two terms and a trinomial if it has three terms). The monomial should be multiplied by each term in the polynomial separately. Any negative sign on a term should be included in the multiplication of that term. The resulting polynomial will have the same number of terms as the polynomial in the problem.

For example:

• $(2x)(x^2 + 5) = 2x^3 + 10x$
• $7(x^2y + 5) = 7x^2y + 35$
• $(x^3)(y^2 - 2x + 4) = x^3y^2 - 2x^4 + 4x^3$
• $-3x(2xy - 3y^2 - 2) = -6x^2y + 9xy^2 + 6x$

### Multiplication of Two Binomials

Multiplying two binomials is less straightforward; however, there is a method that makes the process fairly convenient. “FOIL” is a mnemonic for the standard method of multiplying two binomials (hence the method is often referred to as the FOIL method). The word FOIL is an acronym for the four terms of the product:

• First (the “first” terms of each binomial are multiplied together)
• Outer (the “outside” terms are multiplied—i.e., the first term of the first binomial with the second term of the second)
• Inner (the “inside” terms are multiplied—i.e., the second term of the first binomial with the first term of the second)
• Last (the “last” terms of each binomial are multiplied together)

Once this process is complete, all the resulting terms are added together into a single polynomial.

The FOIL method can be written algebraically:

$(a+b)(c+d)=ac+ad+bc+bd$

• First terms: $ac$
• Outside terms: $ad$
• Inside terms: $bc$
• Last terms: $bd$

Remember that any negative sign on a term in a binomial should also be included in the multiplication of that term. Additionally, remember to simplify the resulting polynomial if possible by combining like terms.

### Example of Multiplying Binomials

Multiply the following binomials:

$(2x + 1)(3x - 2)$

Following the FOIL method, multiply the first, outside, inside, and last terms:

$F: (2x)(3x) = 6x^2 \\ O: (2x)(-2) = -4x \\ I: (1)(3x) = 3x \\ L: (2)(-2) = -2$

Now add all of these terms together:

$6x^2 - 4x + 3x - 2$

Notice that two of these terms are like terms ($-4x$ and $3x$) and can therefore be added together to simplify the expression further:

$6x^2 - x - 2$

## Simplifying Radical Expressions

A radical expression that contains variables can often be simplified to a more basic expression, much as can expressions involving only integers.

### Learning Objectives

Simplify radical expressions containing variables

### Key Takeaways

#### Key Points

• If a radical is fully simplified, there is no factor of the radicand that can be written as a power greater than or equal to the index, there are no fractions under the radical sign, and there are no radicals in the denominator.
• When radical expressions contain variables, simplifying them follows the same process as it does for expressions containing only integers.
• Similarly, the rules for multiplying and dividing radical expressions still apply when the expressions contain variables.

#### Key Terms

• radicand: The number or expression whose square root or other root is being considered; e.g., the 3 in $\sqrt[n]{3}$. More simply, the number under the root symbol.

### Radical Expressions

Expressions that include roots are known as radical expressions. Recall that the $n$th root of a number $x$ is a number $r$ that, when raised to the power of $n$, equals $x$:

${r}^{n}=x$

where $n$ is the degree of the root. A root of degree 2 is called a square root; a root of degree 3 is called a cube root. Roots of higher degrees are referred to using ordinal numbers (e.g., fourth root, twentieth root, etc.).

### Simplified Form

A radical expression is said to be in simplified form if:

1. there is no factor of the radicand that can be written as a power greater than or equal to the index,
2. there are no fractions under the radical sign, and
3. there are no radicals in the denominator.

### Example

For example, let’s write the radical expression $\sqrt { \frac { 32 }{ 5 } }$ in simplified form, we can proceed as follows. First, look for a perfect square under the square root sign, and remove it:

$\displaystyle \sqrt { \frac { 32 }{ 5 } } =\sqrt { \frac { 16\cdot 2 }{ 5 } } = \sqrt {4^2 \cdot \frac { 2 }{ 5 } }= 4\sqrt { \frac { 2 }{ 5 } }$

Next, separate the fraction under the radical sign:

$\displaystyle 4\sqrt { \frac { 2 }{ 5 } } =\frac { 4\sqrt { 2 } }{ \sqrt { 5 } }$

Finally, remove the radical from the denominator:

$\displaystyle 4\sqrt { \frac { 2 }{ 5 } } =\frac { 4\sqrt { 2 } }{ \sqrt { 5 } } \cdot \frac { \sqrt { 5 } }{ \sqrt { 5 } } =\frac { 4\sqrt { 10 } }{ 5 }$

### Radical Expressions with Variables

For the purposes of simplification, radical expressions containing variables are treated no differently from expressions containing integers. For example, consider the following: 

$\sqrt{4x^2} = \sqrt{4} \cdot \sqrt{x^2} = 2x$

This follows the same logic that we used above, when simplifying the radical expression with integers:

$\sqrt{32} = \sqrt{16} \cdot \sqrt{2} = 4\sqrt{2}$

### Example

Simplify the following expression:

$\dfrac{\sqrt{16x^7}}{\sqrt{x^2}}$

First, notice that there is a perfect square under the square root symbol, and pull that out:

$\dfrac{\sqrt{16x^7}}{\sqrt{x^2}} = \dfrac{\sqrt{16}\sqrt{x^7}}{\sqrt{x^2}} = \dfrac{4 \cdot \sqrt{x^7}}{\sqrt{x^2}} = 4 \cdot \dfrac{\sqrt{x^7}}{\sqrt{x^2}}$

Recall that we can rewrite the numerator and denominator in rational exponent form, which will allow us to proceed with the division rule:

$4 \cdot \dfrac{x^{\frac{7}{2}}}{x^{\frac{2}{4}}}$

Notice that the exponent in the denominator can be simplified, so we have:

$4 \cdot \dfrac{x^{\frac{7}{2}}}{x^{\frac{1}{2}}}$

Recall the rule for dividing numbers with exponents, in which the exponents are subtracted. Applying the division rule yields:

$4 \cdot \dfrac{x^{\frac{7}{2}}}{x^{\frac{1}{2}}} = 4 \cdot x^{\frac{7}{2}-\frac{1}{2}} = 4 \cdot x^{\frac{6}{2}} = 4x^3$

## Simplifying Exponential Expressions

The rules for operating on numbers with exponents can be applied to variables with exponents as well.

### Learning Objectives

Simplify exponential expressions containing variables

### Key Takeaways

#### Key Points

• The rules for operating on exponential expressions are the same for expressions with variables as they are for those with only integers.

#### Rules for Exponential Expressions

Recall the rules for operating on numbers with exponents, which are used when simplifying and solving problems in mathematics:

• Multiplying exponential expressions with the same base: $a^m \cdot a^n = a^{m+n}$
• Dividing exponential expressions with the same base: $\displaystyle \frac{{a}^{m}}{{a}^{n}}={a}^{m-n}$
• Raising an exponential expression to an exponent: ${({a}^{n})}^{m}={a}^{n \cdot m}$
• Raising a product to an exponent: ${(ab)}^{n}={a}^{n}{b}^{n}$

Previously, we have applied these rules only to expressions involving integers. However, they also apply to expressions involving a combination of both integers and variables. This makes them more broadly applicable in solving mathematics problems.

### Exponential Expressions with Variables

In terms of conducting operations, exponential expressions that contain variables are treated just as though they are composed of integers. For example, consider the rule for multiplying two numbers with exponents. We know that $(2 \cdot 5)^2 = 2^2 \cdot 5^2$. The same rule applies to expressions with variables. The following statements therefore hold true:

• $(4a)^3 = 4^3 \cdot a^3$
• $(xy)^2 = x^2y^2$

Each of the other rules for operating on numbers applies to expressions with variables as well. You will see how each of these applies in the following examples.

### Example 1

Simplify the following expression:

$\displaystyle \frac{4a^7}{a^2}$

Now apply the rule for dividing exponential expressions with the same base:

$\displaystyle \frac{4a^7}{a^2} = 4a^{\left(7-2\right)} = 4a^5$

### Example 2

Simplify the following expression:

$(a^3)(a^2) + (2b^2)^3$

To simplify the first part of the expression, apply the rule for multiplying two exponential expressions with the same base:

$(a^3)(a^2) = a^5$

To simplify the second part of the expression, apply the rule for multiplying numbers with exponents:

$(2b^2)^3 = (2)^3 \cdot (b^2)^3$

Now, since we know that $2^3 = 2 \cdot 2 \cdot 2 = 8$, we can plug that in. We can also apply the rule for raising a power to another exponent:

$(2b^2)^3 = 8b^6$

Combining the two terms, our original expression simplifies to:

$a^5 + 8b^6$

## Rational Algebraic Expressions

The addition and subtraction of rational expressions are bound by all of the same rules as the addition and subtraction of fractions.

### Learning Objectives

Manipulate rational expressions that contain variables

### Key Takeaways

#### Key Points

• Always factor rational expressions before doing anything else.
• When two rational expressions are added to or subtracted from each other, each must first be multiplied by some constant such that both expressions have the same denominator.
• Once two rational expressions have the same denominator, their numerators can be combined. Then the overall remaining expression can be simplified.

#### Key Terms

• rational expression: An expression in terms of the quotient of two polynomials.
• prime factor: A factor of a given integer that is also a prime number.
• factor: Any of various objects multiplied together to form some whole.
• factoring: The process of creating a list of items that, when multiplied together, will produce a desired quantity or expression.

Adding and subtracting fractions should be a familiar process, and we will rely on this concept in our discussion of adding and subtracting rational expressions.

$\displaystyle \frac 1 2 +\frac 1 3 = \frac 3 6 + \frac 2 6 = \frac 5 6$

The key is finding the least common denominator of the two rational expressions: the smallest multiple of both denominators. Then, you rewrite the two fractions using this denominator. Finally, you add (or subtract) the fractions by combining the numerators and leaving the denominator alone.

But how do you find the least common denominator?

Consider this problem:

$\displaystyle \frac 5 {12} + \frac 7 {30} = ?$

You could probably find the least common denominator if you played around with the numbers long enough. Here, we will show you a systematic method for finding least common denominators—a method that works with rational expressions just as well as it does with numbers.

### Finding the Least Common Denominator

We start, as usual, by factoring. For each of the denominators, we find all the prime factors —i.e., the prime numbers that multiply to give that number.

$\displaystyle \frac 5 {2 \cdot 2 \cdot 3} + \frac 7 {2 \cdot 3 \cdot 5}$

If you are not familiar with the concept of prime factors, it may take a few minutes to get used to. $2\cdot 2 \cdot 3$ is $12$ broken into its prime factors: that is, it is the list of prime numbers that when multiplied together yield 12. Similarly, the prime factors of 30 are 2, 3, and 5. But why does this help?

Because $12=2 \cdot 2 \cdot 3$, any number whose prime factors include two 2s and one 3 will be a multiple of 12. Similarly, any number whose prime factors include a 2, a 3, and a 5 will be a multiple of 30. Prime Factors of Fractions: Finding the prime factors of the denominators of two fractions enables us to find a common denominator.

The least common denominator is the smallest number that contains the overlap of both factored denominators: in this case, it must have two 2s, one 3, and one 5. Hence, the least common denominator must be $2 \cdot 2 \cdot 3 \cdot 5 = 60$.

Now we can finish the problem:

\begin{align} \frac {5} {2 \cdot 2 \cdot 3} + \frac {7} {2 \cdot 3 \cdot 5} &= \left(\frac {5} {2 \cdot 2 \cdot 3} \cdot \frac {5} {5} \right) + \left(\frac {7} {2 \cdot 3 \cdot 5} \cdot \frac {2} {2}\right) \\ &= \frac {25} {60} + \frac {14} {60}\\ &= \frac {39} {60} \\ &= \frac {13} {20} \end{align}

This may look like a very strange way of solving problems that you have known how to solve since the third grade. However, you should spend a few minutes carefully following the above solution. Once you understand why $2 \cdot 2 \cdot 3 \cdot 5 = 60$ is guaranteed to be the least common denominator, you have the key concept required to add and subtract rational expressions.

### Addition and Subtraction of Rational Expressions

When applying this strategy to rational expressions, first look at the denominators of the two rational expressions and see if they are the same. If they are the same, then simply add or subtract the numerators from each other, leaving the denominator alone. If the two denominators are different, however, then you will need to use the above strategy of finding the least common denominator.

When we add or subtract rational expressions, we will not simply be considering the prime factors of integers when looking for the least common denominator. Rather, we will be looking for monomial and binomial factors that are common to both rational expressions. This requires factoring algebraic expressions.

For example, consider the expression $2x^2 + 4$. Note that each term of the expression is divisible by 2; therefore, this can be rewritten by dividing 2 out of each term: $(2)(x^2 + 2)$. This expression therefore has two factors: $2$ and $(x^2 + 2)$.

Follow the example below to see how this applies to solving addition and subtraction problems.

### Example

Subtract the following rational expressions:

$\displaystyle \frac 3 {x^2y+2y}-\frac {4x}{x^2 + 2}$

We begin problems of this type by factoring. Notice that we can rewrite the first denominator in terms of its factors. We can pull $y$ out of the binomial, since it appears in both terms:

$x^2y+2y = y(x^2 + 2)$

The denominator in the second fraction cannot be factored. The rational expressions therefore become:

$\displaystyle \frac 3 {y(x^2 + 2)} - \frac {4x}{x^2 + 2}$

Notice the factors in the denominators. The first fraction has two factors: $y$ and $(x^2+2)$. The second fraction has only one factor: $(x^2 + 2)$.

Now, as above, we need to find the smallest possible overlap including all the factors in both of these denominators. Through this logic, the least common denominator must have one $(x^2+2)$ and one $y$.

We now rewrite both fractions with the common denominator (remember that if you multiply a denominator by a factor, you must also multiply the numerator of that fraction by the same factor):

$\displaystyle \frac {3}{y(x^2+2)} - \frac {4x} {x^2+2} \cdot \dfrac{y}{y}$

$\displaystyle \frac {3}{y(x^2+2)} - \frac {4x(y)} {y(x^2+2)}$

Subtracting fractions is easy once you have a common denominator! Now we can simply subtract the numerators:

$\displaystyle \frac {3-4xy} {y(x^2+2)}$

### Conclusions

First, always factor rational expressions before doing anything else.

Second, follow the regular procedure for fractions, which in this case involves finding a common denominator.

Third, subtract the numerators while leaving the denominator alone.

Finally, simplify.