0% found this document useful (0 votes)
13 views9 pages

Lecture 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views9 pages

Lecture 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

2.

1 Operations with Matrices


n Matrix:
Lecture 2 ⎡ a11 a12 a13 ! a1n ⎤
⎢a ⎥
⎢ 21 a22 a 23 ! a2 n ⎥
Matrices Operations A = [aij ] = ⎢ a31 a32 a33 ! a3n ⎥ ∈ M m×n
⎢ ⎥
⎢ " " " " ⎥
⎢⎣am1 am 2 am3 ! amn ⎥⎦
m×n
2.1 Operations with Matrices
(i, j)-th entry: aij
2.2 Properties of Matrix Operations
row: m
2.3 The Inverse of a Matrix
column: n
2.4 Elementary Matrices
size: m×n

n i-th row vector n Diagonal matrix:


ri = [ai1 ai 2 ! ain ] row matrix ⎡d1 0 … 0⎤
⎢0 d2 ! 0⎥
A = diag (d1 , d 2 ,!, d n ) = ⎢ ⎥ ∈ M n×n
n j-th column vector ⎢" " # "⎥
⎢0 ! d n ⎥⎦
⎡ c1 j ⎤ ⎣ 0
⎢c ⎥
cj = ⎢ ⎥
2j column matrix n Trace:
⎢ ! ⎥
⎢c ⎥
⎣ mj ⎦ If A = [aij ]n×n
n Square matrix: m=n Then Tr ( A) = a11 + a22 + ! + ann

1
n
n Ex: n Equal matrix:
⎡1 2 3⎤ ⎡ r1 ⎤
A=⎢ ⎥ =⎢ ⎥ If A = [aij ]m×n , B = [bij ]m×n
⎣4 5 6⎦ ⎣r2 ⎦
Then A = B if and only if aij = bij ∀ 1 ≤ i ≤ m, 1 ≤ j ≤ n
⇒ r1 = [1 2 3], r2 = [4 5 6]
n Ex 1: (Equal matrix)
⎡ 1 2 3⎤ ⎡1 2⎤ ⎡a b ⎤
A=⎢ ⎥ = [c1 c2 c3 ] A=⎢ ⎥ B=⎢ ⎥
⎣ 4 5 6⎦ ⎣3 4⎦ ⎣c d ⎦
⎡1 ⎤ ⎡ 2⎤ ⎡ 3⎤
⇒ c1 = ⎢ ⎥, c2 = ⎢ ⎥, c3 = ⎢ ⎥ If A = B
4
⎣ ⎦ 5
⎣ ⎦ ⎣6 ⎦
Then a = 1, b = 2, c = 3, d = 4

n Matrix addition: n Scalar multiplication:


If A = [aij ]m×n , B = [bij ]m×n If A = [aij ]m×n , c : scalar

Then A + B = [aij ]m×n + [bij ]m×n = [aij + bij ]m×n Then cA = [ca ij ]m×n

n Matrix subtraction:
Ex 2: (Matrix addition)
A − B = A + (−1) B
n

⎡− 1 2⎤ ⎡ 1 3⎤ ⎡− 1 + 1 2 + 3⎤ ⎡ 0 5⎤
⎢ 0 1⎥ + ⎢− 1 2⎥ = ⎢ 0 − 1 1 + 2⎥ = ⎢− 1 3⎥ n Ex 3: (Scalar multiplication and matrix subtraction)
⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
⎡ 1 2 4⎤ ⎡ 2 0 0⎤
⎡ 1⎤ ⎡− 1⎤ ⎡ 1 − 1 ⎤ ⎡0 ⎤ A = ⎢− 3 0 − 1⎥ B = 1 − 4 3⎥

⎢ − 3⎥ + ⎢ 3⎥ = ⎢ − 3 + 3 ⎥ = ⎢0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣⎢ 2 1 2⎦⎥ ⎢⎣− 1 3 2⎥⎦
⎣⎢− 2⎦⎥ ⎣⎢ 2⎦⎥ ⎢⎣− 2 + 2⎥⎦ ⎢⎣0⎥⎦
Find (a) 3A, (b) –B, (c) 3A – B

2
n
Sol: n Matrix multiplication:
(a)
⎡ 1 2 4⎤ ⎡ 3(1) 3(2 ) 3(4 )⎤ ⎡ 3 6 12⎤ If A = [aij ]m×n , B = [bij ]n× p
3A = 3⎢− 3 0 − 1⎥ = ⎢3(− 3) 3(0 ) 3(− 1)⎥ = ⎢− 9 0 − 3⎥ Then AB = [aij ]m×n [bij ]n× p = [cij ]m× p
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣⎢ 2 1 2⎦⎥ ⎣⎢ 3(2 ) 3(1) 3(2 )⎦⎥ ⎣⎢ 6 3 6⎦⎥
Size of AB
(b) 0 0⎤ ⎡ − 2 0 0⎤
n
⎡ 2 where cij = ∑ aik bkj = ai1b1 j + ai 2b2 j + ! + ainbnj

− B = (− 1) 1 − 4 3 ⎥ = ⎢ − 1 4 − 3⎥ k =1
⎢ ⎥ ⎢ ⎥
⎡ a11 a12 ! a1n ⎤ b ! b
⎣⎢− 1 3 2⎦⎥ ⎢⎣ 1 − 3 − 2⎦⎥ ⎢ " ⎡ 11 ! b1n ⎤ ⎡ ⎤
" ⎥⎥ ⎢
1j

b21 " b2 j ! b2 n ⎥⎥ ⎢
⎢ " ⎥
(c) ⎢ ai1 ai 2 ! ain ⎥ ⎢ = ⎢ ⎥
⎡ 3 6 12⎤ ⎡ 2 0 0⎤ ⎡ 1 6 12⎤ ⎢ " ⎢ " " " " ⎥ ⎢ c c ! c ! c ⎥
" " ⎥⎢ i1 i2 ij in
⎥ ⎢bn1 ! bnj ! bnn ⎥⎥ ⎢⎣ ⎥
3 A − B = − 9 0 − 3 − 1 − 4 3⎥ = ⎢− 10 4 − 6⎥
⎢ ⎥ ⎢ ⎢ ⎦
⎣ ⎦
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣⎢an1 an 2 ! ann ⎦⎥
⎣⎢ 6 3 6⎦⎥ ⎢⎣− 1 3 2⎦⎥ ⎣⎢ 7 0 4⎦⎥
n Notes: (1) A+B = B+A, (2) AB ≠ BA

n Ex 4: (Find AB) n Matrix form of a system of linear equations:


⎡− 1 3⎤ ⎧ a11 x1 + a12 x2 + ! + a1n xn = b1
⎡− 3 2⎤
A = ⎢ 4 − 2⎥ B=⎢ ⎪ a x + a x +!+ a x = b
⎪ 21 1 22 2
⎢ ⎥ ⎣− 4 1⎥⎦ ⎨
2n n 2
m linear equations
⎢⎣ 5 0⎥⎦ ⎪ "
Sol: ⎪⎩am1 x1 + am 2 x2 + ! + amn xn = bm
⎡ (−1)(−3) + (3)(−4) (−1)(2) + (3)(1) ⎤
AB = ⎢(4)(−3) + (−2)(−4) (4)(2) + (−2)(1)⎥ ⇓
⎢ ⎥
⎣⎢ (5)(−3) + (0)(−4) (5)(2) + (0)(1) ⎦⎥ ⎡ a11 a12 " a1n ⎤ ⎡ x1 ⎤ ⎡ b1 ⎤
⎢a ⎥⎢ ⎥ ⎢ ⎥ Single matrix equation
⎢ 21 a22 " a2 n ⎥ ⎢ x2 ⎥ = ⎢ b2 ⎥
⎡ −9 1 ⎤ ⎢ ! ! ⎥⎢ ! ⎥ ⎢ ! ⎥
! ! Ax =b
= ⎢−4 6⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ m × n n ×1 m ×1
⎢ ⎥ a
⎣ m1 a m2 " a mn ⎦ ⎣ xn ⎦ ⎣bm ⎦
⎣⎢− 15 10⎦⎥

=
A x b

3
n
2.2 Properties of Matrix Operations
n Partitioned matrices: Three basic matrix operators:
submatrix
n

⎡ a11 a12 a13 a14 ⎤ (1) matrix addition


⎡A A12 ⎤
A = ⎢a21 a22 a23 a24 ⎥ = ⎢ 11 (2) scalar multiplication
⎢ ⎥ ⎣ A21 A22 ⎥⎦
⎣⎢ a31 a32 a33 a34 ⎦⎥ (3) matrix multiplication
⎡ a11 a12 a13 a14 ⎤ ⎡ r1 ⎤
A = ⎢a21 a22 a23 a24 ⎥ = ⎢r2 ⎥ n Zero matrix: 0 m×n
⎢ ⎥ ⎢ ⎥
⎢⎣ a31 a32 a33 a34 ⎥⎦ ⎢⎣ r3 ⎥⎦
In
n Identity matrix of order n:
⎡ a11 a12 a13 a14 ⎤
A = ⎢a21 a22 a23 a24 ⎥ = [c1 c2 c3 c4 ]
⎢ ⎥
⎣⎢ a31 a32 a33 a34 ⎦⎥

n Properties of matrix addition and scalar multiplication: n Properties of zero matrices:

If A, B, C ∈ M m×n , c, d : scalar If A ∈ M m×n , c : scalar

Then (1) A+B = B + A Then (1) A + 0m×n = A


(2) A + ( B + C ) = ( A + B ) + C (2) A + (− A) = 0m×n

(3) ( cd ) A = c ( dA )
(3) cA = 0m×n ⇒ c = 0 or A = 0m×n

(4) 1A = A
n Notes:
(5) c( A+B ) = cA + cB (1) 0m×n: the additive identity for the set of all m×n matrices
(6) ( c+d ) A = cA + dA (2) –A: the additive inverse of A

4
n
n Transpose of a matrix: n Ex 8: (Find the transpose of the following matrix)
⎡ a11 a12 ! a1n ⎤ ⎡ 1 2 3⎤ ⎡0 1⎤
⎡ 2⎤
⎢a a22 ! a2 n ⎥ (a) A = ⎢ ⎥ (b) A = ⎢ 4 5 6⎥ (c) A = ⎢2 4⎥
If A = ⎢ 21 ⎥ ∈ M m×n ⎣8 ⎦ ⎢ ⎥ ⎢ ⎥
⎢ " " " " ⎥ ⎣⎢7 8 9⎦⎥ ⎣⎢ 1 − 1⎦⎥
⎢a am 2 ! amn ⎥⎦ Sol: (a)
⎣ m1 ⎡ 2⎤
A=⎢ ⎥ ⇒ AT = [2 8]
a21 ! am1 ⎤ ⎣8 ⎦
⎡ a11
⎢a (b) ⎡ 1 2 3⎤ ⎡1 4 7⎤
a22 ! am 2 ⎥
Then AT = ⎢ 12 ⎥ ∈ M n×m A = ⎢4 5 6⎥ ⇒ AT = ⎢2 5 8⎥
⎢ " " " " ⎥ ⎢ ⎥ ⎢ ⎥
⎢a ⎣⎢7 8 9⎦⎥ ⎢⎣3 6 9 ⎦⎥
⎣ 1n a2 n ! amn ⎥⎦
(c) ⎡ 0 1 ⎤
⎡0 2 1⎤
A = ⎢2 4⎥ ⇒ AT = ⎢
⎢ ⎥ ⎣1 4 − 1⎥⎦
⎣⎢ 1 − 1⎦⎥

n Properties of transposes: n Symmetric matrix:


(1) ( A ) = A
T T A square matrix A is symmetric if A = AT

(2) ( A + B)T = AT + BT n Ex:


(3) (cA)T = c( AT ) ⎡ 1 2 3⎤
If A = ⎢a 4 5⎥ is symmetric, find a, b, c?
⎢ ⎥
(4) ( AB)T = BT AT
⎣⎢b c 6⎦⎥
Sol:
⎡ 1 2 3⎤ ⎡1 a b ⎤
A = ⎢a 4 5⎥ AT = ⎢2 4 c ⎥ A = AT
⎢ ⎥ ⎢ ⎥
⎢⎣b c 6⎥⎦ ⎢⎣3 5 6⎥⎦ ⇒ a = 2, b = 3, c = 5

5
n
n Note: AAT is symmetric n Ex 4:
T Show that AB and BA are not equal for the matrices.
n Note: A A is symmetric
⎡ 1 3⎤ ⎡2 − 1⎤
Matrix: in general A=⎢ ⎥ and B=⎢ ⎥
⎣2 − 1⎦ ⎣ 0 2⎦
n

AB ≠ BA
m× n n× p Sol:
We have 3 situations: ⎡ 1 3⎤ ⎡2 − 1⎤ ⎡2 5⎤
AB = ⎢ ⎥ ⎢ 0 2⎥ = ⎢ 4 − 4⎥
⎣ 2 − 1⎦⎣ ⎦ ⎣ ⎦
(1) If m ≠ p, then AB is defined , BA is undefined.
⎡2 − 1⎤ ⎡ 1 3⎤ ⎡0 7⎤
(2) If m = p, m ≠ n, then AB ∈ M m×m , BA ∈ M n×n (Sizes are not the same) BA = ⎢ ⎥ ⎢2 − 1⎥ = ⎢4 − 2⎥
⎣ 0 2 ⎦⎣ ⎦ ⎣ ⎦
(3) If m = p = n, then AB ∈ M m×m , BA ∈ M m×m
(Sizes are the same, but matrices are not equal) n Note: AB ≠ BA

n Real number: n Ex 5: (An example in which cancellation is not valid)


ac = bc, c ≠ 0 Show that AC=BC
⇒ a=b (Cancellation law) ⎡ 1 3⎤ ⎡ 2 4⎤ ⎡ 1 − 2⎤
A=⎢ ⎥, B = ⎢2 3⎥, C = ⎢− 1
⎣0 1⎦ ⎣ ⎦ ⎣ 2⎥⎦
n Matrix:
AC = BC C≠0 Sol:
⎡1 3⎤ ⎡ 1 − 2⎤ ⎡− 2 4⎤
AC = ⎢ =
(1) If C is invertible, then A = B ⎣0 1⎥⎦ ⎢⎣− 1 2⎥⎦ ⎢⎣ − 1 2⎥⎦
⎡2 4⎤ ⎡ 1 − 2⎤ ⎡ − 2 4⎤
(2) If C is not invertible, then A ≠ B (Cancellation is not BC = ⎢ =
valid) ⎣2 3⎥⎦ ⎢⎣− 1 2 ⎥⎦ ⎢⎣ − 1 2⎥⎦
So AC = BC
But A≠ B

6
n
2.3 The Inverse of a Matrix
n Inverse matrix: n Find the inverse of a matrix by Gauss-Jordan Elimination:
Consider A ∈ M n×n [A | I ] ⎯Gauss
⎯⎯ ⎯ ⎯ ⎯⎯→[I | A−1 ]
- Jordan Elimination

If there exists a matrix B ∈ M n×n such that AB = BA = I n , n Ex 2: (Find the inverse of the matrix)
Then (1) A is invertible (or nonsingular) ⎡ 1 4⎤
A=⎢
⎣ − 1 − 3⎥⎦
(2) B is the inverse of A
Sol:
n Notes: AX = I
(1)A matrix that does not have an inverse is called ⎡ 1 4⎤ ⎡ x11 x12 ⎤ ⎡ 1 0⎤
⎢− 1 − 3⎥ ⎢ x =
noninvertible (or singular). ⎣ ⎦ ⎣ 21 x22 ⎥⎦ ⎢⎣0 1⎥⎦
(2) The inverse of A is unique and denoted by A−1 ⎡ x11 + 4 x21 x12 + 4 x22 ⎤ ⎡ 1 0⎤
⎢− x − 3 x =
(3) AA −1 = A −1 A = I ⎣ 11 21 − x12 − 3 x22 ⎥⎦ ⎢⎣0 1⎥⎦

x11 + 4 x21 = 1 Note:


⇒ (1) n

− x11 − 3x21 = 0
⎡ 1 4 ! 1 0⎤ Gauss −JordanElimination ⎡ 1 0 ! − 3 − 4⎤
x12 + 4 x22 = 0
(2) ⎢− 1 − 3 ! 0 1⎥ ⎯r⎯ (1 ) ⎯
(⎯
−4 ) →
12 , r21
⎢0 1 ! 1 1⎥⎦
− x12 − 3x22 = 1 ⎣ ⎦ ⎣
A I I A−1
(1) ⇒ ⎡ 1 4 ! 1⎤ ⎯r⎯ ⎯→⎡ 1 0 ! − 3⎤ ⇒ x11 = −3, x21 = 1
(1 ) ( −4 )

12 , r21

⎢⎣− 1 − 3 ! 0⎥⎦ ⎢⎣0 1 ! 1⎥⎦ If A can’t be row reduced to I, then A is singular.

(2) ⇒ ⎡ 1 4 ! 0⎤ ⎯r⎯ ⎯→⎡ 1 0 ! − 4⎤ ⇒ x12 = −4, x22 = 1


(1) ( −4 )

12 , r21

⎢⎣− 1 − 3 ! 1⎥⎦ ⎢⎣0 1 ! 1⎥⎦


Thus
⎡x x12 ⎤ ⎡− 3 − 4⎤
X = A−1 = ⎢ 11 = ( AX = I = AA-1 )
⎣ x21 x22 ⎥⎦ ⎢⎣ 1 1 ⎥⎦

7
n
n Ex 3: (Find the inverse of the following matrix) ⎡ 1 − 1 0 ! 1 0 0⎤ ⎡ 1 0 0 ! − 2 − 3 − 1⎤
r32(1) r21(1)
⎡ 1 − 1 0⎤ ⎯⎯→ ⎢0 1 0 ! − 3 − 3 − 1⎥ ⎯⎯→ ⎢0 1 0 ! − 3 − 3 − 1⎥
A = ⎢ 1 0 − 1⎥ ⎢⎣0 0 1 ! − 2 − 4 − 1⎥⎦ ⎢⎣0 0 1 ! − 1 − 4 − 1⎥⎦
⎢⎣− 6 2 3⎥⎦
= [ I ! A−1 ]
Sol:
So the matrix A is invertible, and its inverse is
⎡ 1 − 1 0 ! 1 0 0⎤
[A ! I ] = ⎢ 1 0 − 1 ! 0 1 0⎥ ⎡− 2 − 3 − 1⎤
⎢⎣− 6 2 3 ! 0 0 1⎥⎦ A−1 = ⎢⎢ − 3 − 3 − 1⎥⎥
( −1 ) ⎡ 1 − 1 0 ! 1 0 0⎤ (6) ⎡ 1 − 1 0 ! 1 0 0⎤ ⎣⎢− 2 − 4 − 1⎦⎥
⎯r⎯⎯→ ⎢ 0 1 − 1 ! − 1 1 0⎥ ⎯r⎯→
12 13
⎢0 1 − 1 ! − 1 1 0 ⎥
⎢⎣− 6 2 3 ! 0 0 1⎥⎦ ⎢⎣0 − 4 3 ! 6 0 1⎥⎦ n Check:

⎡ 1 − 1 0 ! 1 0 0⎤ AA−1 = A−1 A = I
⎡ 1 − 1 0 ! 1 0 0⎤ r3( −1)
r23( 4 )
⎯⎯→ ⎢0 1 − 1 ! − 1 1 0⎥ ⎯⎯
⎯→ ⎢0 1 − 1 ! − 1 1 0⎥
⎢⎣0 0 1 ! − 2 − 4 − 1⎥⎦
⎣⎢0 0 − 1 ! 2 4 1⎥⎦

n Power of a square matrix: Properties of inverse matrices:


(1) A0 = I
If A is an invertible matrix, k is a positive integer, and c is a scalar
(2) Ak = $
AA
!# %
!"A (k > 0) not equal to zero, then
k factors

(3) A ⋅ A = Ar + s
r s
r , s : integers (1) A−1 is invertible and ( A−1 ) −1 = A
( Ar ) s = Ars (2) Ak is invertible and ( Ak ) −1 = $
A−!#
1 −1
A % A−1 = ( A−1 ) k = A− k
! !"
!
⎡d1 0 ! 0⎤ ⎡d k
0 ! 0⎤ k factors

⎢0 ⎢
1
⎥ 1
d2 ! 0⎥ 0 d k
! 0⎥ (3) cA is invertible and (cA) −1 = A−1 , c ≠ 0
( 4) D = ⎢ ⎥ ⇒ Dk = ⎢ 2 c
⎢" " # "⎥ ⎢" " "⎥
⎢0 ⎢ ⎥ (4) AT is invertible and ( AT ) −1 = ( A−1 )T
⎣ 0 ! d n ⎥⎦ ⎣0 0 ! d nk ⎦
(5) If A and B are invertible matrices of size n, then AB
is invertible and (AB)−1 = B −1 A −1

8
n
(6) If C is an invertible matrix, then
(a) If AC=BC, then A=B (Right cancellation property)
(b) If CA=CB, then A=B (Left cancellation property)
(7) Cramer’s rule: If A is an invertible matrix, then the system
of linear equations Ax = b has a unique solution given by
x = A−1b
(7’) If A is an n×n matrix, then the following statements are
equivalent
(a) A is invertible.
(b) Ax = b has a unique solution for every n×1 column matrix b.
(c) Ax = 0 has only the trivial solution.

9
n

You might also like