2.1 Introduction to Matrices

In this section, you will learn to:
  1. Add and subtract matrices
  2. Multiply a matrix by a scalar (a single number)
  3. Multiply two matrices together

Why should you care about matrices? In the real world, we deal with huge amounts of interconnected data. If you manage a supply chain, you track inventory across dozens of locations. If you work in finance, you analyze correlations between thousands of stocks. If you're a data scientist, you process images (which are just grids of pixels) or social network connections.

Matrices give us a compact way to organize this data and powerful tools to manipulate it. They're the engine behind computer graphics, encryption systems, economic forecasting, and artificial intelligence. Learning to work with matrices is like learning to use a spreadsheet on steroids -- you'll be able to solve complex systems of equations and transform data in ways that would be impossible with basic arithmetic alone.

2.1.1 What Is a Matrix?

Definition 2.1.1: Matrix

A matrix is a rectangular array of numbers arranged in rows and columns. We use matrices to organize, store, and manipulate mathematical information efficiently.

Instead of writing dozens of separate equations or keeping data in scattered tables, we can package everything into a single mathematical object that we can add, subtract, and multiply according to specific rules.

Example 2.1.1

Fine Furniture Company manufactures chairs and tables at three factories located in San Jose, Hayward, and Oakland. The table below shows total production (in hundreds of units) for the years 2014 and 2015.

20142015
ChairsTablesChairsTables
San Jose30183620
Hayward20122418
Oakland16102012

a) Represent the production for 2014 and 2015 as matrices \(\mathbf{A}\) and \(\mathbf{B}\).

b) Find the difference in production between 2015 and 2014.

c) If the company predicts 2020 production will be double the 2014 levels, what will the 2020 production matrix be?

Solution

a) We organize the data into \(3 \times 2\) matrices (3 factories x 2 products):

\[\mathbf{A} = \begin{bmatrix} 30 & 18 \\ 20 & 12 \\ 16 & 10 \end{bmatrix} \quad \text{and} \quad \mathbf{B} = \begin{bmatrix} 36 & 20 \\ 24 & 18 \\ 20 & 12 \end{bmatrix}\]

b) To find the change in production, we subtract matrix \(\mathbf{A}\) from matrix \(\mathbf{B}\). When two matrices have the same dimension, we subtract them entry by entry:

\[\mathbf{B} - \mathbf{A} = \begin{bmatrix} 36-30 & 20-18 \\ 24-20 & 18-12 \\ 20-16 & 12-10 \end{bmatrix} = \begin{bmatrix} 6 & 2 \\ 4 & 6 \\ 4 & 2 \end{bmatrix}\]

This result shows that every factory increased production of both items.

c) To find the 2020 prediction, we multiply every entry of \(\mathbf{A}\) by the scalar 2:

\[2\mathbf{A} = 2 \begin{bmatrix} 30 & 18 \\ 20 & 12 \\ 16 & 10 \end{bmatrix} = \begin{bmatrix} 60 & 36 \\ 40 & 24 \\ 32 & 20 \end{bmatrix}\]

2.1.2 Matrix Terminology

Before we explore more operations, let's establish the vocabulary we'll use throughout this chapter.

Definition 2.1.2: Matrix Vocabulary
  • Entries (or Elements): The individual numbers inside a matrix.
  • Dimension (or Size): Written as "rows x columns." A matrix with 3 rows and 2 columns is a \(3 \times 2\) matrix. We always list rows first, then columns.
  • Square Matrix: A matrix with the same number of rows and columns (e.g., \(3 \times 3\)).
  • Zero Matrix: A matrix where every entry is 0.
  • Identity Matrix: A square matrix with 1s along the main diagonal (top-left to bottom-right) and 0s everywhere else. When you multiply any matrix by an identity matrix of the appropriate size, the original matrix stays unchanged.
  • Row Vector: A matrix with only one row (dimension \(1 \times n\)).
  • Column Vector: A matrix with only one column (dimension \(m \times 1\)).
  • Matrix Equality: Two matrices are equal only if they have the same dimension and every corresponding entry is identical.

For example:

\[\mathbf{A} = \begin{bmatrix} 1 & 4 & -2 & 0 \\ 3 & -1 & 7 & 9 \\ 6 & 2 & 0 & 5 \end{bmatrix} \quad \text{has dimension } 3 \times 4\] \[\mathbf{I} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \quad \text{is the } 3 \times 3 \text{ identity matrix}\]

Think of matrix dimensions like the DNA of the matrix. Just as you can't add a 2x3 matrix to a 3x2 matrix (they're different "species"), you must pay attention to dimensions before performing any operation. The dimension tells you what operations are legal and what the result will look like.

2.1.3 Matrix Addition and Subtraction

If two matrices have the same dimension, you can add or subtract them by combining corresponding entries.

Why does entry-by-entry addition make sense? Think back to the furniture company example. If you want total production across two years, you add the number of chairs made in San Jose in 2014 to the number made in 2015. You don't add chairs to tables, and you don't add San Jose production to Oakland production. Each entry represents a specific category, so we only combine matching categories.

Example 2.1.2

Given the following matrices:

\[\mathbf{A} = \begin{bmatrix} 1 & 2 & 4 \\ 2 & 3 & 1 \\ 5 & 0 & 3 \end{bmatrix} \quad \mathbf{B} = \begin{bmatrix} 2 & -1 & 3 \\ 2 & 4 & 2 \\ 3 & 6 & 1 \end{bmatrix} \quad \mathbf{C} = \begin{bmatrix} 4 \\ 2 \\ 3 \end{bmatrix} \quad \mathbf{D} = \begin{bmatrix} -2 \\ -3 \\ 4 \end{bmatrix}\]

Find, if possible:

a) \(\mathbf{A} + \mathbf{B}\)   b) \(\mathbf{C} - \mathbf{D}\)   c) \(\mathbf{A} + \mathbf{D}\)

Solution

a) We add each corresponding entry of \(\mathbf{A}\) and \(\mathbf{B}\):

\[\mathbf{A} + \mathbf{B} = \begin{bmatrix} 1+2 & 2+(-1) & 4+3 \\ 2+2 & 3+4 & 1+2 \\ 5+3 & 0+6 & 3+1 \end{bmatrix} = \begin{bmatrix} 3 & 1 & 7 \\ 4 & 7 & 3 \\ 8 & 6 & 4 \end{bmatrix}\]

b) Subtracting entry by entry:

\[\mathbf{C} - \mathbf{D} = \begin{bmatrix} 4-(-2) \\ 2-(-3) \\ 3-4 \end{bmatrix} = \begin{bmatrix} 6 \\ 5 \\ -1 \end{bmatrix}\]

c) The sum \(\mathbf{A} + \mathbf{D}\) does not exist because \(\mathbf{A}\) is \(3 \times 3\) while \(\mathbf{D}\) is \(3 \times 1\). They have different dimensions.

Important Rule: You can only add or subtract matrices with identical dimensions.

2.1.4 Scalar Multiplication

When you multiply a matrix by a scalar (a regular number like 2, -5, or 0.5), you multiply every entry in the matrix by that number.

Example 2.1.3

Using matrices \(\mathbf{A}\) and \(\mathbf{C}\) from Example 2.1.2, find:

a) \(2\mathbf{A}\)   b) \(-3\mathbf{C}\)

Solution

a) Multiply each entry of \(\mathbf{A}\) by 2:

\[2\mathbf{A} = \begin{bmatrix} 2(1) & 2(2) & 2(4) \\ 2(2) & 2(3) & 2(1) \\ 2(5) & 2(0) & 2(3) \end{bmatrix} = \begin{bmatrix} 2 & 4 & 8 \\ 4 & 6 & 2 \\ 10 & 0 & 6 \end{bmatrix}\]

b) Multiply each entry of \(\mathbf{C}\) by -3:

\[-3\mathbf{C} = \begin{bmatrix} -3(4) \\ -3(2) \\ -3(3) \end{bmatrix} = \begin{bmatrix} -12 \\ -6 \\ -9 \end{bmatrix}\]

2.1.5 Matrix Multiplication

Multiplying two matrices is more complex than addition or scalar multiplication. Unlike regular multiplication, we do not multiply entry by entry. Instead, we use a "row-by-column" process that combines data in specific ways.

Why do we multiply matrices this strange way? Matrix multiplication represents the composition of transformations or the calculation of weighted totals. For example, if matrix \(\mathbf{A}\) contains production quantities and matrix \(\mathbf{B}\) contains profit per unit for different products, then \(\mathbf{AB}\) calculates total profit. Each entry in the product matrix represents a dot product -- a sum of products -- that captures how one row of the first matrix interacts with one column of the second.

The Basic Case: Row Vector x Column Vector

To multiply a row matrix by a column matrix, multiply corresponding entries and sum the results. The result is a \(1 \times 1\) matrix (a single number).

Example 2.1.4

Given \(\mathbf{A} = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}\) and \(\mathbf{B} = \begin{bmatrix} a \\ b \\ c \end{bmatrix}\), find \(\mathbf{AB}\).

Solution
\[\mathbf{AB} = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix} \begin{bmatrix} a \\ b \\ c \end{bmatrix} = \begin{bmatrix} 2a + 3b + 4c \end{bmatrix}\]

The result is a \(1 \times 1\) matrix containing the single value \(2a + 3b + 4c\).

Example 2.1.5

Given \(\mathbf{A} = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}\) and \(\mathbf{B} = \begin{bmatrix} 5 \\ 6 \\ 7 \end{bmatrix}\), find \(\mathbf{AB}\).

Solution
\[\mathbf{AB} = \begin{bmatrix} 2(5) + 3(6) + 4(7) \end{bmatrix} = \begin{bmatrix} 10 + 18 + 28 \end{bmatrix} = \begin{bmatrix} 56 \end{bmatrix}\]

Requirement: For a row vector (\(1 \times n\)) to multiply a column vector (\(n \times 1\)), they must have the same number of entries (\(n\)).

Multiplying Larger Matrices

To multiply larger matrices, we extend this row-by-column idea. Each entry in the product matrix is the result of multiplying a row from the first matrix by a column from the second matrix.

Example 2.1.6

Given \(\mathbf{A} = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}\) (\(1 \times 3\)) and \(\mathbf{B} = \begin{bmatrix} 5 & 3 \\ 6 & 4 \\ 7 & 5 \end{bmatrix}\) (\(3 \times 2\)), find \(\mathbf{AB}\).

Solution

We multiply the row of \(\mathbf{A}\) by each column of \(\mathbf{B}\):

  • First column: \(2(5) + 3(6) + 4(7) = 10 + 18 + 28 = 56\)
  • Second column: \(2(3) + 3(4) + 4(5) = 6 + 12 + 20 = 38\)
\[\mathbf{AB} = \begin{bmatrix} 56 & 38 \end{bmatrix}\]

The result is a \(1 \times 2\) matrix.

Notice the "middle" dimensions must match: a \(1 \times \mathbf{3}\) matrix times a \(\mathbf{3} \times 2\) matrix. The 3s match, and they "cancel out," leaving a \(1 \times 2\) result. This pattern holds for all matrix multiplication.

Example 2.1.7

Given \(\mathbf{A} = \begin{bmatrix} 2 & 3 & 4 \\ 1 & 2 & 3 \end{bmatrix}\) (\(2 \times 3\)) and \(\mathbf{B} = \begin{bmatrix} 5 & 3 \\ 6 & 4 \\ 7 & 5 \end{bmatrix}\) (\(3 \times 2\)), find \(\mathbf{AB}\).

Solution

We multiply each row of \(\mathbf{A}\) by each column of \(\mathbf{B}\):

Row 1 of \(\mathbf{A}\):

  • Col 1 of \(\mathbf{B}\): \(2(5) + 3(6) + 4(7) = 56\)
  • Col 2 of \(\mathbf{B}\): \(2(3) + 3(4) + 4(5) = 38\)

Row 2 of \(\mathbf{A}\):

  • Col 1 of \(\mathbf{B}\): \(1(5) + 2(6) + 3(7) = 5 + 12 + 21 = 38\)
  • Col 2 of \(\mathbf{B}\): \(1(3) + 2(4) + 3(5) = 3 + 8 + 15 = 26\)
\[\mathbf{AB} = \begin{bmatrix} 56 & 38 \\ 38 & 26 \end{bmatrix}\]

The result is a \(2 \times 2\) matrix.

Example 2.1.8

Given:

\[\mathbf{E} = \begin{bmatrix} 1 & 2 \\ 4 & 2 \\ 3 & 1 \end{bmatrix} \quad \mathbf{F} = \begin{bmatrix} 2 & -1 \\ 3 & 2 \end{bmatrix} \quad \mathbf{G} = \begin{bmatrix} 4 & 1 \end{bmatrix} \quad \mathbf{H} = \begin{bmatrix} -3 \\ -1 \end{bmatrix}\]

Find, if possible: a) \(\mathbf{EF}\)   b) \(\mathbf{FE}\)   c) \(\mathbf{FH}\)   d) \(\mathbf{GH}\)   e) \(\mathbf{HG}\)

Solution

a) \(\mathbf{E}\) is \(3 \times 2\), \(\mathbf{F}\) is \(2 \times 2\). The product exists and will be \(3 \times 2\):

\[\mathbf{EF} = \begin{bmatrix} 1(2)+2(3) & 1(-1)+2(2) \\ 4(2)+2(3) & 4(-1)+2(2) \\ 3(2)+1(3) & 3(-1)+1(2) \end{bmatrix} = \begin{bmatrix} 8 & 3 \\ 14 & 0 \\ 9 & -1 \end{bmatrix}\]

b) \(\mathbf{FE}\) does not exist. \(\mathbf{F}\) has 2 columns, but \(\mathbf{E}\) has 3 rows. The "middle" dimensions (2 and 3) don't match.

c) \(\mathbf{F}\) is \(2 \times 2\), \(\mathbf{H}\) is \(2 \times 1\). The product is \(2 \times 1\):

\[\mathbf{FH} = \begin{bmatrix} 2(-3) + (-1)(-1) \\ 3(-3) + 2(-1) \end{bmatrix} = \begin{bmatrix} -5 \\ -11 \end{bmatrix}\]

d) \(\mathbf{G}\) is \(1 \times 2\), \(\mathbf{H}\) is \(2 \times 1\). The product is \(1 \times 1\):

\[\mathbf{GH} = \begin{bmatrix} 4(-3) + 1(-1) \end{bmatrix} = \begin{bmatrix} -13 \end{bmatrix}\]

e) \(\mathbf{H}\) is \(2 \times 1\), \(\mathbf{G}\) is \(1 \times 2\). The product is \(2 \times 2\):

\[\mathbf{HG} = \begin{bmatrix} -3(4) & -3(1) \\ -1(4) & -1(1) \end{bmatrix} = \begin{bmatrix} -12 & -3 \\ -4 & -1 \end{bmatrix}\]

Critical Rules for Matrix Multiplication:

  1. Dimension Requirement: If \(\mathbf{A}\) is \(m \times n\) and \(\mathbf{B}\) is \(n \times p\), then \(\mathbf{AB}\) exists and has dimension \(m \times p\). The inner dimensions (\(n\)) must be equal.
  2. Non-Commutativity: Even if both \(\mathbf{AB}\) and \(\mathbf{BA}\) exist, they are usually not equal. Matrix multiplication is not commutative.
Example 2.1.9

Given:

\[\mathbf{R} = \begin{bmatrix} 1 & 0 & 2 \\ 2 & 1 & 5 \\ 2 & 3 & 1 \end{bmatrix} \quad \mathbf{S} = \begin{bmatrix} 0 & -1 & 2 \\ 3 & 1 & 0 \\ 4 & 2 & 1 \end{bmatrix} \quad \mathbf{T} = \begin{bmatrix} -2 & 3 & 0 \\ -3 & 2 & 2 \\ -1 & 1 & 0 \end{bmatrix}\]

Find \(2\mathbf{RS} - 3\mathbf{ST}\).

Solution

First, calculate \(\mathbf{RS}\):

\[\mathbf{RS} = \begin{bmatrix} 8 & 3 & 4 \\ 23 & 9 & 9 \\ 13 & 3 & 5 \end{bmatrix}\]

Multiply by scalar 2:

\[2\mathbf{RS} = \begin{bmatrix} 16 & 6 & 8 \\ 46 & 18 & 18 \\ 26 & 6 & 10 \end{bmatrix}\]

Next, calculate \(\mathbf{ST}\):

\[\mathbf{ST} = \begin{bmatrix} 1 & 0 & -2 \\ -9 & 11 & 2 \\ -15 & 17 & 4 \end{bmatrix}\]

Multiply by scalar 3:

\[3\mathbf{ST} = \begin{bmatrix} 3 & 0 & -6 \\ -27 & 33 & 6 \\ -45 & 51 & 12 \end{bmatrix}\]

Finally, subtract:

\[2\mathbf{RS} - 3\mathbf{ST} = \begin{bmatrix} 16-3 & 6-0 & 8-(-6) \\ 46-(-27) & 18-33 & 18-6 \\ 26-(-45) & 6-51 & 10-12 \end{bmatrix} = \begin{bmatrix} 13 & 6 & 14 \\ 73 & -15 & 12 \\ 71 & -45 & -2 \end{bmatrix}\]
Example 2.1.10

Given \(\mathbf{F} = \begin{bmatrix} 2 & -1 \\ 3 & 2 \end{bmatrix}\), find \(\mathbf{F}^2\).

Solution

\(\mathbf{F}^2\) means \(\mathbf{F} \times \mathbf{F}\). We multiply the matrix by itself:

\[\mathbf{F}^2 = \begin{bmatrix} 2 & -1 \\ 3 & 2 \end{bmatrix} \begin{bmatrix} 2 & -1 \\ 3 & 2 \end{bmatrix} = \begin{bmatrix} 2(2)+(-1)(3) & 2(-1)+(-1)(2) \\ 3(2)+2(3) & 3(-1)+2(2) \end{bmatrix} = \begin{bmatrix} 1 & -4 \\ 12 & 1 \end{bmatrix}\]

Warning: \(\mathbf{F}^2\) is not found by squaring each individual entry! If you simply squared each number in \(\mathbf{F}\), you'd get \(\begin{bmatrix} 4 & 1 \\ 9 & 4 \end{bmatrix}\), which is completely wrong. Matrix powers require matrix multiplication.

Also, you can only raise square matrices to powers, because the dimensions must match for multiplication (\(n \times n\) times \(n \times n\)).

2.1.6 Using Matrices to Represent Linear Systems

One of the most powerful applications of matrix multiplication is compactly representing systems of linear equations. Instead of writing:

\[\begin{cases} ax + by = h \\ cx + dy = k \end{cases}\]

We can write the single matrix equation:

\[\mathbf{AX} = \mathbf{B}\]

Where:

Example 2.1.11

Verify that the system \(\begin{cases} ax + by = h \\ cx + dy = k \end{cases}\) can be written as \(\mathbf{AX} = \mathbf{B}\), where:

\[\mathbf{A} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \quad \mathbf{X} = \begin{bmatrix} x \\ y \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} h \\ k \end{bmatrix}\]
Solution

Multiply \(\mathbf{A}\) and \(\mathbf{X}\):

\[\mathbf{AX} = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}\]

If \(\mathbf{AX} = \mathbf{B}\), then:

\[\begin{bmatrix} ax + by \\ cx + dy \end{bmatrix} = \begin{bmatrix} h \\ k \end{bmatrix}\]

Since two matrices are equal only if all corresponding entries are equal, we get: \(ax + by = h\) and \(cx + dy = k\). This confirms the matrix equation represents the original system.

Example 2.1.12

Express the following system as a matrix equation \(\mathbf{AX} = \mathbf{B}\):

\[\begin{cases} 2x + 3y - 4z = 5 \\ 3x + 4y - 5z = 6 \\ 5x - 6z = 7 \end{cases}\]
Solution

Identify the coefficients (note that \(5x - 6z = 7\) means the coefficient of \(y\) is 0):

\[\mathbf{A} = \begin{bmatrix} 2 & 3 & -4 \\ 3 & 4 & -5 \\ 5 & 0 & -6 \end{bmatrix}, \quad \mathbf{X} = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} 5 \\ 6 \\ 7 \end{bmatrix}\]

So the system becomes:

\[\begin{bmatrix} 2 & 3 & -4 \\ 3 & 4 & -5 \\ 5 & 0 & -6 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 5 \\ 6 \\ 7 \end{bmatrix}\]

Problem Set 2.1

Problems 1-5: A vendor sells hot dogs and corn dogs at three locations. Sales (in hundreds) for January and February are:

JanuaryFebruary
Hot DogsCorn DogsHot DogsCorn Dogs
Place I10887
Place II8667
Place III6465

Represent these as \(3 \times 2\) matrices \(\mathbf{J}\) (January) and \(\mathbf{F}\) (February).

1. Find total sales for both months: \(\mathbf{J} + \mathbf{F}\).

Problem 1 Solution

Using \(\mathbf{J} = \begin{bmatrix} 10 & 8 \\ 8 & 6 \\ 6 & 4 \end{bmatrix}\) and \(\mathbf{F} = \begin{bmatrix} 8 & 7 \\ 6 & 7 \\ 6 & 5 \end{bmatrix}\). Add corresponding entries:

\[\mathbf{J} + \mathbf{F} = \begin{bmatrix} 18 & 15 \\ 14 & 13 \\ 12 & 9 \end{bmatrix}\]

Answer: \(\mathbf{J} + \mathbf{F} = \begin{bmatrix} 18 & 15 \\ 14 & 13 \\ 12 & 9 \end{bmatrix}\). Place I sold 1,800 hot dogs and 1,500 corn dogs total, Place II sold 1,400 and 1,300, and Place III sold 1,200 and 900.

2. Find the difference in sales: \(\mathbf{J} - \mathbf{F}\).

Problem 2 Solution

Subtract corresponding entries:

\[\mathbf{J} - \mathbf{F} = \begin{bmatrix} 2 & 1 \\ 2 & -1 \\ 0 & -1 \end{bmatrix}\]

Answer: \(\mathbf{J} - \mathbf{F} = \begin{bmatrix} 2 & 1 \\ 2 & -1 \\ 0 & -1 \end{bmatrix}\). Positive values mean January outsold February; negative values mean February outsold January.

3. If hot dogs sell for $3 and corn dogs for $2, find total revenue. Hint: Let \(\mathbf{P} = \begin{bmatrix} 3 \\ 2 \end{bmatrix}\) and calculate \((\mathbf{J} + \mathbf{F})\mathbf{P}\).

Problem 3 Solution

Using \(\mathbf{J} + \mathbf{F} = \begin{bmatrix} 18 & 15 \\ 14 & 13 \\ 12 & 9 \end{bmatrix}\) from Problem 1:

\[(\mathbf{J} + \mathbf{F})\mathbf{P} = \begin{bmatrix} 18(3) + 15(2) \\ 14(3) + 13(2) \\ 12(3) + 9(2) \end{bmatrix} = \begin{bmatrix} 84 \\ 68 \\ 54 \end{bmatrix}\]

Answer: \((\mathbf{J} + \mathbf{F})\mathbf{P} = \begin{bmatrix} 84 \\ 68 \\ 54 \end{bmatrix}\). Place I earned $8,400, Place II $6,800, Place III $5,400.

4. If March sales increase by 10%, 15%, and 20% over February at Places I, II, and III respectively, find expected March sales. Hint: Let \(\mathbf{R} = \begin{bmatrix} 1.10 & 1.15 & 1.20 \end{bmatrix}\) and find \(\mathbf{M} = \mathbf{RF}\).

Problem 4 Solution

\(\mathbf{R}\) is \(1 \times 3\) and \(\mathbf{F}\) is \(3 \times 2\). The product is \(1 \times 2\):

Column 1: \(1.10(8) + 1.15(6) + 1.20(6) = 8.80 + 6.90 + 7.20 = 22.90\)

Column 2: \(1.10(7) + 1.15(7) + 1.20(5) = 7.70 + 8.05 + 6.00 = 21.75\)

\[\mathbf{M} = \begin{bmatrix} 22.90 & 21.75 \end{bmatrix}\]

Answer: \(\mathbf{M} = \begin{bmatrix} 22.90 & 21.75 \end{bmatrix}\) (in hundreds). Expected: 2,290 hot dogs and 2,175 corn dogs.

5. Using matrix \(\mathbf{M}\) from problem 4 and price matrix \(\mathbf{P}\) from problem 3, find \(\mathbf{MP}\).

Problem 5 Solution

\(\mathbf{M}\) is \(1 \times 2\) and \(\mathbf{P}\) is \(2 \times 1\), so the product is \(1 \times 1\):

\[\mathbf{MP} = \begin{bmatrix} 22.90(3) + 21.75(2) \end{bmatrix} = \begin{bmatrix} 68.70 + 43.50 \end{bmatrix} = \begin{bmatrix} 112.20 \end{bmatrix}\]

Answer: \(\mathbf{MP} = \begin{bmatrix} 112.20 \end{bmatrix}\). This represents $11,220 in total predicted March revenue.

Problems 6-13: Given:

\[\mathbf{A} = \begin{bmatrix} 3 & 6 & 1 \\ 0 & 1 & 3 \\ 2 & 4 & 1 \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} 1 & -1 & 2 \\ 1 & 4 & 2 \\ 3 & 1 & 1 \end{bmatrix}, \quad \mathbf{C} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, \quad \mathbf{D} = \begin{bmatrix} 2 & 3 & 2 \end{bmatrix}\]

6. Find \(3\mathbf{A} - 2\mathbf{B}\)

Problem 6 Solution

\(3\mathbf{A} = \begin{bmatrix} 9 & 18 & 3 \\ 0 & 3 & 9 \\ 6 & 12 & 3 \end{bmatrix}\), \(2\mathbf{B} = \begin{bmatrix} 2 & -2 & 4 \\ 2 & 8 & 4 \\ 6 & 2 & 2 \end{bmatrix}\)

\[3\mathbf{A} - 2\mathbf{B} = \begin{bmatrix} 7 & 20 & -1 \\ -2 & -5 & 5 \\ 0 & 10 & 1 \end{bmatrix}\]

7. Find \(\mathbf{AB}\)

Problem 7 Solution

Both \(3 \times 3\). Using row-by-column multiplication:

\[\mathbf{AB} = \begin{bmatrix} 12 & 22 & 19 \\ 10 & 7 & 5 \\ 9 & 15 & 13 \end{bmatrix}\]

8. Find \(\mathbf{BA}\)

Problem 8 Solution

Both \(3 \times 3\). Using row-by-column multiplication:

\[\mathbf{BA} = \begin{bmatrix} 7 & 13 & 0 \\ 7 & 18 & 15 \\ 11 & 23 & 7 \end{bmatrix}\]

Note: \(\mathbf{AB} \neq \mathbf{BA}\), confirming matrix multiplication is not commutative.

9. Find \(\mathbf{AB} + \mathbf{BA}\)

Problem 9 Solution

Using results from Problems 7 and 8, add corresponding entries:

\[\mathbf{AB} + \mathbf{BA} = \begin{bmatrix} 19 & 35 & 19 \\ 17 & 25 & 20 \\ 20 & 38 & 20 \end{bmatrix}\]

10. Find \(\mathbf{A}^2\)

Problem 10 Solution

\(\mathbf{A}^2 = \mathbf{A} \times \mathbf{A}\) (not squaring each entry):

\[\mathbf{A}^2 = \begin{bmatrix} 11 & 28 & 22 \\ 6 & 13 & 6 \\ 8 & 20 & 15 \end{bmatrix}\]

11. Find \(2\mathbf{BC}\)

Problem 11 Solution

\(\mathbf{BC}\) (\(3 \times 3\) times \(3 \times 1\) = \(3 \times 1\)):

\[\mathbf{BC} = \begin{bmatrix} 5 \\ 15 \\ 8 \end{bmatrix}, \quad 2\mathbf{BC} = \begin{bmatrix} 10 \\ 30 \\ 16 \end{bmatrix}\]

12. Find \(2\mathbf{CD} + 3\mathbf{AB}\)

Problem 12 Solution

\(\mathbf{CD}\) is the outer product (\(3 \times 1\) times \(1 \times 3\) = \(3 \times 3\)):

\[\mathbf{CD} = \begin{bmatrix} 2 & 3 & 2 \\ 4 & 6 & 4 \\ 6 & 9 & 6 \end{bmatrix}\]

\(2\mathbf{CD} = \begin{bmatrix} 4 & 6 & 4 \\ 8 & 12 & 8 \\ 12 & 18 & 12 \end{bmatrix}\), \(3\mathbf{AB} = \begin{bmatrix} 36 & 66 & 57 \\ 30 & 21 & 15 \\ 27 & 45 & 39 \end{bmatrix}\)

\[2\mathbf{CD} + 3\mathbf{AB} = \begin{bmatrix} 40 & 72 & 61 \\ 38 & 33 & 23 \\ 39 & 63 & 51 \end{bmatrix}\]

13. Find \(\mathbf{A}^2\mathbf{B}\)

Problem 13 Solution

From Problem 10, \(\mathbf{A}^2 = \begin{bmatrix} 11 & 28 & 22 \\ 6 & 13 & 6 \\ 8 & 20 & 15 \end{bmatrix}\). Multiply by \(\mathbf{B}\):

\[\mathbf{A}^2\mathbf{B} = \begin{bmatrix} 105 & 123 & 100 \\ 37 & 52 & 44 \\ 73 & 87 & 71 \end{bmatrix}\]

Problems 14-17: Let \(\mathbf{E} = \begin{bmatrix} m & n \\ p & q \end{bmatrix}\) and \(\mathbf{F} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\).

14. Find \(\mathbf{EF}\).

Problem 14 Solution

Both \(2 \times 2\). Apply row-by-column rule:

\[\mathbf{EF} = \begin{bmatrix} ma + nc & mb + nd \\ pa + qc & pb + qd \end{bmatrix}\]

15. Find \(\mathbf{FE}\).

Problem 15 Solution

Both \(2 \times 2\). Apply row-by-column rule:

\[\mathbf{FE} = \begin{bmatrix} am + bp & an + bq \\ cm + dp & cn + dq \end{bmatrix}\]

\(\mathbf{EF} \neq \mathbf{FE}\) in general, confirming non-commutativity.

Let \(\mathbf{G} = \begin{bmatrix} 3 & 6 & 1 \\ 0 & 1 & 3 \\ 2 & 4 & 1 \end{bmatrix}\) and \(\mathbf{H} = \begin{bmatrix} x \\ y \\ z \end{bmatrix}\).

16. Find \(\mathbf{GH}\).

Problem 16 Solution

\(\mathbf{G}\) is \(3 \times 3\), \(\mathbf{H}\) is \(3 \times 1\). Product is \(3 \times 1\):

\[\mathbf{GH} = \begin{bmatrix} 3x + 6y + z \\ y + 3z \\ 2x + 4y + z \end{bmatrix}\]

17. Explain why \(\mathbf{HG}\) does not exist.

Problem 17 Solution

\(\mathbf{H}\) is \(3 \times 1\) and \(\mathbf{G}\) is \(3 \times 3\). The number of columns of \(\mathbf{H}\) (1) does not equal the number of rows of \(\mathbf{G}\) (3). Since \(1 \neq 3\), the inner dimensions do not match, and \(\mathbf{HG}\) does not exist.

Problems 18-21: Express as \(\mathbf{AX} = \mathbf{B}\):

18. \(\begin{cases} 4x - 5y = 6 \\ 5x - 6y = 7 \end{cases}\)

Problem 18 Solution
\[\begin{bmatrix} 4 & -5 \\ 5 & -6 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 6 \\ 7 \end{bmatrix}\]

19. \(\begin{cases} x - 2y + 2z = 3 \\ x - 3y + 4z = 7 \\ x - 2y - 3z = -12 \end{cases}\)

Problem 19 Solution
\[\begin{bmatrix} 1 & -2 & 2 \\ 1 & -3 & 4 \\ 1 & -2 & -3 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 3 \\ 7 \\ -12 \end{bmatrix}\]

20. \(\begin{cases} 2x + 3z = 17 \\ 3x - 2y = 10 \\ 5y + 2z = 11 \end{cases}\)

Problem 20 Solution

Note missing variables have coefficient 0:

\[\begin{bmatrix} 2 & 0 & 3 \\ 3 & -2 & 0 \\ 0 & 5 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 17 \\ 10 \\ 11 \end{bmatrix}\]

21. \(\begin{cases} x + 2y + 3z + 2w = 14 \\ x - 2y - z = -5 \\ y - 2z + 4w = 9 \\ x + 3z + 3w = 15 \end{cases}\)

Problem 21 Solution

Missing variables get coefficient 0:

\[\begin{bmatrix} 1 & 2 & 3 & 2 \\ 1 & -2 & -1 & 0 \\ 0 & 1 & -2 & 4 \\ 1 & 0 & 3 & 3 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ w \end{bmatrix} = \begin{bmatrix} 14 \\ -5 \\ 9 \\ 15 \end{bmatrix}\]