$(y+b)(x+a) = y(x+a) + b(x+a)$
$= xy+ay+bx+ab$

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

If the first terms in each factor are alike:

$(x+a)(x+b) = x(x+b) + a(x+b)$
$= x^2+bx+ax+ab$
$= x^2+x(a+b)+ab$

This still holds true if the coefficients of the first term are not $1$:

$(px+a)(qx+b) = px(qx+b)+a(qx+b)$
$= pqx^2+pbx+aqx+ab$
$= pqx^2+x(bp+aq)+ab$

### Square of an Expression With Two Terms

$(x+a)^2 = (x+a)(x+a)$
$(x+a)^2 = x^2+2ax+a^2$
$(x-a)^2 = x^2-2ax+a^2$

### Square of an Expression With Three Terms

Consider the rule $(x+c)^2 = x^2+2cx+c^2$. As $x$ may have any value, replace it with $(a+b)$:

$(a+b+c)^2 = (a+b)^2+2c(a+b)+c^2$
$= a^2+2ab+b^2+2ac+2bc+c^2$

or

$(a+b+c)^2 = a^2+b^2+c^2+2ab+2bc+2ac$

The rules for signs in the distributed expression are:
$\Rightarrow$ The individual squares are always positive!
$\Rightarrow$ The double of a combination of two terms is negative when any of its terms is negative!

$(x-y+z)^2 = x^2+y^2+z^2-2xy+2xz-2yz$
$(a-b-c)^2 = a^2+b^2+c^2-2ab-2ac-2bc$
$(x+y-5)^2 = x^2+y^2+25-10x-10y+2xy$

### Cube of an Expression With Two Terms

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

$(a-b)^3 = a^3-3a^2b+3ab^2-b^3$

### Negative Expressions With Exponents

Distribute the expression according to the exponent before applying the negation:

$-(a-b)^2 = -(a^2-2ab+b^2)$
$= -a^2+2ab-b^2$

### Multiplication of Monomial Expressions

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

### Product of Sum and Difference

The product of the sum and the difference of two numbers always reduces to the difference of their squares.

$(a+b)(a-b) = a(a-b) + b(a-b)$
$= a^2-ab+ab-b^2$
$= a^2-b^2$

### a(b+c)(d+e)

$a(b+c)(d+e) = a(bd+be+cd+ce)$
$= abd+abe+acd+ace$