Section 5.7
Recall the generalized matrix
The number of rows a matrix has by the number of columns a matrix has will be called the dimension of the matrix. For example, \(A\) is a \(m\times n\) matrix.
Definition 59 (\(A=B\))
Two matrices are equal if they have the same dimension and if corresponding elements, position by position, are equal.
but
Example 114
Find the values of the variables for which each statement is true, if possible.
\(\left[\begin{matrix}2 & 1\\ p & q \end{matrix}\right]=\left[\begin{matrix}x & y\\ -1 & 0 \end{matrix}\right]\)
\(\left[\begin{matrix}x\\ y \end{matrix}\right]=\left[\begin{matrix}1\\ 4\\ 0 \end{matrix}\right]\)
Solution:
For (1) By definition we have
That is, \(x=2\), \(y=1\), \(p=-1\), and \(q=0\).
For (2), by definition since the dimensions of the two matrices do not match the two matrices cannot equal.
Definition 60 (Addition of Matrices)
To add matrices of the same dimension, add corresponding elements. **Only matrices of the same dimension can be added.
Example 115
Add
Solution:
Definition 61 (Scalar and Scalar Multiplication)
In the context of matrices, a real number is called a scalar to distinguish it from a matrix.
The product of a scalar \(k\) and a matrix \(X\) is the matrix \(kX\), each of whose elements is \(k\) times the corresponding element of \(X\).
For example
Also,
Definition 62 (Properties of Scalar Multiplication)
Let \(A\) and \(B\) be matrices of the same dimension, and let \(c\) and \(d\) be scalars. Then these properties hold true.
\((c+d)A=cA+dA\)
\((cA)d=(cd)A\)
\(c(A+B)=cA+cB\)
\((cd)A=c(dA)\)
Example 116 (Subtraction of Matrices)
If \(A\) and \(B\) are two matrices of the same dimension, then the following holds true
Multiplication
For multiplication the process is not intuitive. That is,
Instead, multiplication between two matrices would be performed in the following way
If \(A=\left[\begin{matrix}3 & 5\end{matrix}\right]\) (which is \(1\times2\)) and \(B=\left[\begin{matrix}-2\\ 4\end{matrix}\right]\) (which is \(2\times1\)) we see that in order to perform the calculation the number of columns of the first matrix must match the number of rows of the second matrix.
Definition 63 (Matrix Multiplication)
The number of columns of an \(m\times n\) matrix \(A\) is the same as the number of rows of and \(n\times p\) matrix \(B\) (i.e., both \(n\)). The element \(c_{ij}\) of the product matrix \(C=AB\) is found as follows
Matrix \(AB\) will be an \(m\times p\) matrix.
Theorem 12
In general, if \(A\) and \(B\) are matrices, then
That is, Matrix Multiplication is not commutative.
Theorem 13 (Matrix Multiplication Properties)
If \(A\), \(B\), and \(C\) are matrices such that all the following products and sums exist, then these properties hold true
\((AB)C=A(BC)\)
\(A(B+C)=AB+AC\)
\((B+C)A=BA+CA\) (pay attention to the order of the multiplication since matrix multiplication is not commutative.)
Example 117
Suppose \(A\) is a \(3\times 2\) matrix, while \(B\) is a \(2\times 4\) matrix.
The sum \(A+B\) is impossible since the dimensions of the two matrices do not equal.
The product of \(A\cdot B\) does exist since the number of columns for matrix \(A\) (2) matches the number of rows for matrix \(B\) (2). The resulting matrix (after the product) will be a \(3\times 4\) matrix.
The product of \(B\cdot A\) does not exists since the number of columns for matrix \(B\) (4) does not equal the number of rows for matrix \(A\) (3).
Example 118
Let \(A=\left[\begin{matrix}1 & -3\\ 7 & 2 \end{matrix}\right]\) and \(B=\left[\begin{matrix}1 & 0 & -1 & 2\\ 3 & 1 & 4 & -1 \end{matrix}\right]\).
Find each product, if possible.
Multiply \(A\cdot B\).
Solution:
Since \(A\) has dimension \(2\times n=2\times2\) where \(n=2\) and \(B\) has dimension \(n\times4\) where \(n=2\) the two matrices can be multiplied. The resulting matrix should be a \(2\times4\) matrix.
Multiply \(B\cdot A\).
Solution:
Since the number of columns and rows do not match the product is not possible.
Example 119
Let \(A=\left[\begin{matrix}2 & -5\\ -6 & 1 \end{matrix}\right]\) and \(B=\left[\begin{matrix}3 & -4\\ 2 & 3 \end{matrix}\right]\).
Multiply \(A\cdot B\).
Solution:
The product \(A\cdot B\) is possible since the number of columns of the first matrix matches the number of rows of the second. The resulting matrix will be a \(2\times2\) matrix.
Multiply \(B\cdot A\)
Solution:
The product of \(B\cdot A\) is possible since the number of columns of the first matrix matches the number of rows of the second. The resulting matrix will be a \(2\times2\) matrix.
Notice in the last example \(A\cdot B\ne B\cdot A\).