# 4.1: Defining and Comparing Matrices

**At Grade**Created by: CK-12

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?

### Watch This

Watch the first part of this video, until about 4:45.

Khan Academy: Introduction to matrices

### Guidance

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 \ }\\ \text{ \quad 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 its **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**.

#### Example A

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

**Solution:**

\begin{align*}& \qquad \qquad \qquad \qquad {\color{red}{\text{Column 2}}}\\ & \qquad \qquad \quad \qquad \qquad \ \ \downarrow\\ & \quad \qquad \qquad \qquad \quad S \quad M \quad L\\ & \begin{matrix} \text{\qquad \ \ 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.

#### Example B

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

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

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

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

**Solution:**

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

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

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

#### Example C

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*}

**Solution:**

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.

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

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

### Guided Practice

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

2. 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?

3. 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?

#### Answers

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

2. 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*}

3. 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.

### Vocabulary

- Matrix
- A rectangular arrangement of data elements presented in rows and columns.

- Elements
- The values (numbers) in a matrix.

- Dimensions
- The number of rows, \begin{align*}m\end{align*}, and columns, \begin{align*}n\end{align*}, in a matrix.

- Square matrices
- Matrices in which the number of rows equals the number of columns, or \begin{align*}m=n\end{align*}.

- Equal matrices
- Matrices which have the same dimensions and elements.

### Practice

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*}.

Determine if the following statements are true or false.

- A \begin{align*}3x2\end{align*} and a \begin{align*}2x3\end{align*} are equal.
- Two matrices are equal if every element within the two matrices are 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.

### Notes/Highlights Having trouble? Report an issue.

Color | Highlighted Text | Notes | |
---|---|---|---|

Show More |

Term | Definition |
---|---|

diagonal matrix |
A diagonal matrix is a matrix composed of zeroes in all positions aside from along the diagonal. |

Dimensions |
The number of rows, , and columns, , in a matrix. |

Elements |
The values (numbers) in a matrix. |

Equal matrices |
Equal matrices are matrices that have the same dimensions and elements. |

identity matrix |
An identity matrix is a matrix with zeros everywhere except along the diagonal where there are ones. |

Matrices |
Matrices are rectangular arrangements of data elements presented in rows and columns. |

Matrix |
A matrix is a rectangular arrangement of data elements presented in rows and columns. |

order |
The order of a matrix describes the number of rows and the number of columns in the matrix. |

Square matrices |
Square matrices are matrices in which the number of rows equals the number of columns. |

Square matrix |
A square matrix is a matrix in which the number of rows equals the number of columns. |

symmetric matrix |
A symmetric matrix is a square matrix with reflection symmetry across the main diagonal. |

transpose of a matrix |
The transpose of a matrix is a new matrix whose columns and rows have been switched. This changes the order of the matrix from, for example, to . |

triangular matrix |
A triangular matrix is described as either upper or lower triangular . The opposite portion of the matrix is entirely zeros. |

### Image Attributions

Here you'll recognize that some data is most clearly organized and presented in a matrix, understand how to define a matrix and be able to compare matrices.

## Concept Nodes:

# We need you!

At the moment, we do not have exercises for **Defining and Comparing Matrices**.