2 MATRIXLearning OutcomesStudents should be able to read matrix and its entries without difficulties.Students should understand all matrices operations.Students should be able to differentiate different matrices and operations by different matrix.Students should be able to identify Boolean matrices and how to operate them.
3 MATRIXIntroductionAn array of numbers arranged in m horizontal rows and n vertical columns:Ex 1:A = a11 a12 ……. a1na21 a22 ……. a2nam1 am2 ……. amnThe ith row of A is [ai1, ai2, ai3, …ain]; 1 i mThe jth column of A is a1ja2j ; 1 j na3j..amj
4 MATRIX Diagonal matrix We say that A is a matrix m x n. If m = n, then A is a square matrix of order n, and a11, a22, a33, ..ann form the main diagonal of A.aij which is in the ith row and jth column, is said to be the i, jth element of A or the (i, j) entry of A, often written as A = [aij].A square matrix A = [aij], for which every entry off the main diagonal is zero, that is aij = 0 for i j, is called a diagonal matrix.Ex 2:A =
5 MATRIXTwo m x n matrices A and B, A = [aij] and B = [bij], are said to be equal if aij = bij for 1 i m, 1 j n; that is, if corresponding elements are the same.Ex 3:A = a B = xy3 bSo, if A = B, then a = 1, x = 3, y = 2, b = 4.
6 MATRIX Matrices Summation If A = [aij] and B = [bij] are m x n matrices, then the sum of A and B is matrix C = [cij], defined bycij = aij + bij; 1 i m, 1 j n.C is obtained by adding the corresponding elements of A and B.Ex 4:A = B = C ==The sum of the matrices A and B is defined only when A and B have the same number of rows and the same number of columns (same dimension).
7 MATRIXExercise 1:a) Identify which matrices that the summation process can be done.b) Compute C + G, A + D, E + H, A + F.A = B = C = D =1 5E = F = G = H =
8 MATRIXA matrix in when all of its entries are zero is called zero matrix, denoted by 0.Theorems involved in summation :A + B = B + A.(A + B) + C = A + (B + C).A + 0 = 0 + A = A.Matrices ProductIf A = [aij] is an m x p matrix and B = [bij] is a p x n matrix, then the product of A and B, denoted AB, will produce the m x n matrix C = [cij], defined bycij = ai1b1j + ai2b2j + … + aipbpj; 1 i n, 1 j mThat is, elements ai1, ai2, .. aip from ith row of A and elements b1j, b2j, .. bpj from jth column of B, are multiplied for each corresponding entries and add all the products.
9 MATRIXEx 5:A = B =2 x3 x 2AB = 2(3) + 3(-2) (5) 2(1) + 3(2) + -4(-3)1(3) + 2(-2) (5) 1(1) + 2(2) + 3(-3)= 6 – 6 –3 – – 9=x 2Exercise 2:a) Identify which matrices that the product process can be done. List all pairs.b) Compute CA, AD, EG, BE, HE.
10 MATRIXIf A is an m x p matrix and B is a p x n matrix, in which AB will produce m x n, BA might be produce or not depends on:n m, then BA cannot be produced.n = m, p n, then we can get BA but the size will be different from AB.n = m= p, A B, then we can get BA, the size of BA and AB is the same, but AB BA.n = m = p, A = B, then we can get BA, the size of BA and AB is the same, and AB = BA.
11 A B AB B A BA (m x p) (p x n) (m x n) (p x n) (m x p) A B AB B A BA (m x p) (p x n) (m x n) (p x n) (m x p) ? 2 x 3 3 x 4 2 x 4 3 x 4 2 x 3 X 2 x 3 3 x 2 2 x 2 3 X 2 2 X 3 3 X 3 2 X 2 2 X 2 2 X 2 2 X 2 2 X 2 2 X
12 MATRIX Identity matrix Let say A is a diagonal matrix n x n. If all entries on its diagonal are 1, it is called identity matrix, ordered n, written as I.Ex 7:Theorems involved are:A(BC) = (AB)C.A(B + C) = AB + AC.(A + B)C = AC + BC.IA = AI = A.
13 MATRIX Transposition Matrix If A = [aij] is an m x n matrix, then AT = [aij]T is a n x m matrix, whereaijT = aji; 1 i m, 1 j nIt is called transposition matrix for A.Ex 8:A = AT =5 3Theorems involved are:(AT)T = A(A + B)T = AT + BT(AB)T = BTAT
14 MATRIXMatrix A = [aij] is said to be symmetric if AT = A, that is aij = aji,A is said to be symmetric if all entries are symmetrical to its main diagonal.Ex 9:A = B =Symmetric Not Symmetric, why?
15 MATRIX Boolean Matrix and Its Operations Boolean matrix is an m x n matrix where all of its entries are either 1 or 0 only.There are three operations on Boolean:Join byGiven A = [aij] and B = [bij] are Boolean matrices with the same dimension, join by A and B, written as A B, will produce a matrix C = [cij], wherecij = 1 if aij = 1 OR bij = 10 if aij = 0 AND bij = 0MeetMeet for A and B, both with the same dimension, written as A B, will produce matrix D = [dij] wheredij = 1 if aij = 1 AND bij = 10 if aij = 0 OR bij = 0
17 MATRIX Boolean product If A = [aij] is an m x p Boolean matrix, and B = [bij] is a p x n Boolean matrix, we can get a Boolean product for A and B written as A ⊙ B, producing C, where:cij = 1 if aik = 1 AND bkj = 1; 1 k p.0 other than thatIt is using the same way as normal matrix product.