Content uploaded by Yuval Filmus
Author content
All content in this area was uploaded by Yuval Filmus on Mar 06, 2017
Content may be subject to copyright.
Range of Symmetric Matrices over GF (2)
Yuval Filmus
January 2010
Abstract
We prove that the range of a symmetric matrix over GF (2) always
contains its diagonal. This is best possible in several ways, for example
GF (2) cannot be replaced by any other field.
1 Introduction
We prove the following theorem:
Definition 1.1. The diagonal of a matrix M, notated diag M, is the vector
composed of the diagonal elements of M.
Theorem 1.1. Let Mbe a symmetric matrix over GF (2). Then diag M∈
range M.
This theorem is best possible in several ways:
1. We can’t drop the assumption that Mis symmetric. The simplest
example is 1 0
1 0.
2. We can’t replace GF (2) with any other field. The matrix 1x
x x2is
an example, for any x6= 0,1.
3. We can’t guarantee the existence of any other non-zero vector in rangeM.
Indeed, if Mis a block matrix composed of an all-ones block and an
all-zeroes block, range M={0,diag M}.
1
2 Proof
We begin with a definition:
Definition 2.1. A matrix Mover GF (2) is called realizable if diag M∈
range M.
Our goal is to show that all symmetric matrices are realizable. We will
do so by applying a reduction operation which preserves realizability, until
the matrix reduces to a very simple form which is trivially realizable.
Definition 2.2. Let Mbe a symmetric matrix, Sbe a subset of the indices,
and ian index not in S. The reduction of Mobtained by adding Sto i,
N=M[S→i], is defined as follows:
Npq =Mpq +δ(p, i)X
j∈S
Mjq +δ(q, i)X
j∈S
Mpj .
The notation δ(x, y)means 1if x=yand 0if x6=y.
Definition 2.3. The set Sis admissible with respect to a matrix Mif
X
j∈S
Mjj = 0.
A reduction with an admissible set is an admissible reduction.
Applying a reduction to a symmetric matrix results in a symmetric matrix
with the same diagonal.
Lemma 2.1. If Mis a symmetric matrix, Sis a subset of the indices, and
i /∈S, then N=M[S→i]is a symmetric matrix and diag M= diag N.
Proof. First, we show that Nis symmetric:
Npq =Mpq +δ(p, i)X
j∈S
Mjq +δ(q, i)X
j∈S
Mpj
=Mqp +δ(q, i)X
j∈S
Mjp +δ(p, i)X
j∈S
Mqj =Nqp .
Second, we calculate the diagonal of N:
Npp =Mpp +δ(p, i)X
j∈S
Mjp +δ(p, i)X
j∈S
Mpj =Mpp.
2
Reduction is a reversible operation.
Lemma 2.2. If N=M[S→i]then M=N[S→i].
Proof. This is an easy computation. Let L=N[S→i]. Then
Lpq =Npq +δ(p, i)X
j∈S
Njq +δ(q, i)X
j∈S
Npj
=Mpq +δ(p, i)X
j∈S
(Mjq +Nj q) + δ(q, i)X
j∈S
(Mpj +Npj )
=Mpq +δ(p, i)δ(q, i)X
j∈SX
k∈S
Mjk +δ(q, i)δ(p, i)X
j∈SX
k∈S
Mkj =Mpq .
If the reduction is admissible, then there is a close connection between
the ranges of both matrices.
Lemma 2.3. If N=M[S→i]and Sis admissible for Mthen the range of
Nis obtained from the range of Mas follows:
range N=(v+ X
j∈S
vj!ei:v∈range M),
where eiis the ith basis vector. In words, the range of Nis obtained from
the range of Mby adding the columns in Sto column i.
Proof. Let xbe a vector. We calculate Nx:
(Nx)p=X
q
Npqxq
=X
q Mpq +δ(p, i)X
j∈S
Mjq +δ(q, i)X
j∈S
Mpj !xq
=X
q
Mpqxq+δ(p, i)X
j∈S
Mjq xq+X
j∈S
Mpj xi
= (Mx)p+δ(p, i)(Mx)j+xi MX
j∈S
ej!p
.
This prompts us to defined
y=x+xiX
j∈S
ej.
3
Since i /∈S, we similarly have
x=y+yiX
j∈S
ej.
Rewriting our earlier result,
(Nx)p= (Mx)p+δ(p, i)(Mx)j+xi MX
j∈S
ej!p
= (My)p+δ(p, i)(My)j+δ(p, i)yi MX
j∈S
ej!j
= (My)p+δ(p, i)(My)j+δ(p, i)yiX
j∈S
Mjj
= (My)p+δ(p, i)(My)j.
Here we used the admissibility of S. The result follows since the function
transforming xto yis a bijection on the domain of M.
As a corollary, we obtain that an admissible reduction preserves realiz-
ability.
Corollary 2.4. If N=M[S→i]and Sis admissible then Nis realizable
if and only if Mis realizable.
Proof. Suppose Mis realizable. Denote v= diag M= diag N. Thus v∈
range M. Since
X
j∈S
vj=X
j∈S
Mjj = 0,
by the lemma also v∈range N.
We need several more trivial results.
Lemma 2.5. If a column of a matrix Mis equal to diag M, then Mis
realizable.
Lemma 2.6. Suppose Mis a block matrix. If all blocks of Mare realizable,
then so is M.
4
Definition 2.4. If Mij =Mji = 0 for j6=i, the index iis called lonely.
The matrix without row and column iis denoted M−i.
Corollary 2.7. Let Mbe a matrix with a lonely index i. If M−iis realizable
then so is M.
We now have enough tools at our disposal to prove the theorem.
Theorem 2.8. All matrices are realizable.
Proof. The proof is by induction on n. The base case n= 1 is trivial.
Let Mbe an n×nmatrix. Define S={i:Mii = 1}. If S=∅then
diag M= 0 and so the theorem is trivial.
Suppose next that S={s}. Assume first that Mab = 0 for all a, b 6=s. If
Mst = 1 for some t6=sthen column trepresents M. If Mst = 0 for all t6=s
then column srepresents M.
Thus we can assume that Mab = 1 for some a, b 6=s. Since Maa =
Mbb = 0, we can add ato cfor any other index csatisfying Mbc = 1, and b
to dfor any other index dsatisfying Mad = 1. In the resulting matrix N,
Nae =Nbe = 0 for e6=a, b. Thus Ncan be split into two blocks, {a, b}
and the rest. The block corresponding to {a, b}is trivially realizable, and by
induction so is the other block. Thus Nis realizable, hence Mis realizable.
From now on, we assume that |S|>1. We consider several cases. Suppose
first that there exist i6=j∈Ssuch that Mij = 0. Since Mii +Mj j = 0, we
can add i, j to all k6=isatisfying Mik = 1. In the resulting matrix N, the
index iis lonely. By induction, N−iis realizable, hence so are Nand M.
Suppose next that there are indices i6=j∈Sand k /∈Ssuch that
Mij =Mik = 1. Since Mkk = 0, we can add kto j. The resulting matrix N
satisfies Nij = 0, and so the previous case applies.
Finally, suppose that none of the other cases apply. Thus for all i, j ∈S
we have Mij = 1, and for all i∈S, k /∈Swe have Mik = 0. Therefore Mis
a block matrix consisting of an all-ones block and a block whose diagonal is
zero. Any column i∈Srealizes M.
5
3 Recursive Proof for Forests
Any matrix over GF (2) corresponds to a graph. In this section we prove
the theorem for matrices which correspond to forests (we allow arbitrary
self-loops).
We first need a definition.
Definition 3.1. Let Mbe the adjacency matrix of a rooted tree, and suppose
ris the index of the root. A vector xis said to (α, β)-realize Mif Mx =
diag M+αerand xr=β.
Furthermore, Mis (α, β)-realizable if some vector (α, β)-realizes it.
A(∗, β)-realization is either a (0, β)- or a (1, β)-realization. An (α, ∗)-
realization is defined similarly.
We can divide all trees into three classes, as the following theorem shows.
Theorem 3.1. Let Mbe the adjacency matrix of a rooted tree. Then M
belongs to one of the following classes:
Class 0: Mis (α, β)-realizable iff α+β= 1.
Class 1: Mis (α, β)-realizable iff α= 0.
Class 2: Mis (α, β)-realizable iff β= 0.
Note that the classes are mutually exclusive, and that in all classes, Mis
(0,∗)-realizable, and so it is realizable (in the original sense).
Proof. The proof is by induction on the height of the tree. The base case is
when Mconsists of a leaf. One can easily check that M= (0) is class 1 and
M= (1) is class 0.
Next, let Mrepresent a tree T, and consider the (non-empty) set of
subtrees of the root. We denote the root of a subtree Sby r(S). There are
two fundamental cases.
One of the subtrees Sis class 1. We claim that in this case, Tis class 2.
First, we show that Tis (α, 0)-realizable for both choices of α. By induction,
all subtrees of Tother than Sare (0,∗)-realizable. The subtree Sis by
assumption (0, β)-realizable for both choices of β. By combining all these
realizations along with xr= 0, we get two vectors xβthat differ only on S.
Since xβ
r(S)=β, we see that Mx0, Mx1differ on r. Thus they (α, 0)-realize
Tfor both possibilities of α.
6
Second, we claim that Tis not (α, 1)-realizable for any α. For suppose x
is an (α, 1)-realization of T. Then xS, the part consisting of the vertices of
S, (1,∗)-realizes S, which contradicts the definition of class 1.
None of the subtrees is class 1. In that case, each subtree Siis (α, β)-
realizable only for β=fi(α), where either fi(α) = 1+α(class 0) or fi(α) = 0
(class 2). Notice that in both cases, fi(1) = 0. In any (∗,1)-realization of T,
all the subtrees must be (1,0)-realized, and so this in fact a (0,1)-realization
of T. Similarly, in any (∗,0)-realization of T, subtree Simust be (0, fi(0))-
realized. Setting a=Mrr +Pfi(0), this is always an (a, 0)-realization of T.
Notice that in both cases, such realizations are actually possible. Thus Tis
class 1 if a= 0 and class 0 if a= 1.
Corollary 3.2. All forests are realizable.
The proof of the theorem shows that a vertical path of length kwith
self-loops in all vertices is class (kmod 3). If there are no self-loops at all,
it is class 1 + (kmod 2).
4 Noga Alon’s Proof
Here is Noga’s original proof. For every vector xand symmetric matrix M,
xTMx =X
i,j
xiMij xj
=X
i
xiMiixi+X
i<j
(xiMij xj+xjMij xi)
=X
i
Miixi=xTdiag M.
Therefore diag M⊥ker M, i.e.
diag M∈(ker M)⊥= range MT= range M.
The proof is non-constructive since the connection between kerMand range MT
is proved by comparing dimensions.
5 Thanks
I thank Moti Levy for spotting out a mistake in the proof of Corollary 2.4,
and Moron for letting me know Noga’s proof.
7