Mathematics, Statistics & Physics Wichita State University Logo

Math 511: Linear Algebra¶

Problem Set 3 - Exploring Multiplication¶

Small Business Sales¶


Table 1¶

Tacos Burritos Drinks
Mon 40 25 30
Tue 35 30 28
Wed 52 20 45
Thu 45 38 41

A food truck parked near campus records how many of each item it sells per day. The table shows the units of tacos, burritos, and drinks sold on each of four days. Use the table to create a matrix $M$ to represent the data. Input $M$ into a software program or a graphing utility and use it to answer the questions below.

The matrix $M$ has columns ${\color{blue}{\begin{bmatrix} 40\\35\\52\\45 \end{bmatrix}}}$ that represent the ${\color{blue}{\text{Tacos}}}$ sold, ${\color{purple}{\begin{bmatrix} 25\\30\\20\\38 \end{bmatrix}}}$ that represent the ${\color{purple}{\text{Burritos}}}$ sold, and ${\color{green}{\begin{bmatrix} 30\\28\\45\\41 \end{bmatrix}}}$ that represent the ${\color{green}{\text{Drinks}}}$ sold.

$$ M = \begin{bmatrix} 40 & 25 & 30 \\ 35 & 30 & 28 \\ 52 & 20 & 45 \\ 45 & 38 & 41 \end{bmatrix} $$

Each row is a day (Mon, Tue, Wed, Thu) and each column is a product. The truck charges $\$4$ per taco, $\$7$ per burrito, and $\$3$ per drink; collect these in a price vector $\mathbf{p} = \begin{bmatrix} 4 \\ 7 \\ 3 \end{bmatrix}$.

Since this page was created all students in this class pay for a subscription to MATLAB with their fees. This subscription persists throughout the current semester. In MATLAB enter the following commands at the >> command prompt in the command window.

>> M = [ 40 25 30; 35 30 28; 52 20 45; 45 38 41 ]

The semicolons separate rows in matrix $M$, and the spaces separate columns in each row. Matrix $M$ has three columns. Column 1 represents the tacos sold on each day. It is possible to create a text file with all of the commands you enter along with the MATLAB responses. MATLAB will start saving the command window output after the command

>> diary salesproject.txt

Here the MATLAB command is diary and the name of the file created with the log in it is salesproject.txt. MATLAB will continue to add all command window output to the log file until the command

>> diary off

is entered at the command prompt. There are some very useful commands in MATLAB for using matrices and sub-matrices, or slices. Normally one uses a comma-delimited list to access an element of a matrix. One accesses the element in the second row, and first column,

>> M(2,1)

However one can access an entire row, or an entire column using matrix multiplication, or the colon : operator.

Table 2¶

  1. Enter the matrix.
  2. Access element $M(2,1)$.
  3. Access the first column, $M(:,1)$. This means all rows, and first column.
  4. Access the first row, $M(1,:)$. This means first row, and all columns.

In this problem set everyone will be required to use matrix multiplication instead of slices to access elements or sub-matrices.

For example, "How would you use matrix multiplication to obtain element $M(2,1)$ of matrix $M$?" We know from section 2.1 that $\mathbf{e}_2^\mathsf{T}M\mathbf{e}_1 = M_{21}$. Can you describe in words what this element represents? Your description should include units. You must supply both your matrix multiplication and a meaningful description when answering problems in this problem set.


1.¶

Which product sold the most over the four days? Which sold the least? Explain how you can see this from the columns of $M$.

2.¶

How would you rank the four days by total items sold?

3.¶

Describe the meanings of the matrix products $M\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}$, $M\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}$, and $M\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}$. This does not mean describe their algebraic result. Explain what each result represents.

4.¶

Describe the meanings of the matrix products $\begin{bmatrix} 1 & 0 & 0 & 0 \end{bmatrix}M$ and $\begin{bmatrix} 0 & 0 & 1 & 0 \end{bmatrix}M$.

5.¶

Describe the meanings of the matrix products $M\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}$ and $\frac{1}{3}M\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}$.

6.¶

Describe the meanings of the matrix products $\begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}M$ and $\frac{1}{4}\begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}M$.

7.¶

Describe the meaning of the matrix product $\begin{bmatrix} 0 & 0 & 1 & 1 \end{bmatrix}M$. Then write down the row vector you would multiply $M$ by to obtain the combined Monday and Wednesday sales of each product.

8.¶

Describe the meaning of the matrix product $\begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}M\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}$.

9.¶

Using the price vector $\mathbf{p} = \begin{bmatrix} 4 \\ 7 \\ 3 \end{bmatrix}$, describe the meaning of the matrix product $M\mathbf{p}$. Then describe the meaning of $\begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}M\mathbf{p}$.

10.¶

Use matrix multiplication to find the combined overall average number of items sold per day.

11.¶

How could you use matrix multiplication to model a 10% increase in taco sales (scaling only the Tacos column by $1.1$ and leaving the other columns unchanged)?