You are on page 1of 39

REVIEW ON

MATRICES
2.1 Operations with Matrices
2.2 Properties of Matrix Operations

Elementary Linear Algebra


R. Larson (7 Edition)
Linear Algebra Applied

Flight Crew Scheduling (p.47) Beam Deflection (p.64)

Information Retrieval (p.58)

Computational Fluid Dynamics (p.79) Data Encryption (p.87)


2/75
2.1 Operations with Matrices

Matrix:
 a11 a12 a13  a1n 
a a22 a 23  a2 n 
 21
A  [aij ]mn   a31 a32 a33  a3n   M mn
 
    
am1 am 2 am 3  amn  mn

(i, j)-th entry: aij

row: m
column: n
size: m×n

Elementary Linear Algebra: Section 2.1, p.40 3/75



i-th row vector
ri   ai1 ai 2  ain  row matrix


j-th column vector
 c1 j 
c 
cj   2j
 column matrix
 
c 
 mj 

Square matrix: m=n

Elementary Linear Algebra: Section 2.1, p.40 4/75



Ex 1:
1 2 3  r1 
A   
4 5 6 r2 
 r1  1 2 3 , r2   4 5 6

1 2 3
A    c1 c2 c3 
4 5 6
1   2  3
 c1   , c2   , c3   
 4 5  6 

Elementary Linear Algebra: Section 2.1, Addition 5/75



Diagonal matrix: a square matrix in which nonzero
elements are found only in the main diagonal

Diagonal matrix:
d1 0  0
0 d  0
A  diag (d1 , d 2 , , d n )   2
  M nn
   
0 0  d n 

※ It is the usual notation for a diagonal matrix

a11 0  0
0 a22  0 

Trace operation: A
   
Given  
If A  [aij ]nn 00  ann 

Then Tr ( A)  a11  a22    ann


 The trace of A is undefined if A is not a square matrix.
Elementary Linear Algebra: Section 2.1, Addition 6/75

Equal matrix:
If A  [aij ]mn , B  [bij ]mn

Then A  B if and only if aij  bij  1  i  m, 1  j  n


Ex 2: (Equal matrix)
1 2 a b 
A  B 
3 4   c d 

If A  B
Then a  1, b  2, c  3, d  4

Elementary Linear Algebra: Section 2.1, p.40 7/75



Matrix addition:
If A  [aij ]mn , B  [bij ]mn
Then A  B  [aij ]mn  [bij ]mn  [aij  bij ]mn


Ex 3: (Matrix addition)

 1 2  1 3  1  1 2  3  0 5
 0 1   1 2   0  1 1  2   1 3
       

 1  1  1  1  0
  3   3    3  3   0
       
 2  2  2  2 0

Elementary Linear Algebra: Section 2.1, p.41 8/75



Scalar multiplication:
If A  [aij ]mn , c : scalar
Then cA  [caij ]mn

Matrix subtraction:
A  B  A  (1) B


Ex 4: (Scalar multiplication and matrix subtraction)
 1 2 4  2 0 0
A   3 0  1 B   1  4 3
   
 2 1 2  1 3 2

Find (a) 3A, (b) –B, (c) 3A – B


Elementary Linear Algebra: Section 2.1, p.41 9/75
Sol:
(a)
 1 2 4  31 3 2  3 4    3 6 12
3A  3 3 0  1  3  3 3 0  3  1    9 0  3
     
 2 1 2  3 2  31 3 2    6 3 6
(b) 0 0   2 0 0
 2
 B    1  1  4 3    1 4  3

 
 1 3 2  1  3  2
(c)
 3 6 12  2 0 0  1 6 12
3 A  B   9 0  3   1  4 3   10 4  6
   
 6 3 6  1 3 2  7 0 4

Elementary Linear Algebra: Section 2.1, p.41 10/75



Matrix multiplication:
If A  [aij ]mn , B  [bij ]n p
Then AB  [aij ]mn [bij ]n p  [cij ]m p

Size of AB=m × p
n
where cij   aik bkj  ai1b1 j  ai 2b2 j    ainbnj
k 1

 a11 a12  a1n  b  b


    11 1j  b1n   
     
b  b  b
 ai1 ai 2  ain    
21 2 j 2 n

       ci1 ci 2  cij  cin 



 bn1  bnj  bnn  
 
 
an1 an 2  ann   


Notes: (1) A+B = B+A, (2)AB  BA
Elementary Linear Algebra: Section 2.1, p.42 & p.44 11/75

Ex 5: Find AB
 1 3
   3 2
A   4 2  B 
  4 1 2 2
 5 0  3 2
Sol:
 (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)  3 2
 9 1 
  4 6 
 15 10  3 2

Note: (1) BA is not multipliable
(2) Even BA is multipliable, it could be that AB ≠ BA 12/75

Matrix form of a system of linear equations in n variables:
 a11 x1  a12 x2    a1n xn  b1
 a x  a x  a x  b
 21 1 22 2 2n n 2
 m linear equations
 
am1 x1  am 2 x2    amn xn  bm


 a11 a12  a1n   x1   b1 
a a22  a2 n   x2   b2  Single matrix equation
 21 
          Ax b
     m  n n 1 m 1

am1 am 2  amn   xn  bm 


=

A x b
Elementary Linear Algebra: Section 2.1, p.45 13/75
※ Partitioned matrices can be used to simplify
equations or to obtain new interpretation of
equations (see the next slide)

Partitioned matrices:
row vector
 a11 a12 a13 a14   r1 
A   a21 a22 a23 a24   r2 
 a31 a32 a33 a34   r3 

 a11 a12 a13 a14  column vector


A   a21 a22 a23 a24    c1 c 2 c3 c4 
 a31 a32 a33 a34 

submatrix
 a11 a12 a13 a14 
 A11 A12 
A  a21 a22 a23 
a24  
   A21 A22 
 a31 a32 a33 a34 
14/75

Ax is a linear combination of the column vectors of matrix A:

 a11 a12  a1n   x1 


a x 
a22  a2 n  x   2
A   21    c1 c2  cn 
      
a x 
 m1 am 2  amn   n

 a11 x1  a12 x2    a1n xn   a11   a12   a1n 


 a x  a x  a x  a  a  a 
 Ax   21 1 22 2 2n n
  x1  21   x2  22     xn  2 n 
        
a x  a x    a x  a  a  a 
 m1 1 m 2 2 mn n  m1  m1   m2   mn 
c1 c2 cn

Elementary Linear Algebra: Section 2.1, p.46 15/75


Ax  x1c1  x2c2    xn cn  Ax can be viewed as the linear combination of the
column vectors of A with coefficients x1, x2,…, xn

 x1 
x 
Ax   c1 c2  cn   2  ← You can derive the same result if you perform
  the matrix multiplication for matrix A
  expressed in column vectors and x directly
 xn 

16/75
Key Learning in Section 2.1
 Determine whether two matrices are equal.
 Add and subtract matrices and multiply a matrix by a scalar.
 Multiply two matrices.
 Use matrices to solve a system of linear equations.
 Partition a matrix and write a linear combination of column
vectors.

17/75
2.2 Properties of Matrix Operations

Three basic matrix operators:
(1) matrix addition
(2) scalar multiplication
(3) matrix multiplication

Elementary Linear Algebra: Section 2.2, 52-55 18/75


2.2 Properties of Matrix Operations

0 0  0
0 0  0 

Zero matrix: 0mn 
   
 
0 0  0  mn

1 0  0
0 1  0 

Identity matrix of order n: In  
   
 
0 0  1  n n

Elementary Linear Algebra: Section 2.2, 52-55 19/75



Properties of zero matrices:
If A  M mn , c : scalar
Then (1) A  0 mn  A
※ So, 0m×n is also called the additive identity for the set of all m×n matrices

(2) A  ( A)  0 mn
※ Thus , –A is called the additive inverse of A

(3) cA  0 mn  c  0 or A  0 mn


Notes:
(1) 0m×n: the additive identity for the set of all m×n matrices
(2) –A: the additive inverse of A

Elementary Linear Algebra: Section 2.2, p.53 20/75



Properties of the Identity Matrix

If A is a matrix of size mn, then the following properties are true.

1. AIn = A
2. ImA = A


If A is a square matrix of order n, then AIn = InA = A.

21/75

Properties of matrix addition and scalar multiplication:
If A, B, C  M m n , and c, d are scalars,
then (1) A+B = B+A (Commutative property of matrix addition)

(2) A+(B+C) = (A+B)+C (Associative property of matrix addition)

(3) ( cd ) A = c ( dA ) (Associative property of scalar multiplication)


(Multiplicative identity property, and 1 is
(4) 1A = A the multiplicative identity for all matrices)
(5) c( A+B ) = cA + cB (Distributive property of scalar
multiplication over matrix addition)
(6) ( c+d ) A = cA + dA (Distributive property of scalar
multiplication over real-number addition)

Notes:
All above properties are very similar to the counterpart
properties for real numbers
22/75

Properties of matrix multiplication:
(1) A (BC) = (AB ) C (Associative property of matrix multiplication)
(2) A (B+C) = AB + AC (Distributive property of LHS matrix multiplication
over matrix addition)
(3) (A+B)C = AC + BC (Distributive property of RHS matrix multiplication
over matrix addition)
(4) c (AB) = (cA) B = A (cB) (Associative property of scalar and matrix
multiplication)
※ For real numbers, the properties (2) and (3) are the same since the order for the
multiplication of real numbers is irrelevant
※ The real-number multiplication can satisfy above properties and there is a
commutative property for the real-number multiplication, i.e., cd = dc

23/75

Ex 1: Matrix Multiplication is Associative
Calculate (AB)C and A(BC) for
 1 0 
 1 2  1 0 2
A  , B  , and C  3 1  .
 2 1 3 2 1   2 4 
Sol:
 1 0
 1 2  1 0 2   
( AB)C        3 1 
 2 1 3 2 1  
 2 4 
 1 0 
 5 4 0   17 4
  3 1  
 1 2 3 
 13 14
 2 4 

24/75
  1 0  
1 2  1 0 2  
A( BC )   3 1
2 1  3 2 1   
  2 4  
1 2  3 8  17 4 
 
2 1  7 2  13 14 

25/75

Definition of Ak : Repeated multiplication of a square matrix:
A1  A, A2  AA, , Ak  
AA A
k matrices of A

Properties for Ak:
(1) AjAk = Aj+k
(2) (Aj)k = Ajk j and k are nonnegative integer

0
A = In, where A is a square matrix of order n

For diagonal matrices:
 d1 0  0  d1k 0  0
0 d  
 0  0 d 2k  0 
D 2
 Dk  
      
   k
0 0  dn   0 0  d n 
26/75
3 2  1

Example 2: Find A for the matrix: A    .
3 0 

 2  1  2  1  2  1 1  2 2  1  4  1 
A   
3
   
       
 3 0  3 0   3 0   6  3  3 0   3  6 

Transpose of a matrix:
 a11 a12  a1n 
a a22  a2 n 
If A   21   M mn
    
a am 2  amn 
 m1

 a11 a21  am1 


a a22  am 2 
Then AT   12   M nm
    
a a2 n  amn 
 1n
※ The transpose operation is to move the entry aij (original at the position (i, j)) to
the position (j, i)
※ Note that after performing the transpose operation, AT is with the size n×m
Elementary Linear Algebra: Section 2.2, p.57 28/75

Ex 3: Find the transpose of the following matrix
 1 2 3 0 1
 2
(a) A    (b) A  4 5 6 (c A   2 4
8    )  
7 8 9  1  1
Sol: (a)  2
A   AT   2 8
8 
(b)  1 2 3 1 4 7
A  4 5 6  AT  2 5 8
   
7 8 9 3 6 9 
(c
 0 1
)   0 2 1
A 2 4
  A  1
T
 4  1
 1  1
Elementary Linear Algebra: Section 2.2, p.57 29/75

Properties of transposes:
(1) ( AT )T  A
(2) ( A  B )T  AT  B T
(3) (cA)T  c( AT )
(4) ( AB)T  BT AT
※ Properties (2) and (4) can be generalized to the sum or product of
multiple matrices. For example, (A+B+C)T = AT+BT+CT and
(ABC)T = CTBTAT
※ Since a real number also can be viewed as a 1 × 1 matrix, the transpose
of a real number is itself, that is, for , aT = a. In other words,
transpose operation has actually no effect on real numbers

Elementary Linear Algebra: Section 2.2, p.57 30/75



Ex 4: Show that (AB)T and BTAT are equal

 2 1 2   3 1
A   1 0 3 B   2 1
 0 2 1  3 0 

Sol:
T T
 2 1 2   3 1   2 1
        2 6 1
( AB)    1 0
T
3  2 1    6 1   
  0 2  1 1 2 
 1 
 3 0 
 
 1 2 

 2 1 0 
3 2 3     2 6 1
B A 
T T
  1 0 2     ( AB )T  B T AT
1 1 0   2 3 1 1 2 
 1 

31/75

Symmetric matrix:
A square matrix A is symmetric if A = AT

Skew-symmetric matrix:
A square matrix A is skew-symmetric if AT = –A

Ex 5:
 1 2 3
If A  a 4 5 is symmetric, find a, b, c?
 
b c 6
Sol:
 1 2 3 1 a b 
A  A T
A  a 4 5 AT  2 4 c 
     a  2, b  3, c  5
b c 6 3 5 6
Elementary Linear Algebra: Section 2.2, Addition 32/75

Ex 6:
 0 1 2
If A  a 0 3 is a skew-symmetric, find a, b, c?
 
b c 0
Sol:
 0 1 2  0  a  b
A   a 0 3  AT    1 0  c 
b c 0  
 2  3 0 

A   AT  a  1, b  2, c  3

AAT must be symmetric ※ The matrix A could be with any size,
Note: i.e., it is not necessary for A to be a
Proof ( AAT )T  ( AT )T AT  AAT square matrix.
: ※ In fact, AAT must be a square matrix.
 AAT is symmetric
33/75

Real number:
ab = ba (Commutative law for multiplication of real
numbers)

Matrix:
AB  BA
m n n p n p m n

Three
situations:
(1) If m  p, then AB is defined , BA is undefined.

(2) If m  p, m  n, then AB  M mm , BA  M nn (Sizes are not the


same)
(3) If m  p  n, then AB  M mm , BA  M mm
(Sizes are the same, but matrices are not equal)

Elementary Linear Algebra: Section 2.2, Addition 34/75



Ex 7:
Sow that AB and BA are not equal for the matrices.
 1 3 2  1
A  and B 
 2  1  0 2 
Sol:
 1 3 2  1 2 5
AB       
 2  1 0 2   4  4 
AB  BA
2  1  1 3 0 7
BA       
 0 2  2  1  4  2 


Note: AB  BA (noncommutativity of matrix multiplication)

Elementary Linear Algebra: Section 2.2, p.55 35/75



Notes:
(1) A+B = B+A (the commutative law of matrix addition)
(2) AB  BA (the matrix multiplication is not with the
commutative law) (so the order of matrix multiplication is very
important)

※ This property is different from the property for the


multiplication operations of real numbers, for which the
order of multiplication is with no difference

36/75

Real number:
ac  bc, c  0
 ab (Cancellation law for real numbers)

Matrix:
AC  BC C0
(1) If C is invertible, then A = B

(2) If C is not invertible, then A  B (Cancellation is not


necessary to be valid)

Elementary Linear Algebra: Section 2.2, p.55 37/75



Ex 8: An example in which cancellation is not valid
Show that AC=BC
 1 3  2 4  1  2
A  , B  , C 
 0 1  2 3   1 2 
Sol:
1 3  1  2  2 4
AC     
0 1  1 2   1 2

2 4  1  2   2 4
BC   
2 3  1 2    1 2
  

So AC  BC
But A B

Elementary Linear Algebra: Section 2.2, p.55 38/75


Key Learning in Section 2.2
 Use the properties of matrix addition, scalar multiplication,
and zero matrices.
 Use the properties of matrix multiplication and the identity
matrix.
 Find the transpose of a matrix.

39/75

You might also like