Extract row and column totals
Use F with rows [20, 35, 15] and [12, 18, 24], for Rose and Tulip sales over Fri, Sat and Sun. A column of ones on the right gives flower totals, while a row of ones on the left gives day totals
- Put a column of ones on the right Right multiplication by a column of ones adds across each row \(\displaystyle F\begin{bmatrix}1\\1\\1\end{bmatrix}=\begin{bmatrix}70\\54\end{bmatrix}\)
- Put a row of ones on the left Left multiplication by a row of ones adds down each column \(\displaystyle \begin{bmatrix}1&1\end{bmatrix}F=\begin{bmatrix}32&53&39\end{bmatrix}\)
- Match the inner dimensions The adjacent dimensions must be equal for the product to be defined \(\displaystyle (2\times3)(3\times1)\text{ is defined}\)
- Use both sides for a grand total A row of ones, the data matrix and a column of ones produce one grand total \(\displaystyle (1\times2)(2\times3)(3\times1)=1\times1\)
Worked example
Let A have rows [3, 8, 4] and [6, 2, 5]. Use a column of ones to find both row totals
- \(\displaystyle J=\begin{bmatrix}1\\1\\1\end{bmatrix}\text{ has order }3\times1\)The column of ones has three entries, matching the three columns of A
- \(\displaystyle 3\times1+8\times1+4\times1=15\)Multiplying the first row by J gives the first row total of 15
- \(\displaystyle 6\times1+2\times1+5\times1=13\)Multiplying the second row by J gives the second row total of 13
- \(\displaystyle AJ=\begin{bmatrix}15\\13\end{bmatrix}\)The product lists the two row totals in the same row order as A
Common mistakes
Difficulty levels
Questions about this topic
Why does a column of ones on the right give row totals?+
Each row is multiplied by every entry in the column of ones, so the row entries are added together
What order should the column of ones have?+
It must have one row for each column of the data matrix. For a 2 by 3 matrix, use a 3 by 1 column
How can a grand total be found by matrix multiplication?+
Multiply a row of ones on the left, the data matrix, and a column of ones on the right. The resulting 1 by 1 matrix is the grand total
Can I use a calculator?+
No. This topic is practised without a calculator
Which year level and chapter is this?+
Year 12, VCE Units 3 & 4, General Mathematics, chapter 10: Matrices