A logical matrix, binary matrix, relation matrix, Boolean matrix, or (0, 1) matrix is a
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** ''The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
with entries from the
Boolean domain Such a matrix can be used to represent a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
between a pair of
finite sets.
Matrix representation of a relation
If ''R'' is a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
between the finite
indexed set
In mathematics, a family, or indexed family, is informally a collection of objects, each associated with an index from some index set. For example, a ''family of real numbers, indexed by the set of integers'' is a collection of real numbers, wher ...
s ''X'' and ''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 that the entries of ''M'' are defined by
:
In order 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
In mathematics, the cardinality of a set is a measure of the number of elements of the set. For example, the set A = \ contains 3 elements, and therefore A has a cardinality of 3. Beginning in the late 19th century, this concept was generalized ...
(size) of ''X'', and ''j'' ranges from 1 to the cardinality of ''Y''. See the entry on
indexed set
In mathematics, a family, or indexed family, is informally a collection of objects, each associated with an index from some index set. For example, a ''family of real numbers, indexed by the set of integers'' is a collection of real numbers, wher ...
s for more detail.
Example
The binary relation ''R'' on the set is defined so that ''aRb'' holds if and only if ''a''
divides
In mathematics, a divisor of an integer n, also called a factor of n, is an integer m that may be multiplied by some integer to produce n. In this case, one also says that n is a multiple of m. An integer n is divisible or evenly divisible by ...
''b'' evenly, with no remainder. For example, 2''R''4 holds because 2 divides 4 without leaving a remainder, but 3''R''4 does not hold because when 3 divides 4, there is a remainder of 1. The following set is the set 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.
Other examples
* A
permutation matrix
In mathematics, particularly in matrix theory, a permutation matrix is a square binary matrix that has exactly one entry of 1 in each row and each column and 0s elsewhere. Each such matrix, say , represents a permutation of elements and, when ...
is a (0, 1)-matrix, all of whose columns and rows each have exactly one nonzero element.
** A
Costas array
In mathematics, a Costas array can be regarded geometrically as a set of ''n'' points, each at the center of a square in an ''n''×''n'' square tiling such that each row or column contains only one point, and all of the ''n''(''n'' &minu ...
is a special case of a permutation matrix.
* An
incidence matrix in
combinatorics
Combinatorics is an area of mathematics primarily concerned with counting, both as a means and an end in obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many appl ...
and
finite geometry has ones to indicate incidence between points (or vertices) and lines of a geometry, blocks of a
block design
In combinatorial mathematics, a block design is an incidence structure consisting of a set together with a family of subsets known as ''blocks'', chosen such that frequency of the elements satisfies certain conditions making the collection of bl ...
, or edges of a
graph (discrete mathematics)
In discrete mathematics, and more specifically in graph theory, a graph is a structure amounting to a Set (mathematics), set of objects in which some pairs of the objects are in some sense "related". The objects correspond to mathematical abstra ...
.
* A
design matrix in
analysis of variance
Analysis of variance (ANOVA) is a collection of statistical models and their associated estimation procedures (such as the "variation" among and between groups) used to analyze the differences among means. ANOVA was developed by the statisticia ...
is a (0, 1)-matrix with constant row sums.
* A logical matrix may represent an
adjacency matrix
In graph theory and computer science, an adjacency matrix is a square matrix used to represent a finite graph. The elements of the matrix indicate whether pairs of vertices are adjacent or not in the graph.
In the special case of a finite simp ...
in
graph theory
In mathematics, graph theory is the study of ''graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conne ...
: non-symmetric matrices correspond to
directed graphs, symmetric matrices to ordinary
graphs, and a 1 on the diagonal corresponds to a
loop
Loop or LOOP may refer to:
Brands and enterprises
* Loop (mobile), a Bulgarian virtual network operator and co-founder of Loop Live
* Loop, clothing, a company founded by Carlos Vasquez in the 1990s and worn by Digable Planets
* Loop Mobile, an ...
at the corresponding vertex.
* The
biadjacency matrix of a simple, undirected
bipartite graph
In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V, that is every edge connects a vertex in U to one in V. Vertex sets U and V are ...
is a (0, 1)-matrix, and any (0, 1)-matrix arises in this way.
* The prime factors of a list of ''m''
square-free,
''n''-smooth numbers can be described as a ''m'' × π(''n'') (0, 1)-matrix, where π is the
prime-counting function
In mathematics, the prime-counting function is the function counting the number of prime numbers less than or equal to some real number ''x''. It is denoted by (''x'') (unrelated to the number ).
History
Of great interest in number theory is t ...
, and ''a''
''ij'' is 1 if and only if the ''j''th prime divides the ''i''th number. This representation is useful in the
quadratic sieve The quadratic sieve algorithm (QS) is an integer factorization algorithm and, in practice, the second fastest method known (after the general number field sieve). It is still the fastest for integers under 100 decimal digits or so, and is considerab ...
factoring algorithm.
* A
bitmap image containing
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device.
In most digital display devices, pixels are the smal ...
s in only two colors can be represented as a (0, 1)-matrix in which the zeros represent pixels of one color and the ones represent pixels of the other color.
* A binary matrix can be used to check the game rules in the game of
Go
Some properties
The matrix representation of the
equality relation on a finite set is the
identity matrix
In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere.
Terminology and notation
The identity matrix is often denoted by I_n, or simply by I if the size is immaterial o ...
I, that is, the matrix whose entries on the diagonal are all 1, while the others are all 0. More generally, if relation ''R'' satisfies then R is a
reflexive relation.
If the Boolean domain is viewed as a
semiring, where addition corresponds to
logical OR and multiplication to
logical AND, the matrix representation of the
composition of two relations is equal to the
matrix product of the matrix representations of these relations.
This product can be computed in
expected time O(''n''
2).
Frequently operations on binary matrices are defined in terms of
modular arithmetic
In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his book ...
mod 2—that is, the elements are treated as elements of the
Galois field . They arise in a variety of representations and have a number of more restricted special forms. They are applied e.g. in
XOR-satisfiability.
The number of distinct ''m''-by-''n'' binary matrices is equal to 2
''mn'', and is thus finite.
Lattice
Let ''n'' and ''m'' be given and let ''U'' denote the set of all logical ''m'' × ''n'' matrices. Then ''U'' has a
partial order
In mathematics, especially order theory, a partially ordered set (also poset) formalizes and generalizes the intuitive concept of an ordering, sequencing, or arrangement of the elements of a set. A poset consists of a set together with a binary ...
given by
:
In fact, ''U'' forms a
Boolean algebra
In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variables are the truth values ''true'' and ''false'', usually denoted 1 and 0, whereas in e ...
with the operations
and
or AND may refer to:
Logic, grammar, and computing
* Conjunction (grammar), connecting two words, phrases, or clauses
* Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition
* Bitwise AND, a boole ...
&
or between two matrices applied component-wise. The complement of a logical matrix is obtained by swapping all zeros and ones for their opposite.
Every logical matrix has a transpose Suppose ''A'' is a logical matrix with no columns or rows identically zero. Then the matrix product, using Boolean arithmetic,
contains the ''m'' × ''m''
identity matrix
In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere.
Terminology and notation
The identity matrix is often denoted by I_n, or simply by I if the size is immaterial o ...
, and the product
contains the ''n'' × ''n'' identity.
As a mathematical structure, the Boolean algebra ''U'' forms a
lattice ordered by
inclusion
Inclusion or Include may refer to:
Sociology
* Social inclusion, aims to create an environment that supports equal opportunity for individuals and groups that form a society.
** Inclusion (disability rights), promotion of people with disabilitie ...
; additionally it is a multiplicative lattice due to matrix multiplication.
Every logical matrix in ''U'' corresponds to a binary relation. These listed operations on ''U'', and ordering, correspond to a
calculus of relations, where the matrix multiplication represents
composition of relations
In the mathematics of binary relations, the composition of relations is the forming of a new binary relation from two given binary relations ''R'' and ''S''. In the calculus of relations, the composition of relations is called relative multiplica ...
.
[ Irving Copilowish (December 1948). "Matrix development of the calculus of relations", Journal of Symbolic Logic 13(4): 193–20]
Jstor link
/ref>
Logical vectors
If ''m'' or ''n'' equals one, then the ''m'' × ''n'' logical matrix (''M''ij) is a logical vector. If ''m'' = 1, the vector is a row vector, and if ''n'' = 1, it is a column vector. In either case the index equaling one is dropped from denotation of the vector.
Suppose and are two logical vectors. The outer product
In linear algebra, the outer product of two coordinate vector
In linear algebra, a coordinate vector is a representation of a vector as an ordered list of numbers (a tuple) that describes the vector in terms of a particular ordered basis. An ea ...
of ''P'' and ''Q'' results in an ''m'' × ''n'' rectangular relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over sets and is a new set of ordered pairs consisting of elements in and ...
:
A re-ordering of the rows and columns of such a matrix can assemble all the ones into a rectangular part of the matrix.
Let ''h'' be the vector of all ones. Then if ''v'' is an arbitrary logical vector, the relation ''R'' = ''v h''T has constant rows determined by ''v''. In the calculus of relations such an ''R'' is called a vector.[ A particular instance is the universal relation .
For a given relation ''R'', a maximal rectangular relation contained in ''R'' is called a concept in R. Relations may be studied by decomposing into concepts, and then noting the induced concept lattice.
Consider the table of group-like structures, where "unneeded" can be denoted 0, and "required" denoted by 1, forming a logical matrix ''R''. To calculate elements of , it is necessary to use the logical inner product of pairs of logical vectors in rows of this matrix. If this inner product is 0, then the rows are orthogonal. In fact, semigroup is orthogonal to loop, small category is orthogonal to quasigroup, and groupoid is orthogonal to magma. Consequently there are zeros in , and it fails to be a universal relation.
]
Row and column sums
Adding up all the ones in a logical matrix may be accomplished in two ways: first summing the rows or first summing the columns. When the row sums are added, the sum is the same as when the column sums are added. In incidence geometry
In mathematics, incidence geometry is the study of incidence structures. A geometric structure such as the Euclidean plane is a complicated object that involves concepts such as length, angles, continuity, betweenness, and incidence. An ''incidenc ...
, the matrix is interpreted as an incidence matrix with the rows corresponding to "points" and the columns as "blocks" (generalizing lines made of points). A row sum is called its ''point degree'', and a column sum is the ''block degree''. Proposition 1.6 in ''Design Theory'' says that the sum of point degrees equals the sum of block degrees.
An early problem in the area was "to find necessary and sufficient conditions for the existence of an incidence structure with given point degrees and block degrees (or in matrix language, for the existence of a (0, 1)-matrix of type ''v'' × ''b'' with given row and column sums".[ Such a structure is a ]block design
In combinatorial mathematics, a block design is an incidence structure consisting of a set together with a family of subsets known as ''blocks'', chosen such that frequency of the elements satisfies certain conditions making the collection of bl ...
.
See also
* List of matrices
This article lists some important classes of matrices used in mathematics, science and engineering. A matrix (plural matrices, or less commonly matrixes) is a rectangular array of numbers called ''entries''. Matrices have a long history of both st ...
* Binatorix (a binary De Bruijn torus)
* Bit array
* Redheffer matrix
* Truth table
A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional argumen ...
Notes
References
* , § 31.3, Binary Matrices
*
* H. J. Ryser
Herbert John Ryser (July 28, 1923 – July 12, 1985) was a professor of mathematics, widely regarded as one of the major figures in combinatorics in the 20th century.[Canadian Journal of Mathematics
The ''Canadian Journal of Mathematics'' (french: Journal canadien de mathématiques) is a bimonthly mathematics journal published by the Canadian Mathematical Society.
It was established in 1949 by H. S. M. Coxeter and G. de B. Robinson. The cur ...]
9: 371–7.
* Ryser, H.J. (1960) "Traces of matrices of zeroes and ones", ''Canadian Journal of Mathematics'' 12: 463–76.
* Ryser, H.J. (1960) "Matrices of Zeros and Ones", Bulletin of the American Mathematical Society
The ''Bulletin of the American Mathematical Society'' is a quarterly mathematical journal published by the American Mathematical Society.
Scope
It publishes surveys on contemporary research topics, written at a level accessible to non-experts. I ...
66: 442–64.
* D. R. Fulkerson
Delbert Ray Fulkerson (; August 14, 1924 – January 10, 1976) was an American mathematician who co-developed the FordFulkerson algorithm, one of the most well-known algorithms to solve the maximum flow problem in Flow network, networks.
Early l ...
(1960) "Zero-one matrices with zero trace", Pacific Journal of Mathematics 10; 831–6
* D. R. Fulkerson & H. J. Ryser (1961) "Widths and heights of (0, 1)-matrices", ''Canadian Journal of Mathematics'' 13: 239–55.
* L. R. Ford Jr.
Lester Randolph Ford Jr. (September 23, 1927 – February 26, 2017) was an American mathematician specializing in network flow problems. He was the son of mathematician Lester R. Ford Sr.
Ford's paper with D. R. Fulkerson on the maximum flow p ...
& D. R. Fulkerson (1962) § 2.12 "Matrices composed of 0's and 1's", pages 79 to 91 in ''Flows in Networks'', Princeton University Press
Princeton University Press is an independent publisher with close connections to Princeton University. Its mission is to disseminate scholarship within academia and society at large.
The press was founded by Whitney Darrow, with the financial su ...
External links
*
{{DEFAULTSORT:Logical Matrix
Boolean algebra
Matrices