Example
To provide an example for above, let and have numerical values, so that their sum may be calculated. For ease of calculation, let and . The original expression becomes
which may be factored into
or, equally,
.
This demonstrates that
The known values assigned to the unlike part of two or more terms are called coefficients. As this example shows, when like terms exist in an expression, they may be combined by adding or subtracting (whatever the expression indicates) the coefficients, and maintaining the common factor of both terms. Such combination is called combining like terms, and it is an important tool used for solving equations.
Simplifying an expression
Take the expression, which is to be simplified:
The first step to grouping like terms in this expression is to get rid of the parentheses. Do this by distributing (multiplying) each number in front of a set of parentheses to each term in that set of parentheses:
The like terms in this expression are the terms that can be grouped together by having exactly the same set of unknown factors. Here, the sets of unknown factors are and . By the rule in the first example, all terms with the same set of unknown factors, that is, all like terms, may be combined by adding or subtracting their coefficients, while maintaining the unknown factors. Thus, the expression becomes
The expression is considered simplified when all like terms have been combined, and all terms present are unlike. In this case, all terms now have different unknown factors, and are thus unlike, and so the expression is completely simplified.