Integers and matrices (slides)

30
FUNDAMENTALS

Transcript of Integers and matrices (slides)

FUNDAMENTALS

Properties of IntegersTheorem: If ๐‘›๐‘› and ๐‘š๐‘š are integers and ๐‘›๐‘› > 0, we can uniquely write ๐‘š๐‘š = ๐‘ž๐‘ž โ‹… ๐‘›๐‘› + ๐‘Ÿ๐‘Ÿ for integers ๐‘ž๐‘ž and ๐‘Ÿ๐‘Ÿ with 0 โ‰ค ๐‘Ÿ๐‘Ÿ < ๐‘›๐‘›.

๐‘Ÿ๐‘Ÿ = ๐‘š๐‘š mod ๐‘›๐‘›

Example:

๐‘›๐‘› = 3, ๐‘š๐‘š = 16: 16 = 5 โ‹… 3 + 1

๐‘›๐‘› = 10, ๐‘š๐‘š = 3: 3 = 0 โ‹… 10 + 3

๐‘›๐‘› = 5, ๐‘š๐‘š = โˆ’11: โˆ’11 = (โˆ’3) โ‹… 5 + 4

๐‘›๐‘› = 5, ๐‘š๐‘š = 10: 10 = 2 โ‹… 5 + 02ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Properties of Integers If ๐‘Ÿ๐‘Ÿ = 0, then ๐‘š๐‘š = ๐‘ž๐‘ž โ‹… ๐‘›๐‘›, i.e., ๐‘š๐‘š is a multiple of ๐‘›๐‘›. We

write ๐‘›๐‘›|๐‘š๐‘š.

If ๐‘Ÿ๐‘Ÿ โ‰  0, then ๐‘š๐‘š is not a multiple of ๐‘›๐‘›. We write ๐‘›๐‘› โˆค ๐‘š๐‘š.

Theorem:

If ๐‘Ž๐‘Ž|๐‘๐‘ and ๐‘Ž๐‘Ž|๐‘๐‘, then ๐‘Ž๐‘Ž|(๐‘๐‘ + ๐‘๐‘).

If ๐‘Ž๐‘Ž|๐‘๐‘ and ๐‘Ž๐‘Ž|๐‘๐‘, then ๐‘Ž๐‘Ž|(๐‘๐‘ โˆ’ ๐‘๐‘).

If ๐‘Ž๐‘Ž|๐‘๐‘ and ๐‘Ž๐‘Ž|๐‘๐‘, then ๐‘Ž๐‘Ž|(๐‘๐‘๐‘๐‘).

If ๐‘Ž๐‘Ž|๐‘๐‘ and ๐‘๐‘|๐‘๐‘, then ๐‘Ž๐‘Ž|๐‘๐‘.

3ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Prime NumbersDefinition: A positive integer ๐‘๐‘ > 1 is called prime, if the only positive integers that divide ๐‘๐‘ are ๐‘๐‘ and 1.

Example: 2, 3, 5, 7, 11, 13, โ€ฆ are prime.

4ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Is 1 prime?

Prime NumbersAlgorithm for determining if an integer ๐‘›๐‘› > 1 is prime:

Step 1: Check if ๐‘›๐‘› is 2. if so, ๐‘›๐‘› is prime. If not, proceed to

Step 2: Check if 2|๐‘›๐‘›. if so, ๐‘›๐‘› isnโ€™t prime. If not, proceed to

Step 3: Compute the largest integer ๐‘˜๐‘˜ โ‰ค ๐‘›๐‘›; proceed to

Step 4: Check if ๐‘‘๐‘‘|๐‘›๐‘› where ๐‘‘๐‘‘ is any odd number in (1, ๐‘˜๐‘˜]. If ๐‘‘๐‘‘|๐‘›๐‘›, then ๐‘›๐‘› isnโ€™t prime; otherwise it is prime.

5ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Prime FactorizationTheorem: Every positive integer ๐‘›๐‘› > 1 can be written uniquely as

๐‘›๐‘› = ๐‘๐‘1๐‘˜๐‘˜1๐‘๐‘2

๐‘˜๐‘˜2 โ‹ฏ๐‘๐‘๐‘ ๐‘ ๐‘˜๐‘˜๐‘ ๐‘ 

where

๐‘๐‘1 < ๐‘๐‘2 < โ‹ฏ < ๐‘๐‘๐‘ ๐‘  are distinct prime numbers that divide ๐‘›๐‘›,

the ๐‘˜๐‘˜โ€™s are positive integers giving the number of times each prime occurs as a factor of ๐‘›๐‘›.

Example: 9 = 3 โ‹… 3 = 32, 36 =, 100 =

6ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Greatest Common DivisorDefinition:

If ๐‘Ž๐‘Ž, ๐‘๐‘ and ๐‘˜๐‘˜ are in โ„ค+, and ๐‘˜๐‘˜|๐‘Ž๐‘Ž and ๐‘˜๐‘˜|๐‘๐‘, we say that ๐‘˜๐‘˜ is a common divisor of ๐‘Ž๐‘Ž and ๐‘๐‘.

If ๐‘‘๐‘‘ is the largest such ๐‘˜๐‘˜, ๐‘‘๐‘‘ is called the greatest common divisor of ๐‘Ž๐‘Ž and ๐‘๐‘, and we write ๐‘‘๐‘‘ =gcd(๐‘Ž๐‘Ž, ๐‘๐‘).

Example:

the common divisors of 12 and 30: 1, 2, 3, 6.gcd 12,30 = 6

gcd 17,95 = 1 (relatively prime numbers)7ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Euclidean Algorithm Suppose ๐‘Ž๐‘Ž > ๐‘๐‘ > 0. We can write

๐‘Ž๐‘Ž = ๐‘˜๐‘˜๐‘๐‘ + ๐‘Ÿ๐‘Ÿ

where ๐‘˜๐‘˜ โˆˆ โ„ค+ and 0 โ‰ค ๐‘Ÿ๐‘Ÿ < ๐‘๐‘.

If a number ๐‘›๐‘› divides ๐‘Ž๐‘Ž and ๐‘๐‘, then it must divide ๐‘Ÿ๐‘Ÿ, since ๐‘Ÿ๐‘Ÿ = ๐‘Ž๐‘Ž โˆ’ ๐‘˜๐‘˜๐‘๐‘. Thus,

gcd ๐‘Ž๐‘Ž, ๐‘๐‘ = gcd(๐‘๐‘, ๐‘Ž๐‘Ž mod ๐‘๐‘)

8ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Euclidean Algorithmgcd ๐‘Ž๐‘Ž, ๐‘๐‘ = gcd(๐‘๐‘, ๐‘Ž๐‘Ž mod ๐‘๐‘)

divide ๐‘Ž๐‘Ž by ๐‘๐‘: ๐‘Ž๐‘Ž = ๐‘˜๐‘˜1๐‘๐‘ + ๐‘Ÿ๐‘Ÿ1 0 โ‰ค ๐‘Ÿ๐‘Ÿ1 < ๐‘๐‘

divide ๐‘๐‘ by ๐‘Ÿ๐‘Ÿ1: ๐‘๐‘ = ๐‘˜๐‘˜2๐‘Ÿ๐‘Ÿ1 + ๐‘Ÿ๐‘Ÿ2 0 โ‰ค ๐‘Ÿ๐‘Ÿ2 < ๐‘Ÿ๐‘Ÿ1

divide ๐‘Ÿ๐‘Ÿ1 by ๐‘Ÿ๐‘Ÿ2: ๐‘Ÿ๐‘Ÿ1 = ๐‘˜๐‘˜3๐‘Ÿ๐‘Ÿ2 + ๐‘Ÿ๐‘Ÿ3 0 โ‰ค ๐‘Ÿ๐‘Ÿ3 < ๐‘Ÿ๐‘Ÿ2โ€ฆ

divide ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’2 by ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1: ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’2 = ๐‘˜๐‘˜๐‘›๐‘›๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1 + ๐‘Ÿ๐‘Ÿ๐‘›๐‘› 0 โ‰ค ๐‘Ÿ๐‘Ÿ๐‘›๐‘› < ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1

divide ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1 by ๐‘Ÿ๐‘Ÿ๐‘›๐‘›: ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1 = ๐‘˜๐‘˜๐‘›๐‘›+1๐‘Ÿ๐‘Ÿ๐‘›๐‘› + ๐‘Ÿ๐‘Ÿ๐‘›๐‘›+1 0 โ‰ค ๐‘Ÿ๐‘Ÿ๐‘›๐‘›+1 < ๐‘Ÿ๐‘Ÿ๐‘›๐‘›

๐‘Ž๐‘Ž > ๐‘๐‘ > ๐‘Ÿ๐‘Ÿ1 > ๐‘Ÿ๐‘Ÿ2 > ๐‘Ÿ๐‘Ÿ3 > โ‹ฏ9ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Euclidean Algorithmgcd ๐‘Ž๐‘Ž, ๐‘๐‘ = gcd(๐‘๐‘, ๐‘Ž๐‘Ž mod ๐‘๐‘)

๐‘Ž๐‘Ž > ๐‘๐‘ > ๐‘Ÿ๐‘Ÿ1 > ๐‘Ÿ๐‘Ÿ2 > ๐‘Ÿ๐‘Ÿ3 > โ‹ฏ > ๐‘Ÿ๐‘Ÿ๐‘›๐‘›+1 = 0

๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1 = ๐‘˜๐‘˜๐‘›๐‘›+1๐‘Ÿ๐‘Ÿ๐‘›๐‘› : ๐‘Ÿ๐‘Ÿ๐‘›๐‘› ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1, ๐‘Ÿ๐‘Ÿ๐‘›๐‘› ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’2, โ€ฆ , ๐‘Ÿ๐‘Ÿ๐‘›๐‘› ๐‘Ÿ๐‘Ÿ2, ๐‘Ÿ๐‘Ÿ๐‘›๐‘› ๐‘Ÿ๐‘Ÿ1, ๐‘Ÿ๐‘Ÿ๐‘›๐‘›|๐‘๐‘, ๐‘Ÿ๐‘Ÿ๐‘›๐‘›|๐‘Ž๐‘Ž

gcd ๐‘Ž๐‘Ž, ๐‘๐‘ =

gcd ๐‘๐‘, ๐‘Ÿ๐‘Ÿ1 = gcd ๐‘Ÿ๐‘Ÿ1, ๐‘Ÿ๐‘Ÿ2 = โ‹ฏ = gcd ๐‘Ÿ๐‘Ÿ๐‘›๐‘›โˆ’1, ๐‘Ÿ๐‘Ÿ๐‘›๐‘› = ๐‘Ÿ๐‘Ÿ๐‘›๐‘›

Example: Compute gcd(123, 36)

10ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Least Common MultipleDefinition:

If ๐‘Ž๐‘Ž, ๐‘๐‘ and ๐‘˜๐‘˜ are in โ„ค+, and ๐‘Ž๐‘Ž|๐‘˜๐‘˜ and ๐‘๐‘|๐‘˜๐‘˜, we say that ๐‘˜๐‘˜ is a common multiple of ๐‘Ž๐‘Ž and ๐‘๐‘.

If ๐‘๐‘ is the smallest such ๐‘˜๐‘˜, ๐‘๐‘ is called the least common multiple of ๐‘Ž๐‘Ž and ๐‘๐‘, and we write ๐‘๐‘ =lcm(๐‘Ž๐‘Ž, ๐‘๐‘).

Example:

the common multiples of 2 and 3: 6, 12, 18, 24, โ€ฆlcm 2,3 = 6.

11ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Least Common MultipleTheorem: if ๐‘Ž๐‘Ž, ๐‘๐‘ โˆˆ โ„ค+, then

gcd(๐‘Ž๐‘Ž, ๐‘๐‘) โ‹… lcm ๐‘Ž๐‘Ž, ๐‘๐‘ = ๐‘Ž๐‘Ž โ‹… ๐‘๐‘.

Proof: Use prime factorizations of ๐‘Ž๐‘Ž and ๐‘๐‘.

Example: Let ๐‘Ž๐‘Ž = 540 and ๐‘๐‘ = 504. Find gcd and lcm.

12ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Exercisesโ€ข Write ๐‘š๐‘š as ๐‘ž๐‘ž๐‘›๐‘› + ๐‘Ÿ๐‘Ÿ, with 0 โ‰ค ๐‘Ÿ๐‘Ÿ < ๐‘›๐‘›:

1. ๐‘š๐‘š = 20,๐‘›๐‘› = 32. ๐‘š๐‘š = 64,๐‘›๐‘› = 373. ๐‘š๐‘š = 3, ๐‘›๐‘› = 12

โ€ข Write each integer as a product of powers of primes:828, 1666, 1781

โ€ข Find the gcd(๐‘Ž๐‘Ž, ๐‘๐‘) and lcm(๐‘Ž๐‘Ž, ๐‘๐‘):

1. ๐‘Ž๐‘Ž = 60, ๐‘๐‘ = 1002. ๐‘Ž๐‘Ž = 77, ๐‘๐‘ = 128

13ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Representation of Integers (Reading)โ€ข 3245 means the sum of 3 times 103, 2 times 102, 4

times 10 and 5:

3245 = 3 โ‹… 103 + 2 โ‹… 102 + 4 โ‹… 10 + 5 โ‹… 100

โ€ข The base 10 expansion or decimal expansion of 3245

โ€ข 10 is called the base of the expansion.

Example:

56893 =

14ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Representation of Integers (Reading)Theorem: if ๐‘๐‘ โˆˆ โ„ค+, then every positive integer ๐‘›๐‘› can be uniquely expressed in the form

๐‘›๐‘› = ๐‘‘๐‘‘๐‘˜๐‘˜ โ‹… ๐‘๐‘๐‘˜๐‘˜ + ๐‘‘๐‘‘๐‘˜๐‘˜โˆ’1 โ‹… ๐‘๐‘๐‘˜๐‘˜โˆ’1 + โ‹ฏ๐‘‘๐‘‘1 โ‹… ๐‘๐‘ + ๐‘‘๐‘‘0

where 0 โ‰ค ๐‘‘๐‘‘๐‘–๐‘– < ๐‘๐‘, ๐‘–๐‘– = 1,2, โ€ฆ , ๐‘˜๐‘˜, and ๐‘‘๐‘‘๐‘˜๐‘˜ โ‰  0.

The sequence ๐‘‘๐‘‘๐‘˜๐‘˜๐‘‘๐‘‘๐‘˜๐‘˜โˆ’1 โ‹ฏ๐‘‘๐‘‘1๐‘‘๐‘‘0 (more explicitly, ๐‘‘๐‘‘๐‘˜๐‘˜๐‘‘๐‘‘๐‘˜๐‘˜โˆ’1 โ‹ฏ๐‘‘๐‘‘1๐‘‘๐‘‘0 ๐‘๐‘) is called the base ๐‘๐‘ expansion of ๐‘›๐‘›.

Example: Find the base 2, 3, 4 representations of 173.

Example: Find the decimal expansion of 100111 2.15ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: A matrix is a rectangular array of numbers in ๐‘š๐‘š horizontal rows and ๐‘›๐‘› vertical columns:

๐€๐€ =

๐‘Ž๐‘Ž11 ๐‘Ž๐‘Ž12๐‘Ž๐‘Ž21 ๐‘Ž๐‘Ž22 โ‹ฏ

๐‘Ž๐‘Ž1๐‘›๐‘›๐‘Ž๐‘Ž2๐‘›๐‘›

โ‹ฎ โ‹ฎ๐‘Ž๐‘Ž๐‘š๐‘š1 ๐‘Ž๐‘Ž๐‘š๐‘š2 โ‹ฏ ๐‘Ž๐‘Ž๐‘š๐‘š๐‘›๐‘›

Definition: The ๐‘–๐‘–th row of ๐€๐€ is [๐‘Ž๐‘Ž๐‘–๐‘–1 ๐‘Ž๐‘Ž๐‘–๐‘–2 โ‹ฏ๐‘Ž๐‘Ž๐‘–๐‘–๐‘›๐‘›], 1 โ‰ค ๐‘–๐‘– โ‰ค ๐‘š๐‘š,

and the ๐‘—๐‘—th column of ๐€๐€ is

๐‘Ž๐‘Ž1๐‘—๐‘—๐‘Ž๐‘Ž2๐‘—๐‘—โ‹ฎ๐‘Ž๐‘Ž๐‘›๐‘›๐‘—๐‘—

, 1 โ‰ค ๐‘—๐‘— โ‰ค ๐‘›๐‘›.

16ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: We say that ๐€๐€ is ๐‘š๐‘š by ๐‘›๐‘›, written ๐‘š๐‘š ร— ๐‘›๐‘›. If ๐‘š๐‘š = ๐‘›๐‘›, we say ๐€๐€ is a square matrix of order ๐‘›๐‘›. The elements ๐‘Ž๐‘Ž11,๐‘Ž๐‘Ž22, โ€ฆ , ๐‘Ž๐‘Ž๐‘›๐‘›๐‘›๐‘› form main diagonal of ๐€๐€.

Definition: We refer to the element ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— in the ๐‘–๐‘–th row and ๐‘—๐‘—th column of ๐€๐€ as the (๐‘–๐‘–, ๐‘—๐‘—) entry of ๐€๐€. We denote the matrix ๐€๐€ by [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—], for short.

Example:

๐€๐€ = 2 3 50 โˆ’1 2 ,๐๐ = 2 6

3 6 ,๐‚๐‚ = 1 0 0 ,๐ƒ๐ƒ =111

17ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: A square matrix ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] is called a diagonal matrix if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = 0 for all ๐‘–๐‘– โ‰  ๐‘—๐‘—.

Example:

๐…๐… = 2 00 6 ,๐†๐† =

1 0 00 3 00 0 โˆ’3

,๐‡๐‡ =0 0 00 3 00 0 0

Definition: A ๐‘š๐‘š ร— ๐‘›๐‘› matrix ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] is called zero matrix, denoted by ๐ŸŽ๐ŸŽ, if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = 0 for all 1 โ‰ค ๐‘–๐‘– โ‰ค ๐‘š๐‘š, 1 โ‰ค ๐‘—๐‘— โ‰ค ๐‘›๐‘›.

18ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: Two ๐‘š๐‘š ร— ๐‘›๐‘› matrices ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] and ๐๐ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—]are said to be equal if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = ๐‘๐‘๐‘–๐‘–๐‘—๐‘— for all ๐‘–๐‘– and ๐‘—๐‘—.

Definition: If ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] and ๐๐ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] are ๐‘š๐‘š ร— ๐‘›๐‘› matrices, then the sum of ๐€๐€ and ๐๐, denoted by ๐€๐€ + ๐๐, is the matrix ๐‚๐‚ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] defined by ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— + ๐‘๐‘๐‘–๐‘–๐‘—๐‘— for all 1 โ‰ค ๐‘–๐‘– โ‰ค ๐‘š๐‘š, 1 โ‰ค ๐‘—๐‘— โ‰ค ๐‘›๐‘›.

Example: Find ๐€๐€+ ๐๐ if

๐€๐€ =1 0 โˆ’83 3 0โˆ’2 9 โˆ’3

, ๐๐ =4 5 30 โˆ’3 25 0 โˆ’2

19ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesTheorem:

๐€๐€ + ๐๐ = ๐๐ + ๐€๐€

๐€๐€ + ๐๐ + ๐‚๐‚ = ๐€๐€ + (๐๐ + ๐‚๐‚)

๐€๐€ + ๐ŸŽ๐ŸŽ = ๐ŸŽ๐ŸŽ + ๐€๐€ = ๐€๐€

20ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: If ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] is ๐‘š๐‘š ร— ๐‘๐‘ matrix and ๐๐ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] are ๐‘๐‘ ร— ๐‘›๐‘› matrix, then the product of ๐€๐€ and ๐๐, denotes by ๐€๐€๐๐ is the ๐‘š๐‘š ร— ๐‘›๐‘› matrix ๐‚๐‚ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] defined by

๐‘๐‘๐‘–๐‘–๐‘—๐‘— = ๐‘Ž๐‘Ž๐‘–๐‘–1๐‘๐‘1๐‘—๐‘— + ๐‘Ž๐‘Ž๐‘–๐‘–2๐‘๐‘2๐‘—๐‘— + โ‹ฏ๐‘Ž๐‘Ž๐‘–๐‘–๐‘๐‘๐‘๐‘๐‘๐‘๐‘—๐‘—

for all 1 โ‰ค ๐‘–๐‘– โ‰ค ๐‘š๐‘š, 1 โ‰ค ๐‘—๐‘— โ‰ค ๐‘›๐‘›.

Example: Find ๐€๐€๐๐ if

๐€๐€ =1 0 โˆ’83 3 0โˆ’2 9 โˆ’3

, ๐๐ =4 5 30 โˆ’3 25 0 โˆ’2

21ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesTheorem:

๐€๐€(๐๐๐‚๐‚) = ๐€๐€๐๐ ๐‚๐‚

๐€๐€ ๐๐ + ๐‚๐‚ = ๐€๐€๐๐ + ๐€๐€๐‚๐‚

๐€๐€ + ๐๐ ๐‚๐‚ = ๐€๐€๐‚๐‚ + ๐๐๐‚๐‚

22ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: A ๐‘›๐‘› ร— ๐‘›๐‘› diagonal matrix:

๐ˆ๐ˆ๐‘›๐‘› =

1 00 1 โ‹ฏ 0

0โ‹ฎ โ‹ฎ

0 0 โ‹ฏ 1is called the identity matrix of order ๐‘›๐‘›.

Theorem: For any ๐‘›๐‘› ร— ๐‘›๐‘› matrix ๐€๐€ and positive integer ๐‘๐‘,

๐ˆ๐ˆ๐‘›๐‘›๐€๐€ = ๐€๐€๐ˆ๐ˆ๐‘›๐‘› = ๐€๐€

๐€๐€๐‘๐‘ = ๐€๐€ โ‹… ๐€๐€ โ‹… โ‹ฏ โ‹… ๐€๐€๐‘๐‘

, ๐€๐€0 = ๐ˆ๐ˆ๐‘›๐‘›.

23ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesDefinition: If ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] is ๐‘š๐‘š ร— ๐‘›๐‘› matrix, then the ๐‘›๐‘› ร— ๐‘š๐‘šmatrix ๐€๐€๐‘‡๐‘‡ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—๐‘‡๐‘‡ ], where ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—๐‘‡๐‘‡ = ๐‘Ž๐‘Ž๐‘—๐‘—๐‘–๐‘–, for all 1 โ‰ค ๐‘–๐‘– โ‰ค ๐‘š๐‘š, 1 โ‰ค ๐‘—๐‘— โ‰ค ๐‘›๐‘›, is called the transpose of ๐€๐€.

Example: Find ๐€๐€๐‘‡๐‘‡ and ๐๐๐‘‡๐‘‡ if

๐€๐€ =1 0 โˆ’83 3 0โˆ’2 9 โˆ’3

, ๐๐ = 2 โˆ’3 56 1 3

24ยฉ S. Turaev, CSC 1700 Discrete Mathematics

MatricesTheorem:

๐€๐€๐‘‡๐‘‡ ๐‘‡๐‘‡ = ๐€๐€

๐€๐€ + ๐๐ ๐‘‡๐‘‡ = ๐€๐€๐‘‡๐‘‡ + ๐๐๐‘‡๐‘‡

๐€๐€๐๐ ๐‘‡๐‘‡ = ๐๐๐‘‡๐‘‡๐€๐€๐‘‡๐‘‡

Definition: A matrix ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] is called symmetric if ๐‘จ๐‘จ๐‘‡๐‘‡=๐€๐€.

Definition: if ๐€๐€ and ๐๐ are ๐‘›๐‘› ร— ๐‘›๐‘› matrices, we say ๐๐ is the inverse of ๐€๐€ if ๐€๐€๐๐ = ๐ˆ๐ˆ๐‘›๐‘›.

25ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Boolean Matrix OperationsDefinition: A Boolean matrix is ๐‘š๐‘š ร— ๐‘›๐‘› matrix whose entries are either zero or one.

Definition: Let ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] and ๐๐ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] be ๐‘š๐‘š ร— ๐‘›๐‘› Boolean matrices. We define ๐€๐€ โˆจ ๐๐ = ๐‚๐‚ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—], the join of ๐€๐€ and ๐๐, by

๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 1 if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = 1 or ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 1, ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 0 if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 0,

and the meet of ๐€๐€ and ๐๐, by

๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 1 if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 1, ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 0 if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = 0 or ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 0.

26ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Boolean Matrix OperationsExample: Compute ๐€๐€ โˆจ ๐๐ and ๐€๐€ โˆง ๐๐ if

๐€๐€ =1 0 10 1 11 1 00 0 0

, ๐๐ =1 1 01 0 10 0 11 1 0

27ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Boolean Matrix OperationsDefinition: Let ๐€๐€ = [๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘—] be an ๐‘š๐‘š ร— ๐‘๐‘ Boolean matrix and ๐๐ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] be a ๐‘๐‘ ร— ๐‘›๐‘› Boolean matrix. The Boolean product of ๐€๐€ and ๐๐, denoted by ๐€๐€โŠ™๐๐, is the ๐‘š๐‘š ร— ๐‘›๐‘›matrix ๐‚๐‚ = [๐‘๐‘๐‘–๐‘–๐‘—๐‘—] defined by

๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 1 if ๐‘Ž๐‘Ž๐‘–๐‘–๐‘—๐‘— = 1 and ๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 1, for some 1 โ‰ค ๐‘˜๐‘˜ โ‰ค ๐‘๐‘,

๐‘๐‘๐‘–๐‘–๐‘—๐‘— = 0 otherwise.

28ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Boolean Matrix OperationsExample: Compute ๐€๐€โŠ™๐๐ if

๐€๐€ =1 0 10 1 11 1 0

, ๐๐ =1 1 01 0 10 0 1

29ยฉ S. Turaev, CSC 1700 Discrete Mathematics

Boolean Matrix OperationsTheorem:

๐€๐€ โˆจ ๐๐ = ๐๐ โˆจ ๐€๐€

๐€๐€ โˆง ๐๐ = ๐๐ โˆง ๐€๐€

๐€๐€ โˆจ ๐๐ โˆจ ๐‚๐‚ = ๐€๐€ โˆจ (๐๐ โˆจ ๐‚๐‚)

๐€๐€ โˆง ๐๐ โˆง ๐‚๐‚ = ๐€๐€ โˆง (๐๐ โˆง ๐‚๐‚)

๐€๐€ โˆง ๐๐ โˆจ ๐‚๐‚ = ๐€๐€ โˆง ๐๐ โˆจ ๐€๐€ โˆง ๐‚๐‚

๐€๐€ โˆจ ๐๐ โˆง ๐‚๐‚ = ๐€๐€ โˆจ ๐๐ โˆง (๐€๐€ โˆจ ๐‚๐‚)

๐€๐€โŠ™๐๐ โŠ™ ๐‚๐‚ = ๐€๐€โŠ™ (๐๐โŠ™ ๐‚๐‚)30ยฉ S. Turaev, CSC 1700 Discrete Mathematics