Unit 9 · Topic 4.10 · Optional
Matrices
Organize numerical information in rows and columns, then multiply compatible matrices by pairing each row of the first matrix with each column of the second.
Learning Goals
- Identify matrix dimensions and locate an entry by row and column.
- Add, subtract, and scalar-multiply matrices with compatible dimensions.
- Determine whether a matrix product is defined and predict its dimensions.
- Calculate each product entry as a row-column dot product.
- Explain why matrix multiplication generally depends on order.
- Construct and interpret matrix products in numerical contexts.
1. A Matrix Is a Rectangular Array
A matrix organizes numbers into rows and columns. Capital letters usually name matrices, while lowercase indexed letters name their entries:
The entry \(a_{ij}\) is located in row i and column j. Always read the row index first.
2. Dimensions Are Rows by Columns
The matrix
has 2 rows and 3 columns, so its dimensions are \(2\times3\). Here \(a_{12}=-1\) and \(a_{23}=0\).
3. Common Matrix Shapes
| Type | Dimensions or property |
|---|---|
| Row matrix | \(1\times n\) |
| Column matrix | \(m\times1\) |
| Square matrix | \(n\times n\) |
| Zero matrix | Every entry equals 0 |
| Identity matrix | Square with 1s on the main diagonal and 0s elsewhere |
A vector \(\langle x,y\rangle\) can be represented as the \(2\times1\) column matrix \(\begin{bmatrix}x\\y\end{bmatrix}\).
4. Rows and Columns Carry Structure
Rows often represent cases or categories, while columns represent measured variables. The meaning depends on the labels and units supplied by the context, so rearranging rows or columns changes the interpretation.
5. Equality, Addition, and Subtraction
Two matrices are equal only when they have the same dimensions and every corresponding entry is equal. Addition and subtraction also require equal dimensions:
A \(2\times2\) matrix cannot be added to a \(2\times3\) matrix because some entries have no corresponding partner.
6. Scalar Multiplication
Multiply every entry by the scalar:
The dimensions remain unchanged. This operation is different from multiplying two matrices.
7. Matrix Multiplication Is Not Entrywise
In the product \(AB\), every output entry combines one complete row of A with one complete column of B. If
then \(AB\) is defined and has dimensions \(m\times n\). The matching inner dimension r is consumed; the outer dimensions describe the result.
8. Check Dimensions Before Calculating
| Product | Defined? | Result dimensions |
|---|---|---|
| \((2\times3)(3\times4)\) | Yes: inner dimensions are 3 | \(2\times4\) |
| \((3\times2)(2\times1)\) | Yes: inner dimensions are 2 | \(3\times1\) |
| \((2\times3)(2\times3)\) | No: 3 does not equal 2 | Undefined |
| \((1\times4)(4\times1)\) | Yes: inner dimensions are 4 | \(1\times1\) |
Having the same dimensions does not guarantee that two matrices can be multiplied.
9. Each Entry Is a Row-Column Dot Product
If \(C=AB\), then the entry in row i, column j is
For a row \(\begin{bmatrix}a&b&c\end{bmatrix}\) and column \(\begin{bmatrix}p\\q\\r\end{bmatrix}\), their contribution is the scalar \(ap+bq+cr\). Move across the columns of B to complete one output row, then move to the next row of A.
10. Worked \(2\times2\) Product
Let
The product is defined and will be \(2\times2\):
For example, the lower-left entry 23 is row 2 of A dotted with column 1 of B.
11. Rectangular Matrix Times a Column Vector
The dimensions are \((2\times3)(3\times1)=(2\times1)\). Each output component is the dot product of one matrix row with the input vector.
12. Order Usually Matters
Using the same A and B from the \(2\times2\) example,
Therefore, \(AB\ne BA\). In other cases, one order may be defined while the reverse order is not. Never switch multiplication order without justification.
13. Useful Product Properties
| Property | Statement when products are defined |
|---|---|
| Associative | \((AB)C=A(BC)\) |
| Left distributive | \(A(B+C)=AB+AC\) |
| Right distributive | \((A+B)C=AC+BC\) |
| Identity | \(AI=IA=A\), with compatible identity matrices |
| Not generally commutative | \(AB\ne BA\) in general |
14. Context Example: Equipment Costs
Suppose goals, balls, and jerseys cost 300, 10, and 30 dollars. The two columns below list quantities for Teams A and B:
The first dot product \(300(6)+10(30)+30(14)=2520\) gives Team A's total. The second gives Team B's total. Matrix order and labels make the units meaningful: price per item times item counts produces dollars.
15. AP Workflow and Common Errors
- Write each matrix's dimensions as rows by columns.
- For \(AB\), compare columns of A with rows of B.
- Predict the product's outer dimensions before calculating.
- Place each output at the intersection of its chosen row and column.
- Multiply corresponding entries and add.
- Repeat systematically across columns and down rows.
- Check the result's dimensions, labels, and units.
- Do not read \(a_{ij}\) as column i, row j.
- Do not multiply matrices entry by entry.
- Do not assume equal-sized matrices are automatically multipliable.
- Do not reverse \(AB\) to \(BA\).
- Do not use the inner dimensions as the product dimensions.
- Do not omit a term from a row-column dot product.
Key Takeaways
- Perform matrix operations and interpret rows, columns, dimensions, and products.
- Core relationship: \((AB)_{ij}=\sum_k a_{ik}b_{kj}\)
- Error check: Matrix multiplication is not entry-by-entry multiplication and is not generally commutative.
- State the dimensions of \(\begin{bmatrix}2&0&-1\\5&3&4\end{bmatrix}\) and identify \(a_{23}\).
- For A of size \(4\times2\) and B of size \(2\times3\), decide whether \(AB\) and \(BA\) are defined and give each possible result's dimensions.
- Calculate \(\begin{bmatrix}2&-1\\0&3\end{bmatrix}\begin{bmatrix}4&5\\2&-2\end{bmatrix}\).
- Calculate \(\begin{bmatrix}1&2&-1\\3&0&4\end{bmatrix}\begin{bmatrix}2\\-1\\5\end{bmatrix}\).
- Construct a matrix product that gives the total revenue from three product prices and quantities sold at two stores; label the dimensions and units.