CSNB 143 Discrete Mathematical Structures

Slides:



Advertisements
Similar presentations
CSNB143 – Discrete Structure
Advertisements

Chapter Matrices Matrix Arithmetic
Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each.
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
Matrices MSU CSE 260.
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
3.8 Matrices.
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
8.4 Matrix Operations Day 1 Thurs May 7 Do Now Solve X – 2y = -6 3x + 4y = 7.
ECON 1150 Matrix Operations Special Matrices
CS 250, Discrete Structures, Fall 2011 Nitesh Saxena
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
Lecture 7 Matrices CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
Matrices Section 2.6. Section Summary Definition of a Matrix Matrix Arithmetic Transposes and Powers of Arithmetic Zero-One matrices.
Matrices: Basic Operations and Their Properties
CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Matrices and Determinants
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
CS 285- Discrete Mathematics Lecture 11. Section 3.8 Matrices Introduction Matrix Arithmetic Transposes and Power of Matrices Zero – One Matrices Boolean.
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
Linear Algebra by Dr. Shorouk Ossama.
Matrices Introduction.
MTH108 Business Math I Lecture 20.
CSE15 Discrete Mathematics 03/01/17
MATH 1046 Introduction to Matrices (Sections 3.1 and 3.2)
CSE 504 Discrete Mathematics & Foundations of Computer Science
3.8 Matrices L Al-zaid Math1101.
4.5 Matrices.
Matrices and Matrix Operations
Properties and Applications of Matrices
nhaa/imk/sem /eqt101/rk12/32
MATRICES.
Matrices.
College Algebra Chapter 6 Matrices and Determinants and Applications
Discrete Structures – CNS2300
Applied Discrete Mathematics Week 5: Mathematical Reasoning
1.5 Matricies.
4.6 Matrices.
MATHEMATICS Matrix Multiplication
L6 matrix operations.
Matrix Multiplication
L5 matrix.
Rosen 5th ed., §2.7 ~18 slides, ~1 lecture
Applied Discrete Mathematics Week 10: Equivalence Relations
Sequences and Summations
Everything you would want to know about the matrix and then some…
Section 2.4 Matrices.
Matrices Introduction.
CS100: Discrete structures
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc.
Matrix Algebra.
Properties of Relations
[MATRICES ].
Multiplication of Matrices
Section 9.4 Matrix Operations
Discrete Mathematics and its Applications
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
Rosen 5th ed., §2.7 ~18 slides, ~1 lecture
Matrix Operations Ms. Olifer.
[MATRICES ].
3.8 Matrices L Al-zaid Math1101.
Applied Discrete Mathematics Week 4: Functions
Matrices and Determinants
Presentation transcript:

CSNB 143 Discrete Mathematical Structures Chapter 4 – Matrix

Matrix Students 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.

Matrix An array of numbers arranged in m horizontal rows and n vertical columns: A = a11 a12 a13 ……. a1n a21 a22 a23 …….. a2n … … … ………… am1 am2 am3 …… amn The ith row of A is [ai1, ai2, ai3, …ain]; 1  i  m The jth column of A is a1j a2j ; 1  j  n a3j amj

We say that A is a matrix m x n 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].

Ex 2: A = 8 0 0 0 0 3 0 0 0 0 7 0 0 0 0 1 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.

Two 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 5 3 B = 1 5 x 2 7 -1 y 7 -1 3 b 0 3 4 0 So, if A = B, then a = 1, x = 3, y = 2, b = 4.

Matrix summation If A = [aij] and B = [bij] are m x n matrices, then the sum of A and B is matrix C = [cij], defined by cij = aij + bij; 1  i  m, 1  j  n. C is obtained by adding the corresponding elements of A and B.

A = 1 5 3 B = 2 0 3 2 7 -1 6 1 3 3 4 0 -3 1 9 C = 3 5 6 8 8 4 0 5 9 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).

Exercise 1: a) Identify which matrices that the summation process can be done. b) Compute C + G, A + D, E + H, A + F. A = 2 1 B = 2 1 3 C = 7 2 4 8 4 5 7 4 2 1 5

D = 3 3 E = 2 -3 7 F = -2 -1 2 5 0 4 7 -4 -8 3 1 2 G = 4 3 H = 1 2 3 5 1 4 5 6 -1 0 7 8 9

A 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 Product If 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 by cij = ai1b1j + ai2b2j + … + aipbpj; 1  i  n, 1  j  m That 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.

Ex 5: A = 2 3 -4 B = 3 1 1 2 3 -2 2 2 x 3 5 -3 3 x 2 AB = 2(3) + 3(-2) + -4(5) 2(1) + 3(2) + -4(-3) 1(3) + 2(-2) + 3(5) 1(1) + 2(2) + 3(-3)

= 6 – 6 – 20 2 + 6 + 12 3 – 4 + 15 1 + 4 – 9 = -20 20 14 -4 2 x 2

Exercise 2: Identify which matrices that the product process can be done. List all pairs. Compute CA, AD, EG, BE, HE.

If 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  m @ 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.

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 2 2 1 3 1 9 5 3 1 2 1 8 6 2 3 3 3 15 11 3 3 2 3 12 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: 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Theorems involved are: A(BC) = (AB)C. A(B + C) = AB + AC. (A + B)C = AC + BC. IA = AI = A.

Transposition Matrix If A = [aij] is an m x n matrix, then AT = [aij]T is a n x m matrix, where aijT = aji; 1  i  m, 1  j  n   It is called transposition matrix for A. Ex 8: A = 2 -3 5 AT = 2 6 6 1 3 -3 1 5 3 Theorems involved are: (AT)T = A (A + B)T = AT + BT (AB)T = BTAT

Matrix 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 = 1 2 -3 B = 1 2 -3 2 4 5 2 4 0 -3 5 6 3 2 1 Symmetric Not Symmetric, why?

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 by Given 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], where cij = 1 if aij = 1 OR bij = 1 0 if aij = 0 AND bij = 0 Meet Meet for A and B, both with the same dimension, written as A  B, will produce matrix D = [dij] where dij = 1 if aij = 1 AND bij = 1 0 if aij = 0 OR bij = 0

MATRIX Ex 10: A = 1 0 1 B = 1 1 0 0 1 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0   A  B = 1 1 1 A  B = 1 0 0 0 1 1 0 0 1 1 1 0 0 1 0

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 that It is using the same way as normal matrix product.

MATRIX Ex 11: A = 1 0 0 0 B = 1 1 0 0 1 1 0 0 1 0 1 0 1 1 1 1 0 3 x 4 0 0 1 4 x 3 A ⊙ B = 1 + 0 + 0 + 0 1 + 0 + 0 + 0 0 + 0 + 0 + 0 0 + 0 + 1 + 0 0 + 1 + 1 + 0 0 + 0 + 0 + 0 1 + 0 + 1 + 0 1 + 0 + 1 + 0 0 + 0 + 0 + 1   A ⊙ B = 1 1 0 1 1 0 1 1 1 3 x 3

MATRIX A  B A  B A ⊙ B A  C A  C A ⊙ C B  C B  C B ⊙ C Exercise 3: A = 1 0 0 0 B = 0 1 0 0 C = 0 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1 0 Find: A  B A  B A ⊙ B A  C A  C A ⊙ C B  C B  C B ⊙ C