Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

4.2: Addition, Subtraction, Scalar Multiplication, and Products of Row and Column Matrices

( \newcommand{\kernel}{\mathrm{null}\,}\)

Addition and Subtraction of Matrices

Let A and \boldsymbol{B\}be m×n matrices. Then the sum, A+B, is the new matrix formed by adding corresponding entries together. The difference, AB, is the new matrix formed by subtracting each entry in matrix B from its corresponding entry in matrix A.

To add or subtract two or more matrices together, they all must be of the same size. That is, they all must have the same number of rows and the same numbers of columns. To add them together, add the corresponding elements together. To subtract one from the other, subtract corresponding elements from each other

Example 4.2.1

If the addition and subtraction is defined (if it is possible), perform each operation.

A=[251460],B=[310427],C=[9426]

Solution

A+B=[251460]+[310427]=[2+35+11+04+46+20+7]=[561887]

AB=[251460][310427]=[235110446207]=[141047]

A+C is not defined as they are different sizes. Matrix A is a 3×2 matrix whereas matrix B is a 2×2 matrix.

Your Turn: Compute B A.

Scalar Multiplication

You might recall that a scalar is a physical quantity that is defined by only its magnitude and that some examples are speed, time, distance, density, and temperature. They are represented by real numbers (both positive and negative), and they can be operated on using the regular laws of algebra.

To multiply a matrix by a scalar, multiply every element of the matrix by the scalar.

Symbolically, k[a11a12      a1na21a22      a2n                        am1am2      amn]= [ka11ka12      ka1nka21ka22      ka2n                        kam1kam2      kamn]

Example 4.2.2

Perform scalar multiplication.

Solution

6[413035]=[64616(3)606365]=[2461801830]

Your Turn: Multiply 7 [4213].

Multiplication with Row and Column Matrices

Suppose we have two matrices, A and B, where A is a 1×n matrix and B is an n×1 matrix. That is, A has one row and n columns and B has n rows and only 1 column.

A=[a1a2an] and B=[b1b2bn]

The product AB is the new matrix obtained by multiplying together the corresponding elements of each matrix then adding those sums together.

AB=[a1a2an][b1b2bn]

AB=[a1b1+a2b2++anbn]

This product is the sum (addition) of the

first entry in A times the first entry in B

second entry in A times the second entry in B

last entry in A times the last entry in B

Example 4.2.3

Multiply the two matrices \boldsymbol{A=\left[ \begin{array}{ccc} 2 & 4 & 5 \end{array} \right]\}and B=[143]

Solution

Suppose \boldsymbol{A=\left[ \begin{array}{ccc} 2 & 4 & 5 \end{array} \right]\}and B=[143]. Then,

AB=[245][143]

AB=[21+44+53]AB=[2+16+15]AB=[33]

Notice the dimensions of the two matrices. The number of rows of B, is 3 which is equal to the number of columns of A, which is also 3. The product is a 1×1 matrix whose dimension is the (number of rows of A) × (number of columns of B).

Your Turn: Suppose A=[31    25] and B=[1604]. Show that AB=[17].

Motivation for the Process of Multiplication with Row and Column Matrices

This process of multiplication may not seem intuitive; however, we can motivate it with an example. You probably know, or at least believe, that the revenue \boldsymbol{R\}realized by selling n number of units of some product for p dollars per unit is given by R=np. Revenue equals (the number of units sold) times the (price of each unit).

Example 4.2.4

Suppose your business sells three sizes of boxes, small-sized boxes, medium-sized boxes, and large-sized boxes. Small boxes sell for $3 each, medium boxes for $5 each, and large boxes for $7 each. What would your total revenue be if you sold 20 small-sized boxes, 30 medium-sized boxes, and 40 large-sized boxes?

Solution

Using R=np, your revenue from the sale of the

small boxes is R=20$3=$60

medium boxes is R=30$5=$150

large boxes is R=40$7=$280

The total revenue is the sum of these three products, 20$3+30$5+40$7=$60+$150+$280=$490.

We can compute the total revenue using two matrices and matrix multiplication.

Let the first matrix be the row matrix of the number of boxes sold N,

N=[203040]

and the second matrix be the column matrix of the price per boxes sold P.

P=[$3$5$7]

The total revenue is the matrix product

R=NP R=[203040][$3$5$7]

=[20$3+30$5+40$7]

=[$490]

Important Observation – See this

Notice that the result of a row and column matrix multiplication is a matrix with exactly one entry. That entry is the sum of a collection of products. In Example 4, the result of the row and column matrix multiplication is a matrix with exactly one entry, $490. The $490 is the sum of the products 20$3, 30$5, and 40$7. Don’t let the phrase the sum of a collection of products befuddle you. It means it is the addition (the sum) of a collection of multiplications (products). This idea will be helpful in the next section when we discuss multiplication of matrices of larger dimensions.

clipboard_e98407d25e2e75db7e3a055c682368a99.png

Dimension Matters

Notice the dimensions of the two matrices N and P from Example 4. The number of rows of P is 3, which is equal to the number columns of N, which is also 3. The product is a 1×1 matrix whose dimension is (the number of rows of N) × (the number of columns of P).

clipboard_e0fb9c5dd8192b0b52b963729630717d1.png

To multiply a row matrix A and column matrix B together, it must be that the (number of rows of B) = (number of columns of A)

Symbolically, if A has n number of columns, B must have n number of rows

Example 4.2.5

Suppose \boldsymbol{A=\left[ \begin{array}{ccc} 2 & 4 & 5 \end{array} \right]\}and B=[1432].

Solution

This multiplication will not work, it is not defined. Matrix B has 4 rows, but A has only 3 columns.

AB = [245] [1432]=[21+44+53+Now what?]

Try these

Using these six matrices, perform each operation if it is defined (if it is possible).

A=[121304]B=[321012]C=[213421]D=[49]E=[52]F=[2]

Exercise 4.2.1

A+B

Answer

[440312]

Exercise 4.2.2

BA

Answer

[202316]

Exercise 4.2.3

D+E

Answer

Not possible

Exercise 4.2.4

DE

Answer

[38]

Exercise 4.2.5

ED

Answer

[38]

Exercise 4.2.6

3[4021]

Answer

[12063]

Exercise 4.2.7

A+C

Answer

Not defined

Exercise 4.2.8

3(DE)

Answer

[114]

Exercise 4.2.9

(DE)F

Answer

[76]

Exercise 4.2.10

F2

Answer

[4]


This page titled 4.2: Addition, Subtraction, Scalar Multiplication, and Products of Row and Column Matrices is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Denny Burzynski (Downey Unified School District) .

Support Center

How can we help?