Expanding brackets with matrices is like expanding ordinary brackets, with the exception that the order of multiplication matters.
In ordinary algebra,and
represent numbers.
In matrix algebra, ifand
represent matrices, it is not in general the case that
For example, if
and
then
but
This means that we cannot collectas
or
and we must be careful to preserve the order of multiplication.
Example. Ifand
are matrices, expand and simplify
Simplification is possible ifsince
and