Lesson 3 Matrix Operations
3.2 Lecture Notes
3.2.1 Matrix Notation: \(A_{m \times n}\)
- A matrix is a rectangular array of numbers arranged in rows and columns.
- The notation \(A_{m \times n}\) refers to a matrix with:
- \(m\) rows
- \(n\) columns
- Example: \[ A_{2 \times 3} = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \]
3.2.2 Notation for Matrix Entries: \(a_{ij}\)
- Each element in a matrix is denoted as \(a_{ij}\):
- \(i\) is the row number
- \(j\) is the column number
- Example: \[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}, \] then \[ a_{23} = 6 \;\;\;\;\; \text{and} a_{12} = 2. \]
3.2.3 Matrix Addition and Subtraction
- Two matrices can only be added or subtracted if they have the same dimensions.
- Add/subtract corresponding elements: \[ A + B = \begin{bmatrix} a_{ij} + b_{ij} \end{bmatrix} \]
- Example: \[ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix} \] —
3.2.4 Scalar Multiplication
- Multiply each element of a matrix by a scalar value \(c\): \[ cA = \begin{bmatrix} c \cdot a_{ij} \end{bmatrix} \]
- Example: \[ 3 \cdot \begin{bmatrix} 2 & -1 \\ 0 & 4 \end{bmatrix} = \begin{bmatrix} 6 & -3 \\ 0 & 12 \end{bmatrix} \]
3.2.5 Matrix Multiplication
- To multiply \(A_{m \times n}\) by \(B_{n \times p}\), the number of columns of A must equal the number of rows of B.
- The result is a matrix \(C_{m \times p}\).
- Each element \(c_{ij}\) is computed by the dot product of row \(i\) of \(A\) and column \(j\) of \(B\): \[ c_{ij} = \sum_{k=1}^n a_{ik} b_{kj} \]
- Example: \[ \begin{bmatrix} 2 & -1 \\ 0 & 4 \end{bmatrix} \cdot \begin{bmatrix} 6 & -3 \\ 0 & 12 \end{bmatrix} = \begin{bmatrix} 2 \cdot 6 + (-1) \cdot 0 & 2 \cdot (-3) + (-1) \cdot 12 \\ 0 \cdot 6 + 4 \cdot 0 & 0 \cdot (-3) + 4 \cdot 12 \end{bmatrix} = \begin{bmatrix} 6 & -18 \\ 0 & 48 \end{bmatrix} \]
3.3 Examples
3.3.1 Addition and Subtraction
- Evaluate:
\[ \begin{bmatrix} 15 & -10 \\ 11 & -2 \end{bmatrix} \quad + \quad \begin{bmatrix} 18 & 2 \\ 5 & -4 \end{bmatrix} \]
- Given the matrices, find \(A + B\):
\[ A = \begin{bmatrix} 0 & 4 \\ 4 & 0 \end{bmatrix} \quad\text{and}\quad B = \begin{bmatrix} 5 & 5 \\ 1 & 4 \end{bmatrix} \]
- Add:
\[ \begin{bmatrix} 7 & 4 & 5 \\ -6 & -3 & 3 \\ -1 & 8 & 3 \end{bmatrix} \quad + \quad \begin{bmatrix} 6 & 3 & 0 \\ -2 & -5 & 2 \\ -5 & 7 & 7 \end{bmatrix} \]
- Evaluate:
\[ \begin{bmatrix} -7 & -4 \\ -9 & 4 \end{bmatrix} - \begin{bmatrix} x & y \\ z & w \end{bmatrix} = \begin{bmatrix} -16 & -12 \\ 1 & -2 \end{bmatrix} \]
- Let:
\[ D = \begin{bmatrix} 3 & 1 & -7 & 2 \\ 4 & -4 & 10 & -1 \\ -5 & -9 & 6 & -10 \end{bmatrix}. \]
Find \(2D\).
- Given:
\[ A = \begin{bmatrix} -11 & -2 & -3 \\ -5 & -1 & 0 \\ 5 & 1 & 1 \end{bmatrix}, \]
find \(A^T\) (the transpose of \(A\)).
3.3.2 Multiplication
- Suppose matrix \(P\) is \(2 \times 3\), \(C\) is \(2 \times 2\), and \(A\) is \(2 \times 3\).
Which of the following may be possible to compute?
- \(P(A + C)\)
- \(PA\)
- \(AP\)
- \(PC\)
- \(A^T\)
- \(CA\)
- \(P(AC)\)
- \(A^{-1}\)
Compute: \[ \begin{bmatrix} 2 & 1 \\ 5 & 1 \end{bmatrix} \begin{bmatrix} 0 & 5 \\ 5 & -1 \end{bmatrix} \]
Compute:
\[ \begin{bmatrix} -3 & 1 & -3 \\ -2 & -2 & 2 \\ -5 & -3 & 1 \end{bmatrix} \begin{bmatrix} 4 & 0 & -2 \\ 3 & -1 & 2 \\ -3 & -1 & -3 \end{bmatrix} \]
Find \(AB\), given \[ A = \begin{bmatrix} 1 & -2 \\ -5 & -2 \\ 0 & 1 \\ -4 & -2 \end{bmatrix}, \quad \text{and} \quad B = \begin{bmatrix} -4 & -5 & 3 & 1 \\ 2 & 5 & 0 & 4 \end{bmatrix} \]
Find \(AB\) and \(BA\), given \[ A = \begin{bmatrix} 1 \\ 0 \\ 4 \\ -2 \end{bmatrix}, \quad B = \begin{bmatrix} 6 & -7 & -1 & 8 \end{bmatrix} \]
Let: \[ M = \begin{bmatrix} 4 & -3 & 0 \\ 2 & -1 & 5 \end{bmatrix} \]
- If \(A = M + M^T\), then \(A\) is a symmetric matrix. Yes / No
- If \(B = M \cdot M^T\), then \(B\) is a symmetric matrix. Yes / No
- Find \(B\).
- If \(A = M + M^T\), then \(A\) is a symmetric matrix. Yes / No
3.4 Practice Problems
Let
\[ A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \\ -1 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 0.25 & -1 \\ 0 & 0.5 \\ -1 & 3 \end{bmatrix}, \quad C = \begin{bmatrix} 1 & -1 \\ 1 & 1 \\ -1 & -1 \end{bmatrix} \] Calculate:- \(A + B\)
- \(A - C\)
- \(3A\)
- \(2A + 0.5C\)
- \(C^T + B^T\)
- \(A + B\)
A matrix is symmetric if it equals its transpose. Give examples of nonzero symmetric \(2 \times 2\) and \(3 \times 3\) matrices.
Compute (if possible):
\[ \begin{bmatrix} 0 & 1 & -1 \\ 3 & 1 & -1 \end{bmatrix} \times \begin{bmatrix} 1 & 1 \\ 4 & 2 \\ 0 & 1 \end{bmatrix} \]Compute (if possible):
\[ \begin{bmatrix} 0 & 1 & -1 & 2 \end{bmatrix} \times \begin{bmatrix} 1 & -2 & 1 \\ 0 & 1 & 3 \\ 6 & 0 & 2 \\ -1 & -2 & 11 \end{bmatrix} \]Let
\[ A = \begin{bmatrix} 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix} \]
Compute \(A^2\), \(A^3\), \(A^4\), and \(A^{100}\).(Applied) Left Coast Bookstore has two stores with inventory of hardcover, softcover, and plastic books. Given starting stock, sales, and restocking monthly amounts,
- Find total sales over 6 months by store and book type.
- Find inventory at the end of June.
- Compute total revenue if hardcover sells for $30, softcover for $10, plastic for $15.
- Find total sales over 6 months by store and book type.
3.5 Self-Assessment
Time yourself and solve within 20 minutes:
Given matrices \(A, B, C\) from earlier, calculate:
- \(A + B - C\)
- \(3B^T\)
- \(A^T + C^T\)
- \(3A^T - 2C^T\)
- \(2A + 3B\)
- \(A + B - C\)
A matrix is skew-symmetric if it equals the negative of its transpose. Give examples of nonzero skew-symmetric \(2 \times 2\) and \(3 \times 3\) matrices.
Explain why this product is impossible:
\[ \begin{bmatrix} 0 & 2 & -1 \end{bmatrix} \times \begin{bmatrix} 1 & -2 & 1 \\ -1 & -2 & 11 \end{bmatrix} \]Compute the product:
\[ \begin{bmatrix} 1 & 1 & -7 & 0 \\ -1 & 0 & -2 & 1 \\ 1 & -1 & 1 & 1 \end{bmatrix} \times \begin{bmatrix} 1 \\ -3 \\ 2 \\ 1 \end{bmatrix} \]Karen Sandberg sold various T-shirts. Use matrix operations to compute her total revenue.
3.6 Lesson Checklist
This checklist is designed to help you keep track of what you need to work on. The main goal is to be aware of what you need to focus more attention on. Place an \(X\) in the appropriate box beside the skill below.
\[\begin{align*} &\textbf{Developing (D):} &&\textrm{You still need to work on this skill.}\\ &\textbf{Consistent (CON):} &&\textrm{You use the skill correctly most of the time.}\\ &\textbf{Competent (COM):} &&\textrm{You show mastery of the skill.} \end{align*}\]
Skill | D | CON | COM |
---|---|---|---|
Addition, subtraction, scalar multiplication | |||
Matrix multiplication | |||
Applied problems using matrices |