* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Download Notes on Discrete Mathematics
Large numbers wikipedia , lookup
List of important publications in mathematics wikipedia , lookup
Big O notation wikipedia , lookup
Bra–ket notation wikipedia , lookup
Abuse of notation wikipedia , lookup
History of the function concept wikipedia , lookup
Fundamental theorem of calculus wikipedia , lookup
Mathematical proof wikipedia , lookup
Peano axioms wikipedia , lookup
Non-standard calculus wikipedia , lookup
Laws of Form wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Four color theorem wikipedia , lookup
Series (mathematics) wikipedia , lookup
Central limit theorem wikipedia , lookup
Karhunen–Loève theorem wikipedia , lookup
List of first-order theories wikipedia , lookup
Mathematics of radio engineering wikipedia , lookup
Elementary mathematics wikipedia , lookup
Expected value wikipedia , lookup
Naive set theory wikipedia , lookup
Law of large numbers wikipedia , lookup
CHAPTER 9. RELATIONS
like this:
124


0 1 1 0


A = 2 1 0 0 
1 0 0 â1
The first index of an entry gives the row it appears in and the second one
the column, so in this example A2,1 = 2 and A3,4 = â1. The dimensions
of a matrix are the numbers of rows and columns; in the example, A is a
3 Ã 4 (pronounced â3 by 4â) matrix.
Note that rows come before columns in both indexing (Aij : i is row, j
is column) and giving dimensions (n à m: n is rows, m is columns). Like
the convention of driving on the right (in many countries), this choice is
arbitrary, but failing to observe it may cause trouble.
Matrices are used heavily in linear algebra (Chapter 13), but for the
moment we will use them to represent relations from {1 . . . n} to {1 . . . m},
by setting Aij = 0 if (i, j) is not in the relation and Aij = 1 if (i, j) is. So
for example, the relation on {1 . . . 3} given by {(i, j) | i < j} would appear
in matrix form as


0 1 1


0 0 1 .
0 0 0
When used to represent the edges in a directed graph, a matrix of this
form is called an adjacency matrix.
9.2
9.2.1
Operations on relations
Composition
Just like functions, relations can be composed: given relations R â A Ã B
and S â B à C we define (S ⦠R) â A à C by the rule (x, z) â (S ⦠R) if and
only if there exists some y â B such that (x, y) â R and (y, z) â S. (In infix
notation: x(S ⦠R)z â ây : xRy â§ ySz.) Itâs not hard to see that ordinary
function composition ((f ⦠g)(x) = f (g(x))) is just a special case of relation
composition.
In matrix terms, composition acts like matrix multiplication, where we
replace scalar multiplication with AND and scalar addition with OR: (S â¦
W
R)ij = k (Rik â§ Skj ). Note that if we use the convention that Rij = 1 if
iRj the order of the product is reversed from the order of composition.
For relations on a single set, we can iterate composition: Rn is defined
by R0 = (=) and Rn+1 = R ⦠Rn . (This also works for functions, bearing in