• No results found

Matrix Oddities

In document Applied Discrete Structures (Page 111-117)

5.4.1 Dissimilarities with elementary algebra

We have seen that matrix algebra is similar in many ways to elementary alge- bra. Indeed, if we want to solve the matrix equationAX=Bfor the unknown X, we imitate the procedure used in elementary algebra for solving the equa- tionax = b. One assumption we need is that A is a square matrix that has an inverse. Notice how exactly the same properties are used in the following detailed solutions of both equations.

CHAPTER 5. INTRODUCTION TO MATRIX ALGEBRA 98 Table 5.4.1

Equation in the algebra of real numbers Equation in matrix algebra

ax=b AX=B a−1(ax) =a1bifa̸= 0 A1(AX) =A1B ifA1 exists ( a−1a)x=a1b Associative Property (A1A)X =A1B 1x=a−1b Inverse Property IX=A1B x=a−1b Identity Property X=A1B Certainly the solution process for solving AX =B is the same as that of

solvingax=b.

The solution of xa = b is x = ba−1 = a−1b. In fact, we usually write the solution of both equations as x = ab. In matrix algebra, the solution of XA=BisX =BA−1, which is not necessarily equal toA−1B. So in matrix algebra, since the commutative law (under multiplication) is not true, we have to be more careful in the methods we use to solve equations.

It is clear from the above that if we wrote the solution of AX = B as X = B

A, we would not know how to interpret B

A. Does it mean A− 1B or BA−1? Because of this,A1 is never written as I

A.

Observation 5.4.2 Matrix Oddities. Some of the main dissimilarities between matrix algebra and elementary algebra are that in matrix algebra:

(1) ABmay be different fromBA.

(2) There exist matrices A and B such that AB = 000, and yet A ̸= 000 and = 000.

(3) There exist matricesAwhere = 000, and yetA2= 000. (4) There exist matricesAwhere A2=Awith=I and= 000

(5) There exist matricesAwhere A2=I, where A̸=Iand A̸=I

5.4.2 Exercises

1. Discuss each of the “Matrix Oddities” with respect to elementary algebra. 2. Determine2×2matrices which show that each of the “Matrix Oddities”

are true.

3. Prove or disprove the following implications. (a) A2=Aand detA̸= 0A=I

(b) A2=I and detA̸= 0A=I orA=I.

4. LetMn×n(R)be the set of realn×nmatrices. LetP ⊆Mn×n(R)be the subset of matrices defined byA∈P if and only ifA2=A. LetQ⊆P be defined byA∈Qif and only if det= 0.

(a) Determine the cardinality ofQ.

(b) Consider the special casen= 2and prove that a sufficient condition for A∈ P ⊆M2×2(R)is that A has a zero determinant (i.e., Ais singular) andtr(A) = 1where tr(A) =a11+a22 is the sum of the main diagonal elements ofA.

(c) Is the condition of part b a necessary condition?

CHAPTER 5. INTRODUCTION TO MATRIX ALGEBRA 99 the systems using matrices.

(a) 2x1+x2= 3 x1−x2= 1 (b) 2x1−x2= 4 x1−x2= 0 (c) 2x1+x2= 1 x1−x2= 1 (d) 2x1+x2= 1 x1−x2=1 (e) 3x1+ 2x2= 1 6x1+ 4x2=1

6. Recall thatp(x) =x25x+ 6is called a polynomial, or more specifically, a polynomial overR, where the coefficients are elements of Rand x∈R. Also, think of the method of solving, and solutions of, x25x+ 6 = 0. We would like to define the analogous situation for2×2 matrices. First define whereAis a2×2matrixp(A) =A25A+ 6I. Discuss the method of solving and the solutions ofA25A+ 6I= 000.

7. For those who know calculus:

(a) Write the series expansion for ea centered arounda= 0.

(b) Use the idea of exercise 6 to write what would be a plausible defin- ition ofeA whereAis ann×nmatrix.

(c) IfA= ( 1 1 0 0 ) andB = ( 0 1 0 0 )

, use the series in part (b)

to show thateA= ( e e−1 0 1 ) andeB = ( 1 1 0 1 ) . (d) Show thateAeB̸=eBeA. (e) Show thateA+B=

( e 0 0 1 ) . (f) IseAeB=eA+B?

Chapter 6

Relations

adjacency matrix

Anadjacency matrix will show Where the edges ’tween vertices go. For a nice simple graph

You can cut through the chaff:

Noughts and ones in symmetrical flow.

psheil, The Omnificent English Dictionary In Limerick Form

One understands a set of objects completely only if the structure of that set is made clear by the interrelationships between its elements. For example, the individuals in a crowd can be compared by height, by age, or through any number of other criteria. In mathematics, such comparisons are called relations. The goal of this chapter is to develop the language, tools, and concepts of relations.

6.1 Basic Definitions

In Chapter 1 we introduced the concept of the Cartesian product of sets. Let’s assume that a person owns three shirts and two pairs of slacks. More precisely, letA={blue shirt,tan shirt,mint green shirt}andB={grey slacks,tan slacks}. ThenA×Bis the set of all six possible combinations of shirts and slacks that the individual could wear. However, an individual may wish to restrict himself or herself to combinations which are color coordinated, or “related.” This may not be all possible pairs inA×B but will certainly be a subset ofA×B. For example, one such subset may be

{(blue shirt,grey slacks),(blue shirt,tan slacks),(mint green shirt,tan slacks)}.

6.1.1 Relations between two sets

Definition 6.1.1 Relation. LetAandB be sets. A relation fromAintoB

is any subset ofA×B.

Example 6.1.2 A simple example. Let A = {1,2,3} and B = {4,5}. Then {(1,4),(2,4),(3,5)} is a relation from A into B. Of course, there are many others we could describe; 64, to be exact. □

CHAPTER 6. RELATIONS 101 Example 6.1.3 Divisibility Example. LetA={2,3,5,6}and define a rela- tionrfromAintoAby(a, b)∈rif and only ifadivides evenly intob. The set of pairs that qualify for membership isr={(2,2),(3,3),(5,5),(6,6),(2,6),(3,6)}.

6.1.2 Relations on a Set

Definition 6.1.4 Relation on a Set. A relation from a setA into itself is

called a relation onA.

The relation “divides” in Example 6.1.3will appear throughout the book. Here is a general definition on the whole set of integers.

Definition 6.1.5 Divides. Let a, b Z, a ̸= 0. We say that a divides b, denoteda|b, if and only if there exists an integerksuch thatak=b.

Be very careful in writing about the relation “divides.” The vertical line symbol use for this relation, if written carelessly, can look like division. While a|b is either true or false,a/b is a number.

Based on the equation ak=b, we can say thata|b is equivalent tok= ba, or a divides evenly into b. In fact the “divides” is short for “divides evenly into.” You might find the equationk=ab initially easier to understand, but in the long run we will find the equationak=b more convenient.

Sometimes it is helpful to illustrate a relation with a graph. Consider Example 6.1.2. A graph of r can be drawn as in Figure 6.1.6. The arrows indicate that 1 is related to 4 underr. Also, 2 is related to 4 underr, and 3 is related to 5, while the upper arrow denotes thatris a relation from the whole setAinto the set B.

Figure 6.1.6The graph of a relation

A typical element in a relationris an ordered pair(x, y). In some cases,r can be described by actually listing the pairs which are inr, as in the previous examples. This may not be convenient ifris relatively large. Other notations are used with certain well-known relations. Consider the “less than or equal” relation on the real numbers. We could define it as a set of ordered pairs this way:

={(x, y)|x≤y}

However, the notationx≤yis clear and self-explanatory; it is a more natural, and hence preferred, notation to use than(x, y)∈≤.

CHAPTER 6. RELATIONS 102

Many of the relations we will work with “resemble” the relation, soxsy is a common way to express the fact thatxis related toythrough the relation s.

Relation Notation Letsbe a relation from a setA into a setB. Then the fact that(x, y)∈sis frequently writtenxsy.

6.1.3 Composition of Relations

WithA={2,3,5,8},B={4,6,16}, andC={1,4,5,7}, letrbe the relation “divides,” from A into B, and let s be the relation from B into C. So r={(2,4),(2,6),(2,16),(3,6),(8,16)} ands={(4,4),(4,5),(4,7),(6,7)}.

Notice that inFigure 6.1.8that we can, for certain elements ofA, go through elements inB to results inC. That is:

Table 6.1.7 2|4and44 2|4and45 2|4and47 2|6and67 3|6and67

Figure 6.1.8Relation Composition - a graphical view

Based on this observation, we can define a new relation, call it rs, from A into C. In order for (a, c) to be inrs, it must be possible to travel along a path in Figure 6.1.8 from a to c. In other words, (a, c)∈rs if and only if

(∃b)B(arb andbsc). The namerswas chosen because it reminds us that this new relation was formed by the two previous relationsrands. The complete listing of all elements in rsis {(2,4),(2,5),(2,7),(3,7)}. We summarize in a definition.

Definition 6.1.9 Composition of Relations. Let r be a relation from a setAinto a setB, and letsbe a relation fromBinto a setC. The composition ofr with s, written rs, is the set of pairs of the form (a, c) A×C, where

(a, c)∈rsif and only if there existsb∈B such that (a, b)∈rand (b, c)∈s.

Remark: A word of warning to those readers familiar with composition of functions. (For those who are not, disregard this remark. It will be repeated at

CHAPTER 6. RELATIONS 103

an appropriate place in the next chapter.) As indicated above, the traditional way of describing a composition of two relations isrswhereris the first relation andsthe second. However, function composition is traditionally expressed in the opposite order: s◦r, where ris the first function andsis the second.

6.1.4 Exercises

1. For each of the following relationsrdefined onP, determine which of the given ordered pairs belong tor

(a) xry iffx|y; (2, 3), (2, 4), (2, 8), (2, 17) (b) xry iffx≤y; (2, 3), (3, 2), (2, 4), (5, 8) (c) xry iffy=x2; (1,1), (2, 3), (2, 4), (2, 6)

2. The following relations are on {1,3,5}. Let r be the relation xry iff y=x+ 2 andsthe relationxsy iffx≤y.

(a) List all elements in rs. (b) List all elements insr.

(c) Illustrate rsandsrvia a diagram. (d) Is the relationrsequal to the relationsr?

3. LetA={1,2,3,4,5} and definer onAby xry iffx+ 1 =y. We define r2=rr andr3=r2r. Find:

(a) r (b) r2 (c) r3

4. Givensandt, relations onZ,s={(1, n) :n∈Z}andt={(n,1) :n∈Z}, what arestandts? Hint: Even when a relation involves infinite sets, you can often get insights into them by drawing partial graphs.

5. Letρbe the relation on the power set,P(S), of a finite setSof cardinality ndefinedρby(A, B)∈ρiffA∩B=.

(a) Consider the specific case n = 3, and determine the cardinality of the setρ.

(b) What is the cardinality ofρfor an arbitraryn? Express your answer in terms ofn. (Hint: There are three places that each element of S can go in building an element ofρ.)

6. Letr1,r2, andr3 be relations on any setA. Prove that if r1 ⊆r2 then r1r3⊆r2r3.

In document Applied Discrete Structures (Page 111-117)