Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Matrices & Operations

Chapter One
Week One

1
2
3
4
5
Definition
 A matrix is a rectangular array of
numbers. The numbers in the array are
called the entries in the matrix.

 A matrix with size (order) m  n is a


matrix with m rows and n columns.

6
Notation
 An entry that occur in row i and column
j of a matrix A will be denoted by aij
 Thus a general m  n matrix might be
written as:
 a11 a12 a13  a1n 
a a22 a23  a2 n 
 21
      m rows
 
 
am1 am 2 am 3  amn 

n column
7
contd
 A matrix can be denoted by an
uppercase letter such as A, B or C. A
matrix can also be denoted by [aij],[bij]
or [cij]. Therefore,
 a11 a12 a13  a1n 
a a 22 a 23  a 2 n 
 21
A = [aij] =      
 
 
a m1 am2 a m3  a mn 

8
contd
 A matrix with n rows and n column is
called a square matrix of order n,
and the entries a11, a22, a33, …ann are
main diagonal of A;
 a11 a12 a13  a1n 
a a 23  a 2 n 
 21 a 22
     
 
 
a n1 a n 2 a n3  a nn 

9
OPERATION OF MATRICES
 Equal Matrices

Two matrices A = [aij] and B = [bij] are defined to be equal if they have the
same size and their corresponding entries are equal (aij = bij for all i and j).

2 3 2 3
Example 1: A  4 9 , B   x 9 ==> A = B only when x = 4
   

10
contd

Example 2:
1 2  1  1 2 w
A  2  3 4  B   2 x 4 
0  4 5   y  4 z 
The matrices and
are equal (A = B), if and only if w = -1, x = - 3, y = 0, and z = 5.

11
contd
 Addition and Subtraction

If A = [aij] and B = [bij] are matrices of size m  n, then their sum A+B is
the m  n matrix given by adding the entries of B to the corresponding
entries of A i.e.

A + B = [aij + bij].

Their differences A-B is the m  n matrix obtained by subtracting the


entries of B from the corresponding entries of A i.e.

A  B = [aij  bij]

12
contd
2 1 0 3  4 3 5 1 
 4 B
 2 2 0  1
Example 3:Let A   1 0 2 , ,

4 2 7 0
 
 3 2 4 5 

1 2 3
C 
2 1 0

 2 4 5 4
A B  
 1 2 2 3
,
Then

 7 0 3 5

 6 2 5 2 
A B  
 3 2 2 5 


 1 4 11  5

A+C, B+C, AC, BC are undefined


13
condt
 Sclar Multiples
If A = [aij] is an m  n matrix and c is a scalar, the scalar multiple of A by c
is the m  n matrix given by
cA = c[aij]

The symbol -A represents the scalar product (1)A. Moreover, if A and B


are of the same size, then AB represents the sum of A and (1)B. That is,
AB = A + (1)B

14
Example

1 2 4  0 2 7 9  6 3 
Let A   , B , C 
 2 6 0    1 3  5 3 0 12 

1 2 4  0 2 7  9  6 3  29  16 10
2 A  B  3C  2     3   
 2 6 0    1 3  5  3 0 12   14 9 41

15
Properties
Let A, B and C be m  n matrices and let c and d be scalars.
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
4. 1A = A Scalar Identity
5. c(A + B) = cA + cB Distributive Property
6. (c + d)A = cA + dA Distributive Property

16
Matrix Multiplication

i. Definition: If A = [aij] is an m n matrix and and B = [bij] is an n  p


matrix, the product AB is an m  p matrix
ii. AB = [cij] where
n

iii.
cij   aik bkj ai1b1 j  ai 2 b2 j  ai 3b3 j  ...  ain bnj
k 1

iv. In order for the product of two matrices to be defined, the number of
columns of the first matrix must equal the number of rows of the second
matrix.

17
Example
 p
1. a b c13  q   ap  bq  cr 11
 r  31

 2
a b c    2a  3b  4c 
2. d e f    3  2d  3e  4 f 
  23 4   21
  31

a b   p q r
3. A  B 
 c d  22  s t u  23
ap  bs aq  bt ar  bu 
 AB   
 cp  ds cq  dt cr  du  23
18
Properties
Let A, B, and C be matrices and let c be a scalar.
1. A(BC) = (AB)C Associative Property of Multiplication
2. A(B + C)=AB + AC Distributive Property
3. (A + B)C = AC + BC Distributive Property
4. c(AB) = (cA)B = A(cB) Distributive Property

19
Transpose Matrices
i. If A is an m  n matrix, the transpose matrix AT , is the n  m matrix whose
rows are the columns of A in the same order. In other words, the first row of
AT is the first column of A, the second row of AT is the second column of A,
and so on.

 1  2 4  1 3  5
A  3 7 0  AT   2 7 8 
Example 9:  
 5 8 6  4 0 6 

20
Properties

i. Let A and B denotes matrices of the same size, and let k denote a scalar.
ii. 1. If A is an m  n matrix, then AT is an n  m matrix
iii. 2. A  
T T
A
iv. 3. kA 
T
 kAT
4.  A  B   A  B
T T T
v.
vi. 5. ( AB )T
 B T T
A

21
Symmetric Matrices

i. A matrix A is called symmetric if A = AT

 1  2 3  1  2 3
 
A   2 9 5 AT   2 9 5 ==> A is a symmetric matrix
 3 5 6  3 5 6

22
Elementary Row Operations
(EROs)

 Interchange any two rows (row i and row j) and is denoted as


i. Ri  R j
 Multiply row i by a scalar k(k  0) and is denoted as
ii. Ri  kRi
 Add multiple of row j to row i and is denoted as

iii. Ri  Ri  kR j

23
contd
a) ERO : Interchange rows 1 and 3

a b c g h i
d e f  d e
 R1  R3  f 
 g h i   a b c 

b) ERO : Multiply row 2 by 5, which can be read as


R2 becomes 5 X R2

a b c a b c 
d e 5d 5e 5 f 
f  
 R2  5R2
 g h i   g h i 

24
Echelon form
A matrix satisfying the following conditions is said to be in reduced row-
echelon form:

1. If a row does not consist entirely of zeros, then the first nonzero number
in the row is a 1, which is called a leading 1.
2. If there are any rows that consist entirely of zeros, then they are grouped
together at the bottom of the matrix.
3. In any two successive rows that do not consist entirely of zeros, the
leading 1 in the lower row occurs farther to the right than the leading 1
in the higher row.
4. Each column that contains a leading 1 has zeros elsewhere

25
Example
i. The following matrices are in reduced row-echelon form:
ii.
0 1 2 0 1
 1 0 0 4  1 0 0 
 0 1 0 7  ,  0 1 0  , 0 0 0 1 3 0 0
    0 ,  
0 0 0 0   0 0 
0 0 1  1 0 0 1  
iii. 0 0 0 0 0

26
How is about these…?

1 4 3 7 1 1 0 0 1 2 6 0 
0 1 6 2  , 0 1 0  , 0 0 1  1 0 
     
0 0 1 5 0 0 0 0 0 0 0 1

27
Using EROs
3 2 8  3 2 8 
6 11 2  R2  R2  2 R1 0 7 14
   

3 2 8 

1
R2 R2 0 1 2
7  

 3 0 12 
R1  R1  2 R2 0 1 2
 

1 0 4 

1
R1 R1 0 1 2
3  

28
contd
 3 2 1 4  1 1 1 3 
1 1 1 3   3 2 1 4 
  R1  R2  
 2 2 1 1   2 2 1 1 

1 1 1 3 
 0 1 4 5
R2  R2  3R1  
 2 2 1 1 

1 1 1 3 
0 1 4 5
R3  R3  2 R1  
0 4 1 5

29
contd
1 0 3 2 
0 1 4 5
R1  R1  R2  
0 4 1 5

1 0 3 2 
0 1 4 5
R3  R3  4 R2  
0 0 15 15 

1 0 3 2
0 1 4 5 
 
1
R2  R2 , R3 R3  
15 0 0 1 1 

30
contd
BACS 1253 Mathematics for computer science 1(linear algebra)
Faculty of Information and Communications & Technology
________________________________________________________________________________________________________________

1 0 0 1 
0 1 4 5
R1  R1  3R3  
0 0 1 1 

1 0 0 1
0 1 0 1
R2  R2  4 R3  
0 0 1 1

31

You might also like