Use row and column matrices of ones to extract totals
Matrix \(N\) records the numbers of seedlings planted in several community gardens. Each row represents one garden; each column represents one seedling type
Row order: School garden, Park garden, Creek garden, Station garden. Column order: Lettuce, Tomatoes, Herbs, Beans
\[N = \begin{bmatrix} 4 & 10 & 5 & 7 \\ 3 & 11 & 5 & 4 \\ 7 & 5 & 11 & 12 \\ 12 & 5 & 8 & 10 \end{bmatrix}\]
The following row and column matrices of 1s are available
\[R = \begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}, \qquad C = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}\]