Matrix operations

Module 12 โ€” Matrix Operations

The big idea Choose the operation from the dimensions, then keep the row and column meanings through each calculation.

Break down Module 12 Matrix Operations

Use this if matrix sizes, addition, scalar multiplication, and matrix multiplication are mixing together.

Not sure about the basics underneath this lesson?

Preparation targets

AssignmentTextbook sectionPractice focus
Matrix Add ยง5.1 Dimensions, entries, equality, addition and scalar combinations
Matrix Multi ยง5.2 Compatible dimensions, inner products, full products and applications

Read a matrix before calculating

A matrix with 2 rows and 3 columns has size 2 ร— 3. The entry aโ‚‚โ‚ƒ sits in row 2, column 3. Count rows first, then columns.

Two matrices are equal when their sizes match and every corresponding entry agrees. For example, if the top-left entries are x + 2 and 9, then x + 2 = 9.

Addition, subtraction, and scaling

Add or subtract corresponding positions only when both sizes match. Scalar multiplication applies to every entry. A โˆ’ B means subtract every entry of B, including negative entries.

Original worked example:

A=[4โˆ’327],B=[โˆ’1560]A=\begin{bmatrix}4&-3\\2&7\end{bmatrix},\quad B=\begin{bmatrix}-1&5\\6&0\end{bmatrix}
2Aโˆ’B=[8โˆ’(โˆ’1)โˆ’6โˆ’54โˆ’614โˆ’0]=[9โˆ’11โˆ’214]2A-B=\begin{bmatrix}8-(-1)&-6-5\\4-6&14-0\end{bmatrix}=\begin{bmatrix}9&-11\\-2&14\end{bmatrix}

If rows are stores and columns are products, keep those labels in the same order before combining inventories.

Multiply a row by a column

For an m ร— n matrix times an n ร— p matrix, the inner sizes n must agree; the result has size m ร— p. Entry (i, j) uses row i of the first matrix and column j of the second. Multiply matching positions, then add the products.

[3โˆ’24][51โˆ’1]=3(5)+(โˆ’2)(1)+4(โˆ’1)=9\begin{bmatrix}3&-2&4\end{bmatrix}\begin{bmatrix}5\\1\\-1\end{bmatrix}=3(5)+(-2)(1)+4(-1)=9

For a whole product, repeat this calculation for every output position. Matrix multiplication does not generally give AB = BA; the reverse order may even be undefined.

Interpret the product

Original example: rows of Q represent two market stalls; columns represent posters and notebooks.

Q=[8539],p=[64],Qp=[6854]Q=\begin{bmatrix}8&5\\3&9\end{bmatrix},\quad p=\begin{bmatrix}6\\4\end{bmatrix},\quad Qp=\begin{bmatrix}68\\54\end{bmatrix}

Each entry of Qp is one stallโ€™s revenue in dollars: quantities ร— matching prices, summed across products. Reversing the price order would change the meaning and the answer. For technology checks, enter each row carefully, verify dimensions, and compare one hand-computed entry with the output.

Try it before checking

Use the Practice quiz for fresh problems, then Explain-it for two short written checks. Work on paper first. The practice feedback explains the method; it is not a WebAssign answer key.