For a matinee movie, a movie theater charges the following prices:

Kids: $5 Adults: $8 Seniors: $6

For the same movie at night, the theater charges the following prices:

Kids: $7 Adults: $10 Seniors: $8

How could we organize this data to easily compare the prices?

### Matrices

A **matrix** consists of data that is organized into rows and columns to form a rectangle. For example, we could organize the data collected at a movie theater concession stand during a matinee show into the follow matrix:

\begin{align*}& \quad S \quad M \quad L\\ \begin{matrix} \text{popcorn}\\ \quad \ \text{soda}\end{matrix} & \begin{bmatrix} 20 & 46 & 32\\ 15 & 53 & 29\end{bmatrix}\end{align*}

Now we can easily compare the quantities of each size sold. These values in the matrix are called **elements.**

This particular matrix has two rows and three columns. Matrices are often described in terms of **dimensions** (rows by columns). This matrix is a \begin{align*}2 \times 3\end{align*} (read as '2 by 3') matrix.

The variables \begin{align*}m\end{align*} (rows) and \begin{align*}n\end{align*} (columns) are most often used to represent unknown dimensions. Matrices in which the number of rows equals the number of columns \begin{align*}(m=n)\end{align*} are called **square matrices**.

Matrices which have the same dimensions and all corresponding elements equal are said to be **equal matrices**.

Let's solve the following problems about matrices.

- Using the matrix above, what is the value of the element in the second row, second column?

\begin{align*}& \qquad \qquad \qquad \quad {\color{red}{\text{Column 2}}}\\ & \qquad \qquad \quad \quad \qquad \ \ \downarrow\\ & \quad \qquad \qquad \ \ \ \quad S \quad \ \ M \ \ \quad L\\ & \begin{matrix} \qquad \ \ \text{popcorn}\\ {\color{red}{\text{Row 2}}} \rightarrow \text{soda}\end{matrix} \begin{bmatrix} 20 & 46 & 32\\ 15 & \boxed{53} & 29 \end{bmatrix}\end{align*}

We must see where the second row and second column overlap and identify the element in that location. In this case. it is 53.

- Determine the dimensions \begin{align*}(m \times n)\end{align*} of the matrices below.

\begin{align*}\begin{bmatrix} 3 & 2\\ -1 & 0 \end{bmatrix}\end{align*}

This matrix has 2 rows and 2 columns. Therefore it is a \begin{align*}2 \times 2\end{align*} matrix.

\begin{align*}\begin{bmatrix} 4 & -3 & 2 & 7\\ 3 & 5 & -4 & 6\\ 9 & 1 & 0 & -2 \end{bmatrix}\end{align*}

This matrix has 3 rows and 4 columns. Therefore it is a \begin{align*}3 \times 4\end{align*} matrix.

\begin{align*}\begin{bmatrix} 2\\ -3\\ 1 \end{bmatrix}\end{align*}

This matrix has 3 rows and 1 column. Therefore it is a \begin{align*}3 \times 1\end{align*} matrix.

- Which two matrices are equal? Explain your answer.

\begin{align*}A = \begin{bmatrix} 1 & -5\\ -2 & 4\\ 8 & 3 \end{bmatrix} \qquad B = \begin{bmatrix} -5 & 4 & 3\\ 1 & -2 & 8 \end{bmatrix} \qquad C = \begin{bmatrix} 1 & -5\\ -2 & 4\\ 8 & 3 \end{bmatrix}\end{align*}

Matrices \begin{align*}A\end{align*} and \begin{align*}C\end{align*} are equal matrices. They are both \begin{align*}3 \times 2\end{align*} matrices and have all of the same elements. Matrix \begin{align*}B\end{align*} is a \begin{align*}2 \times 3\end{align*} matrix so even though it contains the same elements, they are arranged differently preventing it from being equal to the other two.

### Examples

#### Example 1

Earlier, you were asked how to organize the data to easily compare the prices of a movie theater.

To make it easy to compare prices, we could organize the data in matrix like this one:

\begin{align*} & \ \ \ K \quad A \quad S\\ \begin{matrix} \text{Matinee}\\ \ \ \ \text{Night}\end{matrix} & \begin{bmatrix} 5 & 8 & 6\\ 7 & 10 & 8\end{bmatrix}\end{align*}

#### Example 2

What are the dimensions of the matrix: \begin{align*}[ 3 \quad -5 \quad 1 \quad 0]\end{align*}?

The dimensions are \begin{align*}1 \times 4\end{align*}.

#### Example 3

In the matrix\begin{align*}\begin{bmatrix} 8 & -5 & 4\\ -2 & 6 & -3\\ 3 & 0 & -7\\ 1 & 3 & 9 \end{bmatrix}\end{align*} what is the element in the second row, third column?

The element in the second row, third column is -3 as shown below:

\begin{align*}& \qquad \qquad \qquad \qquad {\color{red}{\text{Column 3}}}\\ & \qquad \quad \qquad \qquad \qquad \ \downarrow\\ & \begin{matrix} {\color{red}{\text{Row 2 }}} \rightarrow \end{matrix} \begin{bmatrix} \\ 8 & -5 & 4\\ -2 & 6 & \boxed{-3}\\ 3 & 0 & -7\\ 1 & 3 & 9\end{bmatrix}\end{align*}

#### Example 4

Are the matrices \begin{align*}A = [-1 \quad 4 \quad 9]\end{align*} and \begin{align*}B = \begin{bmatrix} -1\\ 4\\ 9 \end{bmatrix}\end{align*} equal matrices?

No, \begin{align*}A\end{align*} and \begin{align*}B\end{align*} are not equal matrices. They have the same elements, but the dimensions are not the same.

### Review

Use the matrices below to answer questions 1-7 that follow:

\begin{align*}A = \begin{bmatrix} 2 & 3 & 1\\ -5 & -8 & 4 \end{bmatrix} \qquad B = \begin{bmatrix} 2 & 1\\ -3 & 5 \end{bmatrix} \qquad C = \begin{bmatrix} -5 & 1 & 3\\ 8 & -2 & 6\\ 4 & 9 & 7 \end{bmatrix}\end{align*}

\begin{align*}D = \begin{bmatrix} 2 & 1\\ -3 & 5 \end{bmatrix} \qquad E = \begin{bmatrix} -5 & 2\\ -8 & 3\\ 4 & 1 \end{bmatrix} \qquad F = \begin{bmatrix} 5 & -1 & 8\\ -2 & 6 & -3\\ \end{bmatrix}\end{align*}

- What are the dimensions of
- Matrix \begin{align*}B\end{align*}?
- Matrix \begin{align*}E\end{align*}?
- Matrix \begin{align*}F\end{align*}?

- Which matrices have the same dimensions?
- Which matrices are square matrices?
- Which matrices are equal?
- What is the element in row 1, column 2 of Matrix \begin{align*}C\end{align*}?
- What is the element in row 3, column 1 of Matrix \begin{align*}E\end{align*}?
- What is the element in row 1, column 1 of Matrix \begin{align*}D\end{align*}?
- Write a matrix with dimensions \begin{align*}3 \times 4\end{align*}.
- Write a matrix with dimensions \begin{align*}7 \times 2\end{align*}.

For problems 10-14, determine if the statements are true or false.

- A \begin{align*}3 \times 2\end{align*} and a \begin{align*}2 \times 3\end{align*} are equal.
- Two matrices are equal if every element within the two matrices is the same.
- A matrix is a way to organize data.
- The element in row 2, column 2 in \begin{align*}F\end{align*} above is -1.
- The element in row 2, column 2 in \begin{align*}F\end{align*} above is 6.
- Organize the data into a matrix: A math teacher gave her class three tests during the semester. On the first test there were 10 A’s, 8 B’s, 12 C’s, 4 D’s and 1 F. On the second test there were 8 A’s, 11 B’s, 14 C’s, 2 D’s and 0 F’s. On the third test there were 13 A’s, 7 B’s, 8 C’s, 4 D’s and 3 F’s.

### Answers for Review Problems

To see the Review answers, open this PDF file and look for section 4.1.