Skip to main content

Section 3.3 Bakery Application

Activity 3.3.1.

Suppose that we work for a company that makes baked goods, including cakes, doughnuts, and eclairs. The company operates two bakeries, Bakery 1 and Bakery 2. In one hour of operation,
  • Bakery 1 produces 10 cakes, 50 doughnuts, and 30 eclairs.
  • Bakery 2 produces 20 cakes, 30 doughnuts, and 30 eclairs.
If Bakery 1 operates for \(x_1\) hours and Bakery 2 for \(x_2\) hours, we will use the vector \(\xvec=\twovec{x_1}{x_2}\) to describe the operation of the two bakeries.
We would like to describe a matrix transformation \(T\) where \(\xvec\) describes the number of hours the bakeries operate and \(T(\xvec)\) describes the total number of cakes, doughnuts, and eclairs produced. That is, \(T(\xvec) = \threevec{y_1}{y_2}{y_3}\) where \(y_1\) is the number of cakes, \(y_2\) is the number of doughnuts, and \(y_3\) is the number of eclairs produced.
  1. If \(T:\real^n\to\real^m\text{,}\) what are the values of \(m\) and \(n\text{,}\) and what is the shape of the associated matrix \(A\text{?}\)
  2. We can determine the matrix \(A\) in the usual way. For instance, \(T\left(\twovec10\right)\) will describe the number of cakes, doughnuts, and eclairs produced when Bakery 1 operates for one hour and Bakery 2 sits idle. What is this vector?
  3. In the same way, determine \(T\left(\twovec01\right)\text{.}\) What is the matrix \(A\text{?}\)
  4. If Bakery 1 operates for 120 hours and Bakery 2 for 180 hours, what is the total number of cakes, doughnuts, and eclairs produced?

    Sage practices.

    Here are some practices that you may find helpful when working with matrices and vectors in Sage.
    • Break the matrix entries across lines, one for each row, for better readability by pressing Enter between rows.
    • To enter a vector: v=vector([2,3])
    • To enter a matrix : A=matrix(#rows,# columns, [enter entries row by row, each entry separted by a comma])
    • Sage can perform scalar multiplication and vector addition. We define a vector using the vector command; then * and + denote scalar multiplication and vector addition.
    • Print your original matrix to check that you have entered it correctly. You may want to also print a dividing line to separate matrices.
          A = matrix(2, 2, [ 1, 2,
                             2, 2])
          print (A)
          print ("---------")
              
  5. Suppose that in one period of time, the company produces 5060 cakes, 14310 doughnuts, and 10470 eclairs. How long did each bakery operate?
  6. Suppose that the company receives an order for a certain number of cakes, doughnuts, and eclairs. Can you guarantee that you can fill the order without having leftovers?
Solution.
    1. Since both the inputs and the outputs of \(T\) are two-dimensional, it follows that \(T:\real^2\to\real^2\) and that \(A\) is a \(2\times2\) matrix.
    2. Since
      \begin{equation*} T\left(\twovec10\right) = \twovec01,~~~ T\left(\twovec01\right) = \twovec{-1}0, \end{equation*}
      we have \(A=\begin{bmatrix} 0 \amp -1 \\ 1 \amp 0 \\ \end{bmatrix}\text{.}\)
    3. Multiplying \(T(\vvec) = A\vvec = \twovec{1}{-2}\text{,}\) which agrees with the vector shown in the figure.
    4. \(T\left(\twovec xy\right) = \twovec{-y}{x}\text{.}\)
    1. The shape of matrix \(A\) is \(3\times 2\text{,}\) and \(T:\real^2\to\real^3\text{.}\)
    2. \(T\left(\twovec10\right) = \threevec{10}{50}{30}\text{.}\)
    3. \(A = \begin{bmatrix} 10 \amp 20 \\ 50 \amp 30 \\ 30 \amp 30 \\ \end{bmatrix} \text{.}\)
    4. \(T\left(\twovec{120}{180}\right) = \threevec{4800}{11400}{9000}\text{.}\)
    5. We solve the equation \(T(\xvec) = A\xvec = \threevec{5060}{14310}{10470}\) to obtain \(\xvec = \twovec{192}{157}.\)
    6. No, you cannot guarantee this because the two columns of \(A\) cannot span \(\real^3\text{.}\) If we view an order received as a three-dimensional vector \(\bvec\text{,}\) then a solution to the equation \(A\xvec = \bvec\) tells us how long to operate the two bakeries to produce this order. However, since \(A\) is a \(3\times 2\) matrix, it must have a row without a pivot position, which means that the equation \(A\xvec = \bvec\) will be inconsistent for some vectors \(\bvec\text{.}\)