BASIC ARITHMETIC WITH MATRICES

Whenever you get a new mathematical object (like matrices), it's important to develop tools to work with the new object.
In this exercise, you'll learn how to do basic arithmetic operations with matrices:
adding, subtracting, and multiplying by a constant.

Adding and Subtracting Matrices

Matrices can only be added or subtracted when they have the same size.
In this situation, you just add/subtract the corresponding entries.

For example, [beautiful math coming... please be patient] $$ \begin{bmatrix} -2 & 1\cr 0 & 3 \end{bmatrix} + \begin{bmatrix} 5 & -4\cr 6 & -7 \end{bmatrix} = \begin{bmatrix} -2+5 & 1+(-4)\cr 0+6 & 3+(-7) \end{bmatrix} = \begin{bmatrix} 3 & -3\cr 6 & -4 \end{bmatrix} $$ [beautiful math coming... please be patient] $$ \begin{bmatrix} -2 & 1\cr 0 & 3 \end{bmatrix} - \begin{bmatrix} 5 & -4\cr 6 & -7 \end{bmatrix} = \begin{bmatrix} -2-5 & 1-(-4)\cr 0-6 & 3-(-7) \end{bmatrix} = \begin{bmatrix} -7 & 5\cr -6 & 10 \end{bmatrix} $$

Precisely, we have:

DEFINITION adding and subtracting matrices
Suppose matrices $\,A\,$ and $\,B\,$ have the same size.

Then, the sum $\,S=A+B\,$ is defined by: [beautiful math coming... please be patient] $$ s_{ij} = a_{ij} + b_{ij} $$ The difference $\,D=A-B\,$ is defined by: [beautiful math coming... please be patient] $$ d_{ij} = a_{ij} - b_{ij} $$ In particular, matrices with different sizes cannot be added or subtracted.

WolframAlpha uses braces $\,\{\ \}\,$ to input matrices, not brackets $\,[\ ]\,$.
Then, it displays the matrices (so you can verify your input) using parentheses $\,(\ )\,$.
Get used to this—different academic disciplines and different environments often use different notation.

The screenshot below shows how to input matrices at wolframalpha.com.
Each row also goes inside a pair of braces $\,\{\ \}\,$, with elements separated by commas, like this:   $\,\{-2,1\}\,$
The rows themselves are also separated by commas, like this:   $\,\{-2,1\}\ ,\ \{0,3\}\,$
The entire matrix is enclosed within a pair of braces, like this:   $\,\ \{\ \{-2,1\}\ ,\ \{0,3\}\ \}\,$
If you want, cut-and-paste the following input to WolframAlpha to duplicate what you see in the image below:
{ {-2,1} , {0,3} } + { {5,-4} , {6,-7} }

adding matrices at WolframAlpha
Multiplying a Matrix by a Constant

It is equally easy to multiply a matrix by a constant; each entry gets multiplied by the constant.

For example, [beautiful math coming... please be patient] $$ 7 \begin{bmatrix} -2 & 1\cr 0 & 3 \end{bmatrix} = \begin{bmatrix} 7(-2) & 7(1)\cr 7(0) & 7(3) \end{bmatrix} = \begin{bmatrix} -14 & 7\cr 0 & 21 \end{bmatrix} $$

Precisely, we have:

DEFINITION multiplying a matrix by a constant
Let [beautiful math coming... please be patient] $\,M\,$ be a matrix, with members $\,m_{ij}\,$.
Let $\,k\,$ be a real number.

Then, the new matrix $\,kM\,$ has the same size as $\,M\,$;
the member in row $\,i\,$ and column $\,j\,$ of $\ kM\ $ is $\ k\,m_{ij}\ $.

Note: The real number multiplier is often called a constant or a scalar.

When working with matrices, it's important to distinguish between the real number $\,0\,$ and a zero matrix.
To help with this distinction, we define $\,0_{m\times n}\,$ (zero, with a subscript of $\,m\times n\,$)
to mean the zero matrix of size $\,m\times n\,$.

You can read $\,0_{m\times n}\,$ aloud as ‘the $\,m\,$ by $\,n\,$ zero matrix’.

Thus, if $\,A\,$ is a $\,2\times 3\,$ matrix, then: [beautiful math coming... please be patient] $$ A-A= 0_{2\times 3} $$ Or, if $\,A\,$ is a $\,p\times q\,$ matrix, then: $$ 0A= 0_{p\times q} $$

Be aware that many advanced textbooks write simple things like [beautiful math coming... please be patient] $\,A-A=0,\,$
knowing that the audience has enough mathematical maturity to realize that the zero is really the zero matrix with the same size as $\,A\,$.
However, in this exercise, we will be careful to distinguish between the real number zero, and a zero matrix.

EXAMPLES:
Let   [beautiful math coming... please be patient] $ A = \left[ \begin{smallmatrix} 2 & -1\cr 0 & 3\end{smallmatrix} \right] \,$,   $ B = \left[ \begin{smallmatrix} -3 & -5\cr 1 & 0\end{smallmatrix} \right] \,$,   and   $ C = \left[ \begin{smallmatrix} 0 & 1 & 1\cr 2 & -1 & 0\end{smallmatrix} \right] \,$.

Then,

[beautiful math coming... please be patient] $ \begin{align} A+2B &= \begin{bmatrix} 2 & -1\cr 0 & 3 \end{bmatrix} + 2 \begin{bmatrix} -3 & -5\cr 1 & 0 \end{bmatrix} \cr\cr &= \begin{bmatrix} 2 & -1\cr 0 & 3 \end{bmatrix} + \begin{bmatrix} -6 & -10\cr 2 & 0 \end{bmatrix} \cr\cr &= \begin{bmatrix} -4 & -11\cr 2 & 3 \end{bmatrix} \end{align} $

As a second example, $\,A+C\,$ is not defined, since $\,A\,$ and $\,C\,$ have different sizes.
Master the ideas from this section
by practicing the exercise at the bottom of this page.

When you're done practicing, move on to:
Multiplying Matrices


On this exercise, you will not key in your answer.
However, you can check to see if your answer is correct.
PROBLEM TYPES:
1 2 3 4 5 6 7 8 9 10 11
12 13 14 15 16 17 18 19 20 21  
AVAILABLE MASTERED IN PROGRESS

(MAX is 21; there are 21 different problem types.)