Skip to main content
Logo image

Elementary Linear Algebra: For University of Lethbridge Math 1410

Section 4.1 Matrix Addition and Scalar Multiplication

As mentioned above, a matrix is a construction that allows us to organize information in a tabular form. For example, we may be interested in the following (made up) data involving crop yields on several Southern Alberta farms, given in tabular form:
Table 4.1.1. 2014 crop yields, in metric tonnes
Corn Potatoes Soybeans Wheat
Farm A 48 18 92 0
Farm B 0 0 73 152
Farm C 34 203 0 88
Someone in charge of compiling data on farms and crops probably already has a program or spreadsheet set up with all of the farms and crops pre-defined; what they are interested in are the numbers giving the crop yields. Thus, when they enter their data into the computer, they are probably more interested in the array
\begin{equation} A = \bbm 48 \amp 18 \amp 92 \amp 0\\ 0 \amp 0 \amp 73 \amp 152\\ 34 \amp 203 \amp 0 \amp 88 \ebm\text{.}\tag{4.1.1} \end{equation}
As long as we’re consistent and always assign each farm to the same row, and each crop to the same column, we can dispense with the labels and work directly with the data.
The array above is our first example of a matrix, which we now define. The definition of matrix is remarkable only in how unremarkable it seems — it is simply a way of organizing information (usually numbers) into an array.

Definition 4.1.2. Matrix.

A matrix is a rectangular array of numbers.
The horizontal lines of numbers form rows and the vertical lines of numbers form columns. A matrix with \(m\) rows and \(n\) columns is said to be an \(m\times n\) matrix (“an \(m\) by \(n\) matrix”, or a matrix of size \(m\times n\)).
The entries of an \(m\times n\) matrix are indexed as follows:
\begin{equation*} \bbm a_{11}\amp a_{12}\amp a_{13}\amp \cdots\amp a_{1n}\\ a_{21}\amp a_{22}\amp a_{23}\amp \cdots\amp a_{2n}\\ a_{31}\amp a_{32}\amp a_{33}\amp \cdots\amp a_{3n}\\ \vdots\amp \vdots\amp \vdots\amp \ddots\amp \vdots\\ a_{m1}\amp a_{m2}\amp a_{m3}\amp \cdots\amp a_{mn} \ebm\text{.} \end{equation*}
That is, \(a_{32}\) means “the number in the third row and second column.” To save space, we will sometimes use the shorthand notation \(A = [a_{ij}]\) to denote a matrix \(A\) with entries \(a_{ij}\text{.}\) If we need to specify the size, we can also write \(A=[a_{ij}]_{m\times n}\text{.}\)
Two special types of matrix are worth noting: those with a single row or column. Such matrices are known as vectors.

Definition 4.1.3. Row and column vectors.

A row vector is a \(1\times n\) matrix of the form
\begin{equation*} R = \bbm r_1 \amp r_2 \amp \cdots \amp r_n\ebm\text{.} \end{equation*}
A column vector is a \(m\times 1\) matrix of the form
\begin{equation*} C = \bbm c_1\\c_2\\ \vdots \\ c_m\ebm\text{.} \end{equation*}
In particular, we can obtain row or column vectors by isolating any row or column of a given \(m\times n\) matrix. For example, given our matrix of crop data in Equation (4.1.1), we might be interested only in Farm B, in which case we would want the row vector
\begin{equation*} R_B = \bbm 0 \amp 0 \amp 73 \amp 152\ebm\text{.} \end{equation*}
Similarly, we might only be interested in yields for soybean crops, in which case the column vector
\begin{equation*} C_{\text{soy}} = \bbm 92 \\ 73\\0\ebm \end{equation*}
is our object of interest.
Continuing with our farming example, suppose that in addition to the matrix \(A\) of 2014 crop yields above we also have data for 2015 crop yields given by
\begin{equation*} B = \bbm 41 \amp 25 \amp 15 \amp 20\\ 0 \amp 72 \amp 0 \amp 165\\ 47 \amp 193 \amp 0 \amp 77\ebm\text{.} \end{equation*}
We might be interested in quantities such as the total crop yields over two years. If we arrange these totals into a matrix \(T\text{,}\) it seems like it should be reasonable to define matrix addition in such a way that we can write
\begin{equation*} T = A + B\text{.} \end{equation*}
This leads to two questions. First, how do we define matrix addition in order to ensure this outcome? Second, and perhaps more fundamentally, what do we mean by “\(=\)” in the context of matrices? Let us tackle the second question first.

Definition 4.1.4. Matrix Equality.

Two \(m\times n\) matrices \(\tta\) and \(\ttb\) are equal if their corresponding entries are equal.
Notice that our more formal definition specifies that if matrices are equal, they have the same size. This should make sense.
Now we move on to describing how to add two matrices together. To start off, take a wild stab: how do you think we should add our matrices of crop data above? Well, if we want the sum to represent the total yields for each crop, then it stands to reason that to add the two matrices, we add together each of the corresponding crop yields within them:
\begin{align*} T \amp = A+B\\ \amp = \bbm 48 \amp 18 \amp 92 \amp 0\\ 0 \amp 0 \amp 73 \amp 152\\ 34 \amp 203 \amp 0 \amp 88 \ebm + \bbm 41 \amp 25 \amp 15 \amp 20\\ 0 \amp 72 \amp 0 \amp 165\\ 47 \amp 193 \amp 0 \amp 77\ebm\\ \amp = \bbm 48+41 \amp 18+25 \amp 92+15 \amp 0+20\\ 0 + 0 \amp 0 + 72 \amp 73 + 0 \amp 152 +165\\ 34+47 \amp 203 + 193 \amp 0 + 0 \amp 88+77\ebm\\ \amp = \bbm 89 \amp 43 \amp 107 \amp 20\\0\amp 72 \amp 73 \amp 317\\81 \amp 396 \amp 0 \amp 165\ebm\text{.} \end{align*}
So to add the two matrices, we added their corresponding entries. This is exactly how we define matrix addition in general:

Definition 4.1.5. Matrix Addition.

Let \(A=[a_{ij}]\) and \(B=[b_{ij}]\) be \(m\times n\) matrices. The sum of \(\tta\) and \(\ttb\text{,}\) denoted \(\tta+\ttb\text{,}\) is
\begin{equation*} \bbm a_{11}+b_{11} \amp a_{12}+b_{12} \amp \cdots\amp a_{1n}+b_{1n}\\ a_{21}+b_{21}\amp a_{22}+b_{22}\amp \cdots\amp a_{2n}+b_{2n}\\\vdots\amp \vdots\amp \ddots\amp \vdots\\ a_{m1}+b_{m1}\amp a_{m2}+b_{m2}\amp \cdots\amp a_{mn}+b_{mn}\ebm\text{.} \end{equation*}
For another example, suppose we wanted to know the total production for each farm in 2014, assuming that our matrices represent all of the crops each farm produces. This would be obtained by simply calculating the total for each row in the matrix \(A\text{.}\) Another way to accomplish the same task is as follows: let
\begin{equation*} C_1 = \bbm 48\\0\\34\ebm, C_2 = \bbm 18\\0\\203\ebm, C_3 = \bbm 92\\73\\0\ebm, C_4 = \bbm 0\\152\\88\ebm \end{equation*}
denote the columns of the matrix \(A\text{;}\) note that each column represents the yields across all three farms for each crop.
The total yield for each farm can then be calculated according to
\begin{align*} Y \amp = C_1+C_2+C_3+C_4\\ \amp \bbm 48\\0\\34\ebm + \bbm 18\\0\\203\ebm + \bbm 92\\73\\0\ebm + \bbm 0\\152\\88\ebm = \bbm 158\\225\\325\ebm\text{.} \end{align*}
The column vector \(Y\) then contains the total yields for each farm. Notice that although we only defined the sum of two matrices in Definition 4.1.5, it makes sense to add any number of matrices, and there is no need to add parentheses.
Recall from Chapter 2 that we defined the multiplication of a vector \(\vec{v} = \bbm a\\ b\\ c\ebm\) by a scalar \(t\in\mathbb{R}\) by
\begin{equation*} t\vec{v} = t\bbm a\\ b\\ c\ebm = \bbm ta\\ tb\\ tc\ebm\text{.} \end{equation*}
It stands to reason that scalar multiplication should be defined in exactly the same way for row and column vectors; after all, in most cases these are just different ways of writing down the same mathematical object. Thus, in order to multiply a row or column vector by a scalar, we should multiply each entry in the vector by that scalar. From here, it’s not too much of a stretch to conclude that the same definition is reasonable for matrices in general.

Definition 4.1.6. Scalar Multiplication.

Let \(\tta = [a_{ij}]\) be an \(m\times n\) matrix and let \(k\) be a scalar. The scalar multiplication \(\tta\) by \(k\text{,}\) denoted \(k\tta\text{,}\) is defined by
\begin{equation*} \bbm ka_{11} \amp ka_{12} \amp \cdots\amp ka_{1n}\\ka_{21}\amp ka_{22}\amp \cdots\amp ka_{2n}\\\vdots\amp \vdots\amp \ddots\amp \vdots\\ka_{m1}\amp ka_{m2}\amp \cdots\amp ka_{mn}\ebm\text{.} \end{equation*}
Referring one last time to our farming data, we could imagine that a fertilizer company is advertising a new product they claim will increase crop yields by 30%. Increasing the yield of each crop by 30\% amounts to multiplying each of the entries in the matrices \(A\) or \(B\) by a factor of 1.3; according to Definition 4.1.6, this is the same as forming the scalar multiples \(1.3\tta\) and \(1.3\ttb\text{.}\)
Since we have two years’ worth of crop data, we could also ask for the average yield for each crop on each farm. For example, Farm A produced 48 tonnes of corn in 2014, and 41 tonnes of corn in 2015. The two-year average for corn on Farm A is thus
\begin{equation*} \frac{48+41}{2} = \frac{89}{2} = 44.5 \text{ tonnes}\text{.} \end{equation*}
Notice that we can obtain the average for each entry by dividing each entry in \(T=A+B\) by 2, which is the same thing as multiplying by \(\frac{1}{2}\text{.}\) Our matrix of averages is
\begin{equation*} \frac{1}{2}T = \frac{1}{2}\bbm 89 \amp 43 \amp 107 \amp 20\\0\amp 72 \amp 73 \amp 317\\81 \amp 396 \amp 0 \amp 165\ebm = \bbm 89/2 \amp 43/2 \amp 107/2 \amp 10\\0\amp 36 \amp 73/2 \amp 317/2\\81/2 \amp 198 \amp 0 \amp 165/2\ebm\text{.} \end{equation*}
Finally, notice also that since
\begin{equation*} \frac{48+41}{2} = \frac{1}{2}(48)+\frac{1}{2}(41)\text{,} \end{equation*}
with similar considerations for the other entries, we also could have obtained the average by first dividing \(A\) and \(B\) by \(\frac{1}{2}\text{,}\) and then adding the result. That is,
\begin{equation*} \frac{1}{2}T = \frac{1}{2}(A+B) = \frac{1}{2}A +\frac{1}{2}B\text{.} \end{equation*}
We’ll see shortly that this result is due to a general property of matrix arithmetic, called the distributive property.
Expressions such as \(\frac12 A+\frac12 B\) that use both addition and scalar multiplication together occur frequently in Linear Algebra, and are known as linear combinations. In general, a linear combination can be formed from any number of matrices, as long as they’re all of the same size.

Definition 4.1.7. Linear combination.

Given \(m\times n\) matrices \(A_1, A_2, \ldots, A_k\text{,}\) a linear combination of these matrices is any expression of the form
\begin{equation*} B = c_1A_1+c_2A_2+\cdots +c_kA_k\text{,} \end{equation*}
where \(c_1, c_2, \ldots, c_k\) are scalars.
It is time to forget our farm data and move into some abstract computational examples to make sure we have the hang of these new operations.

Example 4.1.8. Matrix addition and scalar multiplication.

Let
\begin{equation*} \tta = \bbm 1 \amp 2 \amp 3\\-1\amp 2\amp 1\\5\amp 5\amp 5\ebm,\quad \ttb = \bbm 2\amp 4\amp 6\\1\amp 2\amp 2\\-1\amp 0\amp 4\ebm,\quad \ttc = \bbm 1\amp 2\amp 3\\9\amp 8\amp 7\ebm\text{.} \end{equation*}
Simplify the following matrix expressions.
  1. \(\displaystyle \tta+\ttb\)
  2. \(\displaystyle \ttb+\tta\)
  3. \(\displaystyle \tta-\ttb\)
  4. \(\displaystyle \tta + \ttc\)
  5. \(\displaystyle -3\tta +2\ttb\)
  6. \(\displaystyle \tta -\tta\)
  7. \(\displaystyle 5\tta + 5\ttb\)
  8. \(\displaystyle 5(\tta+\ttb)\)
Solution.
  1. Adding the corresponding entries of \(A\) and \(B\text{,}\) we have
    \begin{equation*} \tta + \ttb = \bbm 1+2\amp 2+4\amp 3+6\\-1+1\amp 2+2\amp 1+2\\5-1\amp 5+0\amp 5+4\ebm = \bbm 3\amp 6\amp 9\\0\amp 4\amp 3\\4\amp 5\amp 9\ebm\text{.} \end{equation*}
  2. To compute \(B+A\text{,}\) we again add the corresponding entries, but in the opposite order:
    \begin{equation*} \ttb + \tta = \bbm 2+14+2\amp 6+3\\1-1\amp 2+2\amp 2+1\\-1+5\amp 0+5\amp 4+5\ebm = \bbm 3\amp 6\amp 9\\0\amp 4\amp 3\\4\amp 5\amp 9\ebm\text{.} \end{equation*}
  3. In this case, we have to subtract the entries of \(B\) from those of \(A\text{.}\) This gives us
    \begin{equation*} \tta - \ttb = \bbm-1\amp -2\amp -3\\-2\amp 0\amp -1\\6\amp 5\amp 1\ebm\text{.} \end{equation*}
  4. \(\tta + \ttc\) is not defined. If we look at our definition of matrix addition, we see that the two matrices need to be the same size. Since \(\tta\) and \(\ttc\) have different dimensions, we don’t even try to create something as an addition; we simply say that the sum is not defined.
  5. To compute this linear combination we first carry out the scalar multiplication, followed by the addition:
    \begin{align*} -3\tta + 2\ttb \amp = -3\bbm 1\amp 2\amp 3\\-1\amp 2\amp 1\\5\amp 5\amp 5\ebm + 2\bbm 2\amp 4\amp 6\\1\amp 2\amp 2\\-1\amp 0\amp 4\ebm\\ \amp = \bbm-3\amp -6\amp -9\\3\amp -6\amp -3\\-15\amp -15\amp -15\ebm + \bbm 4\amp 8\amp 12\\2\amp 4\amp 4\\-2\amp 0\amp 8\ebm\\ \amp = \bbm 1\amp 2\amp 3\\5\amp -2\amp 1\\-17\amp -15\amp -7\ebm\text{.} \end{align*}
  6. Subtracting each entry of \(A\) from itself, we get
    \begin{equation*} \tta - \tta = \bbm 0\amp 0\amp 0\\0\amp 0\amp 0\\0\amp 0\amp 0\ebm\text{.} \end{equation*}
  7. Carrying out the scalar multiplication followed by the addition, we find
    \begin{equation*} 5A+5B = \bbm 5\amp 10\amp 15\\-5\amp 10\amp 5\\25\amp 25\amp 25\ebm +\bbm 10\amp 20\amp 30\\5\amp 10\amp 10\\-5\amp 0\amp 20\ebm = \bbm 15\amp 30\amp 45\\0\amp 20\amp 15\\20\amp 25\amp 45\ebm\text{.} \end{equation*}
  8. In this case, we first perform the addition, followed by the scalar multiplication. We obtain:
    \begin{align*} 5\left(\bbm 1\amp 2\amp 3\\-1\amp 2\amp 1\\5\amp 5\amp 5\ebm + \bbm 2\amp 4\amp 6\\1\amp 2\amp 2\\-1\amp 0\amp 4\ebm\right) \amp = 5\cdot\bbm 3\amp 6\amp 9\\0\amp 4\amp 3\\4\amp 5\amp 9\ebm\\ \amp = \bbm 15 \amp 30\amp 45\\0\amp 20\amp 15\\20\amp 25\amp 45\ebm\text{.} \end{align*}
Our example raised a few interesting points. Notice how \(\tta + \ttb = \ttb + \tta\text{.}\) We probably aren’t surprised by this, since we know that when dealing with numbers, \(a+b = b+a\text{.}\) Also, notice that \(5\tta+5\ttb = 5(\tta+\ttb)\text{.}\) In our example, we were careful to compute each of these expressions following the proper order of operations; knowing these are equal allows us to compute similar expressions in the most convenient way.
Another interesting thing that came from our previous example is that
\begin{equation*} \tta - \tta = \bbm 0 \amp 0 \amp 0\\0\amp 0\amp 0\\0\amp 0\amp 0\ebm\text{.} \end{equation*}
It seems like this should be a special matrix; after all, every entry is 0 and 0 is a special number.
In fact, this is a special matrix. We define \(\tto\text{,}\) which we read as “the zero matrix,” to be the matrix of all zeros. We should be careful; this previous “definition” is a bit ambiguous, for we have not stated what size the zero matrix should be. Is \(\bbm 0\amp 0\\0\amp 0\\ \ebm\) the zero matrix? How about \(\bbm 0\amp 0\ebm\text{?}\)
Let’s not get bogged down in semantics. If we ever see \(\tto\) in an expression, we will usually know right away what size \(\tto\) should be; it will be the size that allows the expression to make sense. If \(\tta\) is a \(3\times 5\) matrix, and we write \(\tta + \tto\text{,}\) we’ll simply assume that \(\tto\) is also a \(3\times 5\) matrix. If we are ever in doubt, we can add a subscript; for instance, \(\tto_{2\times 7}\) is the \(2\times7\) matrix of all zeros.
Since the zero matrix is an important concept, we give it its own definition box.

Definition 4.1.9. The Zero Matrix.

The \(m\times n\) matrix of all zeros, denoted \(\tto_{m\times n}\text{,}\) is the zero matrix.
When the dimensions of the zero matrix are clear from the context, the subscript is generally omitted.
The following presents some of the properties of matrix addition and scalar multiplication that we discovered above, plus a few more.
Be sure that this last property makes sense; it says that if we multiply any matrix by the number 0, the result is the zero matrix, or \(\tto\text{.}\) (You now have more than one kind of zero to keep track of!)
It’s important to understand that since matrix addition and scalar multiplication are defined in terms of the entries of our matrices, the properties in Theorem 4.1.10 follow directly from the properties of real number arithmetic in Section 1.2. For example to prove item 1 above, let \(A=[a_{ij}]\) and \(B=[b_{ij}]\) be \(m\times n\) matrices. We then have
\begin{align*} A+B \amp = [a_{ij}]+[b_{ij}]\\ \amp = [a_{ij}+b_{ij}] \quad \text{ (by \knowl{./knowl/xref/def-addition.html}{\text{Definition 4.1.5}})}\\ \amp = [b_{ij}+a_{ij}] \quad \text{ (since addition of real numbers commutes)}\\ \amp = [b_{ij}]+[a_{ij}] \quad \text{ (by \knowl{./knowl/xref/def-addition.html}{\text{Definition 4.1.5}})}\\ \amp = B+A\text{.} \end{align*}
Similarly, the distributive property in item 3 is valid since
\begin{align*} k(A+B) \amp = k([a_{ij}]+[b_{ij}])\\ \amp = k[a_{ij}+b_{ij}] \quad \text{ (definition of matrix addition)}\\ \amp = [k(a_{ij}+b_{ij})] \quad \text{ (definition of scalar multiplication)}\\ \amp = [k\cdot a_{ij}+k\cdot b_{ij}] \quad \text{ (distributive property of real numbers)}\\ \amp = [k\cdot a_{ij}] + [\cdot b_{ij}] \quad \text{ (definition of matrix addition)}\\ \amp = k[a_{ij}]+k[b_{ij}] \quad \text{ (definition of scalar multiplication)}\\ \amp = kA +kB\text{.} \end{align*}
The verification of the remaining properties in Theorem 4.1.10 is similar, and left as an exercise for the reader.
We began this section with the concept of matrix equality. Let’s put our matrix addition properties to use and solve a matrix equation.

Example 4.1.11. Solving a matrix equation.

Let
\begin{equation*} \tta = \bbm 2 \amp -1\\3 \amp 6\ebm\text{.} \end{equation*}
Find the matrix \(\ttx\) such that
\begin{equation*} 2\tta + 3\ttx = -4\tta\text{.} \end{equation*}
Solution.
We can use basic algebra techniques to manipulate this equation for \(\ttx\) first, let’s subtract \(2\tta\) from both sides. This gives us
\begin{equation*} 3\ttx = -6\tta\text{.} \end{equation*}
Now divide both sides by 3 to get
\begin{equation*} \ttx = -2\tta\text{.} \end{equation*}
Now we just need to compute \(-2\tta\text{;}\) we find that
\begin{equation*} \ttx = \bbm -4 \amp 2\\ -6 \amp -12\ebm\text{.} \end{equation*}
Our matrix properties identified \(\tto\) as the Additive Identity; i.e., if you add \(\tto\) to any matrix \(\tta\text{,}\) you simply get \(\tta\text{.}\) This is similar in notion to the fact that for all numbers \(a\text{,}\) \(a+0 = a\text{.}\) A Multiplicative Identity would be a matrix \(\tti\) where \(\tti\times\tta = \tta\) for all matrices \(\tta\text{.}\) (What would such a matrix look like? A matrix of all 1s, perhaps?) However, in order for this to make sense, we’ll need to learn to multiply matrices together, which we’ll do in the next section.

Exercises Exercises

Exercise Group.

For the matrices \(\tta\) and \(\ttb\) given below, simplify the given expression.
\begin{equation*} \tta = \bbm 1 \amp -1\\ 7 \amp 4\ebm \quad \ttb = \bbm -3 \amp 2\\5 \amp 9\ebm\text{.} \end{equation*}
1.
\(\tta + \ttb\)
2.
\(2\tta - 3\ttb\)
3.
\(3\tta - \tta\)
4.
\(4\ttb - 2\tta\)
5.
\(3(\tta - \ttb)+\ttb\)
6.
\(2(\tta - \ttb)-(\tta - 3\ttb)\)

Exercise Group.

For the matrices \(\tta\) and \(\ttb\) given below, simplify the given expression.
\begin{equation*} \tta = \bbm 3\\ 5\ebm \quad \ttb = \bbm -2\\4\ebm\text{.} \end{equation*}
7.
\(4\ttb - 2\tta\)
8.
\(-2\tta + 3\tta\)
9.
\(-2\tta - 3\tta\)
10.
\(-\ttb + 3\ttb-2\ttb\)

Exercise Group.

For the matrices \(\tta\) and \(\ttb\) given below, find \(\ttx\) that satisfies the given equation.
\begin{equation*} \tta = \bbm 3 \amp -1\\ 2 \amp 5\ebm \quad \ttb = \bbm 1 \amp 7\\3 \amp -4\ebm \end{equation*}
11.
\(2\tta + \ttx = \ttb\)
12.
\(\tta - \ttx = 3\ttb\)
13.
\(3\tta + 2\ttx = -1\ttb\)
14.
\(\tta - \frac12\ttx = -\ttb\)

Exercise Group.

Find values for the scalars \(a\) and \(b\) that satisfy the given equation.
15.
\(a\bbm 1\\2 \ebm + b\bbm -1\\5\ebm = \bbm 1\\9 \ebm\)
16.
\(a\bbm -3\\1 \ebm + b\bbm 8\\4\ebm = \bbm 7\\1 \ebm\)
17.
\(a\bbm 4\\-2 \ebm + b\bbm -6\\3\ebm = \bbm 10\\-5 \ebm\)
18.
\(a\bbm 1\\1 \ebm + b\bbm -1\\3\ebm = \bbm 5\\5 \ebm\)
19.
\(a\bbm 1\\3 \ebm + b\bbm -3\\-9\ebm = \bbm 4\\-12 \ebm\)
20.
\(a\bbm 1\\2\\3 \ebm + b\bbm 1\\1\\2\ebm = \bbm 0\\ -1\\-1 \ebm\)
21.
\(a\bbm 1\\0\\1 \ebm + b\bbm 5\\1\\2\ebm = \bbm 3\\ 4\\7 \ebm\)