You are on page 1of 12

MATH 1003 Calculus and Linear Algebra

(Lecture 9)

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Addition, Subtraction and Scalar Multiplication

Definition
The addition/subtraction of two matrices of the same size is the
matrix with elements that are the addition/subtraction of the
corresponding elements of the two given matrices. That is to say,
if A = (aij )mn and B = (bij )mn , then

A + B = (aij + bij )mn

Definition
The scalar multiplication of a matrix A by a real number k,
denoted by kA, is a matrix formed by multiplying each element of
A by k. That is to say, if A = (aij )mn then

kA = (kaij )mn

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Examples

Evaluate the following expressions:


     
2 3 0 3 1 2 5 2 2
(a) + =
1 2 5 2 4 0 1 6 5

2 3 3 2 5 14
(b) 4 1 1 1 1 = 3 5
2 2 0 3 8 5

  1 7
5 0 2
(c) + 1 1 does not make sense.
1 3 8
2 2

x1 = t 17

x1 1 17
(d) x2 = 2t + 41 x2 = t 2 + 41
x3 1 0

x3 = t

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Some Properties

Let A, B and C are matrices of the same size and k be a real


number.
I A+B =B +A
I (A + B) + C = A + (B + C )
I A = (1)A
I A + (1)A = A A = 0, where 0 is the zero matrix, a matrix
with all its elements being zero.
I k(A + B) = kA + kB

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Product of a Row Matrix and a Column Matrix

The product of a 1 n row matrix and an n 1 column matrix is a


1 1 matrix given by

Example

 x1
3 5 4 x2 = 3x1 + 5x2 + 4x3 .
x3

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Matrix Product

I If A is an m p matrix and B is a p n matrix, the matrix


product of A and B, denoted by AB, is an m n matrix whose
element in the i th row and j th column is the number obtained
from the product of the i th row of A and j th column of B.
I If the number of columns in A does not equal to the number
of rows in B, the matrix product AB is not defined.

Example
Find the value for a21 from the product of the following two
matrices A and B:

  2 1 0
1 2 3
A= , B= 0 1 2
0 1 1
1 0 4

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Matrix Product

Solution
1. Check whether AB is well defined: A is a 2-by-3 matrix and B
is a 3-by-3 matrix, well-defined.
2. Find aij by using the product of the ith-row from the first
matrix and the j-th column from the second matrix.

 2
2nd row from A : 0 1 1 , 1st column from B : 0
1

a21 = 0 2 + 1 0 + 1 (1) = 1.

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Matrix Product - Examples

Evaluate the following matrix products:

    
a b A B Aa + Cb Ba + Db
(a) =
c d C D Ac + Cd Bc + Dd
    
2 6 1 2 20 40
(b) =
1 3 3 6 10 20
    
1 2 2 6 0 0
(c) =
3 6 1 3 0 0

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Matrix Product - Examples


2 1   4 1 2 2
(d) 1 0 1 1 0 1 = 1 1 0 1
2 1 2 0
1 0 1 1 0 1

  2 1
1 1 0 1
(e) 1 0 not defined!
2 1 2 0
1 0

 5
(f) 2 3 0 2 = 16
2

5  10 15 0
(g) 2 2 3 0 = 4 6 0
2 4 6 0

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Some Properties

Let A and C be two m p matrices. Let B and D be two p n


matrices.
I In general, AB 6= BA.
I In general, AB = 0 does not imply that A = 0 or B = 0.
I A(B + D) = AB + AD.
I (A + C )B = AB + CB.

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Summary

MATH 1003 Calculus and Linear Algebra (Lecture 9)


Question

Express the following system of linear equations by means of


matrix operations:

a11 x1 + a12 x2 + a13 x3 + a14 x4 = b1


a x + a x + a x + a x = b
21 1 22 2 23 3 24 4 2


a x
31 1 + a x
32 2 + a x
33 3 + a x
34 4 = b3

a41 x1 + a42 x2 + a43 x3 + a44 x4 = b4

MATH 1003 Calculus and Linear Algebra (Lecture 9)

You might also like