Logical matrix


A logical matrix, binary matrix, relation matrix, Boolean matrix, or 0, 1 matrix is the matrix with entries from the Boolean domain B = {0, 1}. such(a) a matrix can be used to cost a binary relation between a pair of finite sets.

Matrix explanation of a relation


If R is a binary relation between the finite indexed sets X & Y so , then R can be represented by the logical matrix M whose row and column indices index the elements of X and Y, respectively, such(a) that the entries of M are defined by

In positioning to designate the row and column numbers of the matrix, the sets X and Y are indexed with positive integers: i ranges from 1 to the cardinality size of X, and j ranges from 1 to the cardinality of Y. See the everyone on indexed sets for more detail.

The binary relation R on the shape {1, 2, 3, 4} is defined so that aRb holds whether and only if a divides b evenly, with no remainder. For example, 2R4 holds because 2 divides 4 without leaving a remainder, but 3R4 does not throw because when 3 divides 4, there is a remainder of 1. The following set is the shape of pairs for which the relation R holds.

The corresponding representation as a logical matrix is

which includes a diagonal of ones, since each number divides itself.