CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand...

21
CSNB143 – Discrete Structure Topic 3 – Matrices

Transcript of CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand...

Page 1: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

CSNB143 – Discrete Structure

Topic 3 – Matrices

Page 2: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesLearning Outcomes• Students should understand all matrices operations. • Students should be able to differentiate different type of matrices and

operations by different matrix. • Students should be able to identify Boolean matrices and how to operate

them.

Page 3: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – Matrices

An array of numbers arranged in m horizontal rows and n vertical columns.We say that A is a matrix m x n. (Dimension of matrix).

Page 4: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesSquare Matrix

Number of rows = number of columns

Which one(s)of the following is(are) square matrix(ces)?

Where is the main diagonal?

Page 5: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesDiagonal Matrix

“a square matrix in which entries outside the main diagonal area are all zero, the diagonal entries may or may not be zero”

Page 6: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesEqual Matrix• Matrices are equal if the corresponding elements are equal• Example:

A and B are equal matrices, find the values of a, b, x and y

Page 7: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesEqual Matrices - Work this out

1. If

2. If

Find a, b, c, and d

Find a, b, c, k, m, x, y, and z

Page 8: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesMatrices Summation• 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)

Page 9: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesMatrices Summation – work this out

a) Identify the pair of which matrices between which the summation process can be executed

b) Compute C + G, A + D, E + H, A + F.

Page 10: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesMatrices Products

Steps before1.Find out if it is possible to get the products?2.Find out the result’s dimension3.Arrange the numbers in an easy way to compute – avoid confusion

Page 11: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesMatrices Products – Possible outcomes

Page 12: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesMatrices Products – Work this out

Let

Show that AB is NOT BA

Page 13: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesTransposition MatrixA matrix which is formed by turning all the rows of a given matrix intocolumns and vice-versa. The transpose of matrix A is written AT.

Page 14: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesTransposition Matrix – Work this out

Compute (BA)T :

Compute AT (D + F)

Page 15: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesSymmetrical MatrixA is said to be symmetric if all entries are symmetrical to its main diagonal.

Page 16: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesBoolean 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– Meet– Boolean Product

Page 17: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesBoolean Matrix and Its Operations – 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

Page 18: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesBoolean Matrix and Its Operations – 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

Page 19: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesBoolean Matrix and Its Operations – Boolean Products• 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:

Page 20: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – Matrices

Page 21: CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.

Topic 3 – MatricesBoolean Matrices – work this out