Properties of Matrix Operations¶
Alternative Definition of the Product of Two Square Matrices¶
Multiplication of a vector from \(\,K^n\,\) (from the left-hand side) by a square matrix from \(\,M_n(K)\,\) gives as the result a vector of the same kind. The operation may be therefore repeated by a further multiplication of the obtained result by another matrix. Taking into account this possibility of such composing the consecutive operations, we shall redefine the product of two square matrices of the same size.
Definition.
The product of the matrices \(\,\boldsymbol{A},\boldsymbol{B}\in M_n(K)\,\) is given by the matrix \(\,\boldsymbol{C}\in M_n(K),\ \) which satisfies the condition
To make sure that this definition is in accordance with the more general rule for multiplying rectangular matrices of appropriate sizes, we shall consider column vectors
and square matrices
for which the following relations hold:
Inserting expressions (b) appropriately into (a), we obtain
The last relation may be rewritten as
Thus \(\ \boldsymbol{A}\,(\boldsymbol{B}\,\boldsymbol{x})= \boldsymbol{C}\,\boldsymbol{x},\ \) where the matrix \(\ \boldsymbol{C}\ \) with elements \(\,c_{ij}\ \) given by (2) is the product of matrices \(\ \boldsymbol{A}\ \) and \(\ \boldsymbol{B}\ \) in the sense of the definition in the previous section.
We shall see later that equation (1) reflects the relation between the matrix multiplication and the superposition of linear operations on vectors.
Properties of Matrix Multiplication¶
The following properties may be easily proved by reference to the definition of the matrix product.
Matrix multiplication is associative:
\(\ (\boldsymbol{A}\boldsymbol{B})\,\boldsymbol{C} \ =\ \boldsymbol{A}\,(\boldsymbol{B}\boldsymbol{C})\,, \qquad\quad \boldsymbol{A}\in M_{m\times p}(K),\ \ \boldsymbol{B}\in M_{p\times q}(K),\ \ \boldsymbol{C}\in M_{q\times n}(K)\,.\)
Matrix multiplication is distributive across matrix addition:
\(\ (\boldsymbol{A}+\boldsymbol{B})\,\boldsymbol{C} \ =\ \boldsymbol{A}\boldsymbol{C}\,+\,\boldsymbol{B}\boldsymbol{C}\,, \qquad\quad \boldsymbol{A},\boldsymbol{B}\in M_{m\times p}(K),\ \ \boldsymbol{C}\in M_{p\times n}(K)\,;\)
\(\ \boldsymbol{A}\,(\boldsymbol{B}+\boldsymbol{C})\ =\ \boldsymbol{A}\boldsymbol{B}\ +\ \boldsymbol{A}\boldsymbol{C}\,, \qquad\quad \boldsymbol{A}\in M_{m\times p}(K),\ \ \boldsymbol{B},\boldsymbol{C}\in M_{p\times n}(K)\,.\)
Matrix product is compatible with scalar multiplication:
\(\ c\ (\boldsymbol{A}\boldsymbol{B})\ =\ (c \boldsymbol{A})\,\boldsymbol{B}\ =\ \boldsymbol{A}\,(c \boldsymbol{B})\,, \qquad c\in K,\ \ \boldsymbol{A}\in M_{m\times p}(K),\ \ \boldsymbol{B}\in M_{p\times n}(K)\,.\)
The identity element for matrix multiplication in the set \(\ M_n(K)\ \) is the identity matrix
\[\begin{split}\boldsymbol{I}_n \ :\,=\ \left[\begin{array}{cccc} 1 & 0 & \ldots & 0 \\ 0 & 1 & \ldots & 0 \\ \ldots & \ldots & \ldots & \ldots \\ 0 & 0 & \ldots & 1 \end{array}\right]\,.\end{split}\]Thus \(\quad\boldsymbol{I}_n\,\boldsymbol{A}\ =\ \boldsymbol{A}\,\boldsymbol{I}_n\ =\ \boldsymbol{A}\quad\) for every matrix \(\ \boldsymbol{A}\in M_n(K).\)
- Matrix multiplication is noncommutative: \(\,\) in general \(\,\boldsymbol{A}\boldsymbol{B}\neq\boldsymbol{B}\boldsymbol{A}\)even for square matrices of the same size, when both products do exist.
Only the matrices proportional to the identity matrix
\[\begin{split}c\ \boldsymbol{I}_n\ =\ \left[\begin{array}{cccc} c & 0 & \ldots & 0 \\ 0 & c & \ldots & 0 \\ \ldots & \ldots & \ldots & \ldots \\ 0 & 0 & \ldots & c \end{array}\right]\,, \qquad c\,\in\,K,\end{split}\]commute with all matrices from the set \(\ M_n(K).\)
An instructive example of noncommutativity of matrix multiplication:
\(\qquad\text{For}\quad\boldsymbol{A}\ =\ [\,a_1\ a_2\ a_3\,]\,,\quad \boldsymbol{B}\ =\ \left[\begin{array}{c} b_1 \\ b_2 \\ b_3 \end{array}\right]\quad \text{we obtain:}\)
\(\qquad\boldsymbol{A} \boldsymbol{B}\ =\ [\,a_1\ a_2\ a_3\,]\ \left[\begin{array}{c} b_1 \\ b_2 \\ b_3 \end{array}\right]\ =\ [\,a_1\,b_1\;+\;a_2\,b_2\;+\;a_3\,b_3\,]\ \simeq \ a_1\,b_1\;+\;a_2\,b_2\;+\;a_3\,b_3\,,\)
\(\qquad\ \boldsymbol{B} \boldsymbol{A}\ \,=\ \, \left[\begin{array}{c} b_1 \\ b_2 \\ b_3 \end{array}\right]\ [\,a_1\ a_2\ a_3\,]\ =\ \left[\,\begin{array}{ccc} b_1\,a_1 & b_1\,a_2 & b_1\,a_3 \\ b_2\,a_1 & b_2\,a_2 & b_2\,a_3 \\ b_3\,a_1 & b_3\,a_2 & b_3\,a_3 \end{array}\right]\,.\) \(\\\)
The latter result is called the outer product \(\ \boldsymbol{b}\otimes\boldsymbol{a}\ \) of the two column vectors: \(\,\boldsymbol{b} = \boldsymbol{B}\ \) and \(\,\boldsymbol{a} = \boldsymbol{A}^T\,.\ \,\) Thus \(\,\boldsymbol{B} \boldsymbol{A}\ = \ \boldsymbol{b}\,\boldsymbol{a}^T\ =\ \boldsymbol{b}\otimes\boldsymbol{a}\,.\ \) On the other hand, in this special case the product \(\,\boldsymbol{B} \boldsymbol{A}\ \) equals the tensor product \(\,\boldsymbol{B}\otimes\boldsymbol{A}\ \) of these matrices, see Chapter Tensor (Kronecker) Product of Matrices of this textbook.
The Row and Column Rules of Matrix Multiplication¶
Theorem. \(\,\) Consider the two matrices over a field \(\,K,\ \) given in the row notation:
Here \(\quad\boldsymbol{A}_i\ =\ [\;a_{i1}\ a_{i2}\ \dots a_{ip}\;]\ \ (i=1,2,\dots,m),\quad \boldsymbol{B}_i\ =\ [\;b_{i1}\ b_{i2}\ \dots b_{in}\;]\ \ (i=1,2,\dots,p).\)
The row notation being still in use, their product may be written as follows: \(\\\)
Proof. \(\,\) We introduce the denotement
and write down the matrix \(\ \boldsymbol{B}\ \) in the column notation:
Using the Column Rule of Matrix Multiplication, we get
The matrices \(\ \boldsymbol{A}\boldsymbol{B}\ \ \text{and}\ \ \boldsymbol{W}\ \) are of the same size (\(\,m\,\) rows and \(\,n\,\) columns), \(\\\) and their corresponding elements are equal:
Hence \(\ \boldsymbol{A}\boldsymbol{B}\ =\ \boldsymbol{W}\ \) and the relation (3) is proven.
To demonstrate the equation (4) we note that
The above theorem may be named the Row Rule of Matrix Multiplication. We write it down here together with the previously derived Column Rule, since both will be often referenced. \(\\\)
Row and Column Rules of Matrix Multiplication. \(\\\)
Let \(\ \boldsymbol{A}\,\in M_{m\times p}(K),\ \boldsymbol{B}\,\in M_{p\times n}(K).\ \) \(\\\)
Then the \(\ i\)-th row of the product \(\ \boldsymbol{A}\boldsymbol{B}\ \) is: \(\\\)
\(\,\) the product of the \(\ i\)-th row of the matrix \(\ \boldsymbol{A}\ \) by the matrix \(\ \boldsymbol{B};\) \(\\\)
- \(\,\) the linear combination of rows of matrix \(\ \boldsymbol{B},\ \) the coefficients being\(\,\) the consecutive elements of the \(\ i\)-th row of matrix \(\ \boldsymbol{A},\ \ i\,=\,1,2,\ldots,m.\)\(\ \)
On the other hand, the \(\ j\)-th column of the product \(\ \boldsymbol{A}\boldsymbol{B}\ \) is: \(\\\)
\(\,\) the product of the matrix \(\ \boldsymbol{A}\,\) by the \(\ j\)-th column of matrix \(\boldsymbol{B};\) \(\\\)
- \(\,\) the linear combination of columns of matrix \(\ \boldsymbol{A},\,\) the coefficients being\(\,\) the consecutive elements of the \(\ j\)-th column \(\,\) of matrix \(\boldsymbol{B},\ \ j=1,2,\ldots,n.\)
\(\ \)