Lecture 5: Matrix Algebra, Lecture notes of Algebra

Matrix additions and Scalar Multiplications ... be two matrices of the same dimension, where columns. =+i φ &*** ... 5 matrix #$ whose 1 80 column vector is.

Typology: Lecture notes

2022/2023

Uploaded on 02/28/2023

newfound
newfound 🇨🇦

4.5

(13)

362 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture 5: Matrix Algebra
Matrix additions and Scalar Multiplications
De…nition 5.1. Let A= [~a1;~a2; :::; ~an]mn= [aij ]mnand B=h~
b1;~
b2; :::;~
bnimn=
[bij]mnbe two matrices of the same dimension, where columns
~ai=2
6
6
6
4
a1i
a2i
.
.
.
ami
3
7
7
7
5;~
bi=2
6
6
6
4
b1i
b2i
.
.
.
bmi
3
7
7
7
52Rm
and be a constant (scalar). In the short notation for matrix, A= [aij]mn; aij stands for
the entry in the ith row and jth columns. Then
A+B=h~a1+~
b1;~a2+~
b2; :::; ~an+~
bnimn= [aij +bij]mn
A = [~a1; ~a2; :::; ~an]mn= [aij ]mn:
Or in the expanded form,
2
6
6
6
4
a11 a12 ::: a1n
a21 a22 ::: a2n
.
.
..
.
.::: .
.
.
am1::: ::: amn
3
7
7
7
5+2
6
6
6
4
b11 b12 ::: b1n
b21 b22 ::: a2n
.
.
..
.
.::: .
.
.
bm1::: ::: bmn
3
7
7
7
5
=2
6
6
6
4
a11 +b11 a12 +b12 ::: a1n+b1n
a21 +b21 a22 +b22 ::: .
.
.
.
.
..
.
.::: .
.
.
am1+bm1::: ::: amn +bmn
3
7
7
7
5:
2
6
4
a11 ::: a1n
.
.
.::: .
.
.
am1::: amn
3
7
5=2
6
4
a11 ::: a1n
.
.
.::: .
.
.
am1::: amn
3
7
5:
Example 5.1 Let
A=2
4
123
456
789
3
5; B =2
4
234
567
891
3
5; C =034
167:
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Lecture 5: Matrix Algebra and more Lecture notes Algebra in PDF only on Docsity!

Lecture 5: Matrix Algebra

 Matrix additions and Scalar Multiplications

DeÖnition 5.1. Let A = [~a 1 ;~a 2 ; :::;~an] mn

= [aij ] mn

and B =

h ~b 1 ;

~b 2 ; :::;

~b n

i

mn

[bij ] mn

be two matrices of the same dimension, where columns

~ai =

a 1 i

a 2 i

. . .

ami

; ~bi =

b 1 i

b 2 i

. . .

bmi

2 R

m

and  be a constant (scalar). In the short notation for matrix, A = [aij ]mn ; aij stands for

the entry in the i th row and j th columns. Then

A + B =

h

~a 1 + ~b 1 ;~a 2 + ~b 2 ; :::;~an + ~bn

i

mn

= [aij + bij ] mn

A = [~a 1 ; ~a 2 ; :::; ~an] mn

= [aij ] mn

Or in the expanded form,

a 11 a 12 ::: a 1 n

a 21 a 22 ::: a 2 n

. . .

am 1 ::: ::: amn

b 11 b 12 ::: b 1 n

b 21 b 22 ::: a 2 n

. . .

bm 1 ::: ::: bmn

a 11 + b 11 a 12 + b 12 ::: a 1 n + b 1 n

a 21 + b 21 a 22 + b 22 :::

am 1 + bm 1 ::: ::: amn + bmn

a 11 ::: a 1 n

. .

. :::

am 1 ::: amn

a 11 ::: a 1 n

. .

. :::

am 1 ::: amn

Example 5.1 Let

A =

5 ; B =

5 ; C =

Then

A + B =

3 A =

A B =

How about

A + C =?

 Properties:

A + B = B + A

(A + B) + C = A + (B + C)

(A + B) = A + B:

 Matrix Multiplications

DeÖnition. Let A = [~a 1 ; ~a 2 ; :::;~ap] mp

= [aij ] mp

and B =

h ~b 1 ;

~b 2 ; :::;

~b n

i

pn

= [bij ] pn

be two matrices, where columns

~ai =

a 1 i

a 2 i

. . .

ami

2 R

m ; i = 1; 2 ; :::; p;

bj =

b 1 j

b 2 j

. . .

bpj

2 R

p ;

respectively. Note that

number of columns in A = p = number of rows in B:

Then the product of A and B is a m  n matrix AB whose i th column vector is

A~bi:

In other words,

AB =

h

A~b 1 ; A~b 2 ; :::; A~bn

i

mn

= [cij ] mn

BA =

3  3

Note that AB and BA have di§erent dimensions. (d) Both ñA 2  2 ; B 2  2 ; and

AB =

2  2

BA =

2  2

Apparently, even if AB and BA have the same size 2  2 ,

AB 6 = BA:

Another way to look at this deÖnition of multiplication is to use the fact that

1  p matrix times p  1 matrix = 1  1 matrix

which is just a number, i.e.,

a 1 a 2 ::: ap

b 1

b 2

. . .

bp

p X

i=

aibi:

Rewrite

A =

a 11 a 12 ::: a 1 p

a 21 a 22 ::: a 2 p

. . .

am 1 ::: ::: amp

A 1

A 2

Am

where n  1 matrix

Ai =

ai 1 ai 2 ::: aip

is the i th row of A:

is called a row vector. Then, we have the following so-called "row-column rule"

AB =

A 1

A 2

Am

h ~ b 1 ;

b 2 ; :::;

bn

i

A 1

A 2

Am

~b 1 ;

A 1

A 2

Am

~b 2 ; :::;

A 1

A 2

Am

~b n

A 1 ~b 1 A 1 ~b 2 ::: A 1 ~bn

A 2 ~b 1 A 2 ~b 2 ::: A 2 ~bn

. ..

.. A

i

~b j in row^ i^ column^ j^

Am

b 1 Am

b 2 ::: Am

bn

h

Ai~bj

i

mn

One can easily verify that

Ai~bj =

ai 1 ai 2 ::: aip

b 1 j

b 2 j

. . .

bpj

p X

k=

aikbkj = cij :

Example 5.3. Use the row-column rule to calculate

2

DeÖnition 5.2. Let A = [aij ] mp

. The transpose of A; denoting by A

T ; is a matrix of

p  m whose ith row is the ith column of the original matrix A. In other words, A

T is formed

then (Ai)

T is a column vectors in R

p

. The "row-column rule" becomes

AB =

A 1

A 2

Am

mp

h ~b 1 ;

~b 2 ; :::;

~b n

i

pn

(A 1 )

T  ~b 1 (A 1 )

T  ~b 2 ::: (A 1 )

T  ~bn

(A 2 )

T  ~b 1 (A 2 )

T  ~b 2 ::: (A 2 )

T  ~bn

(Am)

T  ~b 1 (Am)

T  ~b 2 ::: (Am)

T  ~bn

mn

h

(Ai)

T  ~bj

i

mn

DeÖnition 5.4. A square matrix A is called symmetric if A = A

T :

Following matrices are symmetric:

A =

; B =

5 ; C =

The matrix

D =

is not symmetric.

 Properties of Matrix Multiplication:

Let A; B; C are matrices whose sizes may vary and will be indicated by subscripts, 

be a constant. The m  m matrix Im whose diagonal entries are 1 and all other entries are

zero, i.e.,

Im =

mm

is called m  m identity matrix. We have the following properties:

  1. A (BC) = (AB) C () Amp (BpnCnr) pr

= (AmpBpn) mn

Cnr

  1. A (B + C) = AB + AC () Amp (Bpn + Cpn) = AmpBpn + AmpCpn
  2. (B + C) A = BA + CA () (Bpn + Cpn) Anm = BpnAnm + CpnAnm
  3.  (AB) = (A) B = A (B) ()  (AmpBpn) = (Amp) Bpn = Amp (Bpn)
  1. IA = AI = A () ImAmp = AmpIp = Amp

6. (A)

T = A

T

A

T

T

= A

8. (B + C)

T = B

T

  • C

T () (Bpn + Cpn)

T = (Bpn)

T

  • (Cpn)

T

9. (BC)

T = C

T B

T () (BpnCnr)

T = (Cnr)

T (Bpn)

T

  1. If A is symmetric, so is A

T :

Example 5.5 (a) Let

A =

; B =

Then

A

2

Note that A 6 = 0; but A

2 = 0: So in matrix multiplication, there is no "cancellation rule".

AB =

BA =

Note that AB 6 = BA: This shows that the commutative rule doesnít hold for matrix multi-

plication.

B

T A

T

= (AB)

T :

 Homework 5

  1. Find A + 2B; 3 A 3 B if

A =

; B =

  1. Given

A =

; B =

; C =