# Two Parentheses with Variables

If there are variables in addition to numbers inside of two pairs of parentheses, you can’t find their exact values. There’s a rule to expand these kinds of parentheses, based on the distributive property.

Rule

### ProductofParentheseswithVariables

$\begin{array}{llll}\hfill & \phantom{=}\left(a+b\right)\left(c+d\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =a\left(c+d\right)+b\left(c+d\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =ac+ad+bc+bd\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill \left(a+b\right)\left(c+d\right)& =a\left(c+d\right)+b\left(c+d\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =ac+ad+bc+bd\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Example 1

Expand $\left(y+2\right)\left(4-2x\right)$

Since you don’t know the values of $x$ and $y$, you need to apply the rule above. According to the rule, you need to multiply $y$ by 4 and $-2x$, and multiply 2 by 4 and $-2x$, and add those four products together:

$\begin{array}{llll}\hfill & \phantom{=}\left(y+2\right)\left(4-2x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =y\left(4-2x\right)+2\left(4-2x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =y×4+y×\left(-2x\right)+2×4\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}+2×\left(-2x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill \left(y+2\right)\left(4-2x\right)& =y\left(4-2x\right)+2\left(4-2x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =y×4+y×\left(-2x\right)+2×4+2×\left(-2x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

You then apply the rules for contracting expressions with variables and simplify the expression. That gives you
$\begin{array}{llll}\hfill & \phantom{=}y×4+y×\left(-2x\right)+2×4\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}+2×\left(-2x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =4y-2xy+8-4x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

 $y×4+y×\left(-2x\right)+2×4+2×\left(-2x\right)=4y-2xy+8-4x.$

Besides adjusting the order to put variables alphabetically first, and constant terms at the end, there’s nothing left to do with this expression, because you can’t contract terms with different combinations of variables. The final result is
 $-4x-2xy+4y+8$

Sometimes, there’s a minus sign in front of the parentheses. In those cases, it’s important to move the minus sign to each of the terms inside the parentheses before expanding. If a term inside the parentheses is negative already, it turns positive, because $\left(-\right)×\left(-\right)=+$. Positive terms inside the parentheses turn negative, because $\left(-\right)×+=-$. You can also think about the minus sign as having an invisible 1 included, meaning you’re multiplying each of the terms inside the parentheses by $-1$.

Rule

### MinusinFrontofParentheses

$\begin{array}{llll}\hfill -\left(a+b\right)& =-a-b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill -\left(a-b\right)& =-a+b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill -\left(-a+b\right)& =a-b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill -\left(-a-b\right)& =a+b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llllllll}\hfill -\left(a+b\right)& =-a-b\phantom{\rule{2em}{0ex}}& \hfill -\left(a-b\right)& =-a+b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill -\left(-a+b\right)& =a-b\phantom{\rule{2em}{0ex}}& \hfill -\left(-a-b\right)& =a+b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Example 2

Expand the expression

 $2b\left(a+1\right)-\left(2ab+2b\right)$

The first term in the expression is expanded like this: $\begin{array}{llll}\hfill 2b\left(a+1\right)& =2ba+2b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2ab+2b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

The second term has a minus sign in front of the parentheses, and can be expanded by applying the rule above:

 $-\left(2ab+2b\right)=-2ab-2b$

Then you have that

$\begin{array}{llll}\hfill & \phantom{=}2b\left(a+1\right)-\left(2ab+b\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2ab+2b-2ab-2b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =0\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill 2b\left(a+1\right)-\left(2ab+b\right)& =2ab+2b-2ab-2b\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =0\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$