The product of two matrices can be seen as the result of taking linear combinations of their rows and columns. This way of interpreting matrix multiplication often helps to understand important results in matrix algebra.
Consider two matrices and and their product . Remember that matrix multiplication is not commutative, so that is not the same as .
When we perform the multiplication we say that:
pre-multiplies , or is pre-multiplied by ;
post-multiplies , or is post-multiplied by .
Alternatively, we say that:
left-multiplies , or is left-multiplied by ;
right-multiplies , or is right-multiplied by .
Let us start with the case in which a matrix is post-multiplied by a vector.
Proposition Let be a matrix and a vector. Thenwhere denotes the -th column of .
The product is a vector. By applying the definition of matrix product, the -th entry of is found to beThis is also the -th entry of the linear combination
In other words, post-multiplying a matrix by a vector is the same as taking a linear combination of the columns of , where the coefficients of the linear combination are the elements of .
Example LetandThen, the formula for the multiplication of two matrices givesBy computing the same product as a linear combination of the columns of , we get
We now discuss the case in which a matrix is pre-multiplied by a vector.
Proposition Let be a vector and a matrix. Thenwhere denotes the -th row of .
The product is a vector. By applying the definition of matrix product, we obtain the -th element of aswhich is equal to the -th entry of
Thus, pre-multiplying a matrix by a vector is the same as taking a linear combination of the rows of . The coefficients of the combination are the elements of .
Example LetandThen, the formula for the multiplication of two matrices givesBy computing the same product as a linear combination of the rows of , we obtain
Let us now tackle the more general case in which a matrix is post-multiplied by another matrix.
Proposition Let be a matrix and an matrix. Then, the -th column of the product iswhere denotes the -th column of .
By applying the definition of matrix multiplication, the -th entry of is found to beThis is also the -th entry of the column vector
So, the -th column of the product is a linear combination of the columns of , with coefficients taken from the -th column of .
Example LetandThen, the formula for the multiplication of two matrices givesBy computing the first column of as a linear combination of the columns of , we getThe second column can be calculated as
In the previous section, the columns of were interpreted as linear combinations of the columns of . We now interpret the rows of as linear combinations of the rows of .
Proposition Let be a matrix and an matrix. Then, the -th row of the product iswhere denotes the -th row of .
By applying the definition of matrix multiplication, the -th entry of is found to beThis is also the -th entry of the row vector
So, the -th row of the product is a linear combination of the rows of , with coefficients taken from the -th row of .
Example Consider the two matrices andThen, the formula for the multiplication of two matrices givesBy computing the first row of as a linear combination of the rows of , we obtainThe second row can be computed as
Please cite as:
Taboga, Marco (2021). "Matrix multiplication and linear combinations", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/matrix-multiplication-and-linear-combinations.
Most of the learning materials found on this website are now available in a traditional textbook format.