Skip to main content

Section 2.1 Introduction to Matrix Arithmetic

We will stop thinking about matrices as representing linear systems, and instead think of matrices as being kind of like numbers.
When we were children, we learned about numbers and their names and numerals, then how to count, how to add, subtract, and multiply, and various properties of those operations that led us to be able to solve equations containing unknown numbers. All of this took years to became second nature, but we will build on the knowledge and familiarity with how numbers work to understand how matrices work.

Subsection Prepare

We defined a matrix in DefinitionΒ 1.2.6, and included defining rows, columns, and notation for the size of a matrix and for the entries within a matrix. An augmented matrix, whose entries represent the coefficients and constants in a linear system, is a type of matrix or a way of interpreting a matrix, but when we look at a matrix we don’t have to think of a linear system at all. A matrix is an array of numbers; both the size of the array and the contents are important to the essence of a matrix.
We add two matrices by adding the numbers in their corresponding positions. For example,
\begin{align*} \begin{bmatrix} 1 \amp 0 \\ -2 \amp 3 \end{bmatrix} + \begin{bmatrix} 1 \amp -1 \\ 2 \amp 5 \end{bmatrix}\amp = \begin{bmatrix} 1+1 \amp 0+-1 \\ -2+2 \amp 3+5 \end{bmatrix} \\ \amp = \begin{bmatrix} 2 \amp -1 \\ 0 \amp 8 \end{bmatrix} \end{align*}
Because numbers can be added in either order and the answer is the same, for example \(2+3=3+2=5\text{,}\) it follows that adding matrices in either order results in the same matrix also.
\begin{equation*} \begin{bmatrix} 1 \amp 0 \\ -2 \amp 3 \end{bmatrix} + \begin{bmatrix} 1 \amp -1 \\ 2 \amp 5 \end{bmatrix} = \begin{bmatrix} 1 \amp -1 \\ 2 \amp 5 \end{bmatrix} + \begin{bmatrix} 1 \amp 0 \\ -2 \amp 3 \end{bmatrix} = \begin{bmatrix} 2 \amp -1 \\ 0 \amp 8 \end{bmatrix} \end{equation*}
Subtraction and multiplying by numbers can be related back to addition, for example \(3-1=3+(-1)\) and \(3\cdot 5 = 5+5+5\text{,}\) so it makes sense that subtracting two matrices and multiplying a matrix by a number also work by doing the operation to each entry in the matrix.
We know that numbers can sometimes appear in different forms but really be the same number: for example, \(2\text{,}\) \(\frac{10}{5}\text{,}\) \(2.00\) are all different ways to write the number β€œtwo”. Two matrices are equal if each corresponding position contains the same number, regardless of the form of the number.
Let’s try some examples.

Activity 2.1.1. Matrix Operations.

Define matrices \(A\text{,}\) \(B\text{,}\) and \(C\) by
\begin{align*} A\amp = \begin{bmatrix} 1 \amp 2 \amp 3 \\ -1 \amp 0 \amp 4 \end{bmatrix} \amp B\amp = \begin{bmatrix} -3 \amp 2 \amp -3 \\ 2 \amp 2 \amp 0 \end{bmatrix} \amp C\amp = \begin{bmatrix} 1 \amp 2 \\ 3 \amp 4 \end{bmatrix} \end{align*}
(a)
Select all answers which are equal to
\begin{equation*} A+B \end{equation*}
  • \(\begin{bmatrix} -2 \amp 4 \amp 0 \\ 1 \amp 2 \amp 4 \end{bmatrix}\)
  • Correct!
  • \(\begin{bmatrix} 1+-3 \amp 2+2 \amp 3+-3 \\ -1+2 \amp 0+2 \amp 4+0 \end{bmatrix}\)
  • Correct!
  • \(B+A\)
  • Correct!
(b)
Select all answers which are equal to
\begin{equation*} A-B \end{equation*}
  • \(\begin{bmatrix} 4 \amp 0 \amp 6 \\ -3 \amp -2 \amp 4 \end{bmatrix}\)
  • Correct!
  • \(\begin{bmatrix} -4 \amp 0 \amp -6 \\ 3 \amp 2 \amp -4 \end{bmatrix}\)
  • This is \(B-A\text{,}\) subtracted in the other order.
  • \(\begin{bmatrix} 1-(-3) \amp 2-2 \amp 3-(-3) \\ -1-2 \amp 0-2 \amp 4-0 \end{bmatrix}\)
  • Correct!
(c)
Select all answers which are equal to
\begin{equation*} 2B \end{equation*}
  • \(\begin{bmatrix} 2 \amp 4 \amp 6 \\ -2 \amp 0 \amp 8 \end{bmatrix}\)
  • This is \(2A\text{.}\)
  • \(\begin{bmatrix} -6 \amp 4 \amp -6 \\ 4 \amp 4 \amp 0 \end{bmatrix}\)
  • Correct!
  • \(\begin{bmatrix} -6.0 \amp \frac{8}{2} \amp -6 \\ \sqrt{16} \amp 4 \amp 0 \end{bmatrix}\)
  • Correct!
  • \(\begin{bmatrix} -9 \amp 6 \amp -9 \\ 6 \amp 6 \amp 0 \end{bmatrix}\)
  • This is \(3B\text{.}\)
(d)
Select all answers which are equal to
\begin{equation*} \begin{bmatrix} 0 \amp 0 \\ 0 \amp 0 \end{bmatrix}\text{.} \end{equation*}
  • \(0C\)
  • Correct!
  • \(C-C\)
  • Correct!
  • \(0A\)
  • \(0A=\begin{bmatrix} 0\cdot 1 \amp 0\cdot 2 \amp \cdot 3 \\ 0\cdot -1 \amp 0 \cdot 0 \amp 0\cdot 4 \end{bmatrix} =\begin{bmatrix} 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \end{bmatrix}\)
    \(0A\) is a \(2\times 3\) matrix containing all zeros, while the given matrix was a \(2 \times 2 \) matrix containing all zeros.
(e)
Select all answers which are equal to
\begin{equation*} A+C \end{equation*}
  • \(\begin{bmatrix} 2 \amp 4 \amp 3 \\ 2 \amp 4 \amp 4 \end{bmatrix}\)
  • Matrix \(A\) and matrix \(C\) have different sizes, so there are positions without corresponding entries to add. For example, the third column of \(A\) has nothing corresponding in \(C\text{.}\)
  • Trick question! \(A+C\) is not defined
  • Correct! \(A\) and \(C\) have different sizes so there are positions which don’t have corresponding entries to add.
We never had to worry about whether two numbers could be added or subtracted, so that is a difference between numbers and matrices. The size of a matrix is key to being able to perform calculations; only matrices of the same size can be added and subtracted, and if two matrices have different sizes, then they cannot be equal.
Matrices containing all zeros come up enough that we should define them.

Definition 2.1.2. The Zero Matrix.

The \(m\times n\) matrix containing \(0\) in every entry, denoted \(\mathbf{0}_{m\times n}\text{,}\) is the zero matrix of size \(m \times n\).
When the dimensions are clear from the context, we just write \(\mathbf{0}\) in bold font and call it the zero matrix, even though there is a different zero matrix for each size.
Note the difference between \(0\) and \(\mathbf{0}\text{:}\) the first is a number and the second is a matrix in which every entry is the number \(0\text{.}\)
Lots of things we’ve known are true about adding and subtracting numbers are true for matrices also, and we’ll collect them here.

Activity 2.1.4. Matrix Property Names.

You might have noticed that there are a couple of operations we do with numbers that we have not discussed how to do with matrices, namely, multiplication and division. There’s a very good reason for this: multiplication and division in the realm of matrices are very different from multiplication and division of numbers, and we leave them for future sections.

Reading Questions Reading Questions

1.
In your own words, explain how to add two matrices together. Be sure to discuss if addition is always possible or if not, what conditions need to be satisfied.
2. True or False?
(a)
    There is exactly one Zero Matrix.
  • True.

  • There is one matrix of all zeros for each size. However, \(\begin{bmatrix} 0 \amp 0 \\ 0 \amp 0 \end{bmatrix} \neq \begin{bmatrix} 0 \\ 0 \end{bmatrix}\text{,}\) for example.
  • False.

  • There is one matrix of all zeros for each size. However, \(\begin{bmatrix} 0 \amp 0 \\ 0 \amp 0 \end{bmatrix} \neq \begin{bmatrix} 0 \\ 0 \end{bmatrix}\text{,}\) for example.
(b)
    Multiplying a matrix by \(3\) means multiplying each entry in the matrix by \(3\text{.}\)
  • True.

  • True, this is how we define multiplying a matrix by a number.
  • False.

  • True, this is how we define multiplying a matrix by a number.
3. Reflection.
(a)
    How confident do you feel with the material you just read about?
  • 1.
    Not at all confident or didn’t do the reading.
  • 2.
    Not very confident.
  • 3.
    Somewhat confident.
  • 4.
    Mostly confident.
  • 5.
    Confident so far and ready to engage more deeply.
(b)
Ask a question about the material. What additional information do you think someone would need to become more confident in their understanding?

Worksheet Participate

We have discussed multiplying a matrix by a number. Most texts will use the term scalar instead of β€œnumber”. There are good reasons for this, but they are outside the scope of this material. Still, it is good to recognize both words could be used.

1.

Consider the matrices \(A=\begin{bmatrix}1 \amp 2 \amp 3 \end{bmatrix}\) and \(B=\begin{bmatrix} 1\\ 2 \\ 3 \end{bmatrix}\text{.}\) Say why \(A\) and \(B\) are not equal as matrix objects. Does this make sense to you, or do you think they should be the same thing?

2.

What do you think a square matrix is? What about a row matrix or column matrix?

3.

Let \(A=\begin{bmatrix} 1 \amp 3 \\ 2 \amp 5 \\ -1 \amp 1 \end{bmatrix}\text{,}\) \(B=\begin{bmatrix} 4 \amp -1 \\ -2 \amp -3 \\ 2 \amp 0 \end{bmatrix}\text{,}\) and \(C=\begin{bmatrix} 2 \amp 0 \\ -1 \amp 5 \\ -2 \amp 0 \end{bmatrix}\text{.}\)
Calculate each of the items below. What do you notice about your answers?

4.

Consider the list of proposed properties below. For each one, say whether it is True, False, or Insufficient Information. Note that these are all statements you might be used to thinking about with numbers, and the goal is to think about how matrices and numbers are similar in some ways and different in some ways.
Let \(A\text{,}\) \(B\text{,}\) and \(X\) be matrices of the same size, and let \(k\) and \(n\) be numbers.
(h)
For each matrix \(C\text{,}\) there is a matrix \(Z\) such that \(Z+C=C+Z=C\text{.}\) (The matrix \(Z\) acts like the number \(0\) does for numbers.)
(i)
For each matrix \(C\text{,}\) there is a matrix \(I\) such that \(IC=CI=C\text{.}\) (The matrix \(I\) acts like the number \(1\) does for numbers.)

Summary.

  • Matrices are mathematical objects like numbers are. We don’t need to think of matrices as coming from a linear system.
  • Matrices can be multiplied by numbers (also called scalars). If two matrices are the same size, they can be added and subtracted.
  • Many of the properties we’re used to still hold for matrix addition and multiplication by a number, such as associativity and commutativity of addition and the distributive property.

Subsection Practice

Exercise 2.1.1. Adding and Multiplying by a Number.

Let \(A\) and \(B\) be the following matrices.
\begin{equation*} A = \left[\begin{array}{ccc} 9 \amp 4 \amp -9\cr 4 \amp 1 \amp -4\cr 5 \amp -1 \amp -8 \end{array}\right], \qquad B = \left[\begin{array}{ccc} -2 \amp 3 \amp 3\cr -5 \amp -2 \amp -1\cr 9 \amp 8 \amp -1 \end{array}\right] \end{equation*}
Perform the following operations:
\(4 A =\) (3Β Γ—Β 3 array)
\(A + 3 B =\) (3Β Γ—Β 3 array)
\(2 A - 5 B =\) (3Β Γ—Β 3 array)

Exercise 2.1.2. Matrix Addition Application.

During the month of January, β€œABC Appliances” sold \(33\) microwaves, \(17\) refrigerators, and \(33\) stoves, while β€œXYZ Appliances” sold \(57\) microwaves, \(27\) refrigerators and \(31\) stoves.
During the month of February, β€œABC Appliances” sold \(38\) microwaves, \(27\) refrigerators, and \(40\) stoves, while β€œXYZ Appliances” sold \(51\) microwaves, \(20\) refrigerators and \(34\) stoves.
Write a \(2 \times 3\) matrix summarizing the sales for the month of January. (Keep the order of information). (2Β Γ—Β 3 array)
Write a \(2 \times 3\) matrix summarizing the sales for the month of February. (Keep the order of information). (2Β Γ—Β 3 array)
Using matrix addition, write a \(2 \times 3\) matrix summarizing the total sales for the months of January and February. (2Β Γ—Β 3 array)

Exercise 2.1.3. Solving a Matrix Equation.

Solve for \(X\text{.}\)
\begin{equation*} \left[\begin{array}{cc} -5 \amp -9\cr 7 \amp -7 \end{array}\right] + 3 X = \left[\begin{array}{cc} -4 \amp 9\cr -5 \amp 4 \end{array}\right]. \end{equation*}
\(X=\) (2Β Γ—Β 2 array)

Exercise 2.1.4. Adding Matrices, List of Lists Notation.

Many programming languages, including Python and Sage, use a list of lists to enter matrices. We use that notation in this problem instead of the usual array answer box notation to avoid giving away information about the size of the matrix or whether such a matrix exists at all.
Let
\begin{equation*} A = \left[\begin{array}{cc} -2 \amp 2\cr -3 \amp 4 \end{array}\right], \end{equation*}
\begin{equation*} B = \left[\begin{array}{cc} 3 \amp -5\cr 2 \amp 5\cr 3 \amp 1 \end{array}\right], \end{equation*}
\begin{equation*} C = \left[\begin{array}{cc} 1 \amp 5\cr -3 \amp 3 \end{array}\right]. \end{equation*}
If possible, compute the following. If an answer does not exist, enter DNE.
\(A+B =\)
\(A+C =\)

Exercise 2.1.5. True/False Matrix Properties.

Enter T or F depending on whether the statement is true or false. (You must enter T or F -- True and False will not work.)
  1. For any matrix \(A\text{,}\) there exists a matrix \(B\) so that \(A + B = 0\text{.}\)
  2. An \(m \times n\) matrix has \(m\) columns and \(n\) rows.
  3. For any matrices \(A\) and \(B\text{,}\) \(3A+3B=3(A + B)\text{.}\)

Exercises Additional Practice

Exercise Group.

Matrices \(A\) and \(B\) are given below. In the following exercises, simplify the given expression.
\begin{equation*} A = \left[\begin{array}{cc} 1 \amp -1\\ 7 \amp 4 \end{array} \right] \quad B = \left[\begin{array}{cc} -3 \amp 2\\5 \amp 9 \end{array} \right] \end{equation*}

Exercise Group.

Matrices \(A\) and \(B\) are given below. In the following exercises, simplify the given expression.
\begin{equation*} A = \left[\begin{array}{c} 3\\ 5 \end{array} \right] \quad B = \left[\begin{array}{c} -2\\4 \end{array} \right] \end{equation*}

Exercise Group.

Matrices \(A\) and \(B\) are given below. In the following exercises, find a matrix \(X\) that satisfies the equation.
\begin{equation*} A = \left[\begin{array}{cc} 3 \amp -1\\ 2 \amp 5 \end{array} \right] \quad B = \left[\begin{array}{cc} 1 \amp 7\\3 \amp -4 \end{array} \right] \end{equation*}