## 1 Introduction

A Godsil–McKay switching set of a graph is a special type of subset of the vertices, that makes it possible to switch some of the edges such that the spectrum of the adjacency matrix doesn’t change. It is well-known that if a graph $$G^\prime$$ has the same spectrum as a strongly regular graph G, then $$G^\prime$$ is also strongly regular with the same parameters as G (see for example ). Therefore Godsil–McKay switching provides a tool to construct new strongly regular graphs from known ones. However, there is no guarantee that the switched graph is non-isomorphic with the original graph. In this paper we use the 2-rank of the adjacency matrix to prove non-isomorphism after switching.

For $$\nu \ge 2$$, the symplectic graph over $$\mathbb {F}_{2}$$, denoted by $$Sp(2\nu ,2)$$ is a strongly regular with parameters $$(2^{2\nu }-1, 2^{2\nu -1}, 2^{2\nu -2},2^{2\nu -2})$$. The 2-rank of the adjacency matrix of $$Sp(2\nu ,2)$$ equals $$2\nu$$, which is the smallest possible value. The symplectic graph is characterized by Peeters  as follows.

### Theorem 1.1

The symplectic graph $$Sp(2\nu ,2)$$ is uniquely determined by its parameters and its 2-rank.

When $$\nu =1$$ we have the complete graph $$K_3$$, and Sp(4, 2) is a strongly regular graph with parameters (15, 8, 4, 4), which is known to be determined by its parameters. For $$\nu \ge 3$$ we find Godsil–McKay switching sets in $$Sp(2\nu ,2)$$ and we prove that the 2-rank increases after switching, which implies that the switched graph is non-isomorphic with the original graph.

It turns out that for $$\nu \ge 3$$ the symplectic graph has many switching sets that remain switching sets after switching. Therefore it is interesting to find out what happens after several switchings. We investigated this by computer for Sp(6, 2) and found 1826 new strongly regular graphs with parameters (63, 32, 16, 16). For the 2-rank of these new graphs we found six different values.

The symplectic graphs will be defined below, and in Sect. 4 we give an alternative description by use of a well-known recursive construction of Hadamard matrices. We settle the behavior of the 2-ranks of this recursive construction, and apply it to the strongly regular graphs with various 2-ranks found by computer. As a result we find that for every $$\nu \ge 3$$ there exist strongly regular graphs with the same parameters as $$Sp(2\nu ,2)$$ for a number of distinct values for the 2-rank. Moreover, this number of different 2-ranks is nondecreasing and goes to infinity when $$\nu \rightarrow \infty$$.

### 1.1 The symplectic graphs over $$\mathbb {F}_{2}$$

Let $$\mathbb {F}_{2}^{2\nu }$$ be the $$2\nu$$-dimensional vector space over $$\mathbb {F}_{2}$$, and let $$K=I_{\nu }\otimes (J_2-I_2)$$, where $$I_{\nu }$$ is the identity matrix of order $$\nu$$, and J denotes the all-ones matrix of order 2. The symplectic graph $$Sp(2\nu ,2)$$ over $$\mathbb {F}_{2}$$ is the graph whose vertices are the nonzero vectors of $$\mathbb {F}_{2}^{2\nu }$$, where two vertices x and y are adjacent whenever $$x^{\top }Ky = 1$$. Equivalently, $$x=[x_1\ \ldots \ x_{2\nu }]^\top$$ and $$y=[y_1\ \ldots \ y_{2\nu }]^\top$$ are adjacent if

\begin{aligned} (x_{1}y_2 + x_2 y_{1})+(x_{3}y_4+x_{4}y_{3})+\cdots +(x_{2\nu -1}y_{2\nu }+x_{2\nu }y_{2\nu -1})=1. \end{aligned}

For $$\nu \ge 2$$, it is known (see for example ) that the symplectic graph $$Sp(2\nu ,2)$$ is a strongly regular graph with parameters

\begin{aligned} \left( 2^{2\nu }-1,\ 2^{2\nu -1},\ 2^{2\nu -2},\ 2^{2\nu -2}\right) . \end{aligned}

### 1.2 Godsil–McKay switching and its 2-rank behavior

Godsil and McKay  proved the following result.

### Theorem 1.2

Let G be a graph and let S be a subset of the vertex set of G which induces a regular subgraph. Assume that each vertex outside S is adjacent to |S|, $$\frac{1}{2}|S|$$ or 0 vertices of S. Make a new graph $$G'$$ from G as follows. For each vertex v outside S with $$\frac{1}{2}|S|$$ neighbors in S, delete the $$\frac{1}{2}|S|$$ edges between v and S, and join v instead to the $$\frac{1}{2}|S|$$ other vertices in S. Then G and $$G'$$ have the same spectrum.

The operation that changes G into $$G'$$ is called Godsil–McKay switching. The subset S of the vertex set of G will be called a (Godsil–McKay) switching set. Note that any vertex subset of G of size 2 satisfies the required conditions, but in this case the switched graph $$G^\prime$$ is isomorphic with G. Therefore we assume that a switching set has at least four vertices.

Let A and $$A^\prime$$ be the adjacency matrices of G and $$G^\prime$$, respectively, and assume that the first |S| rows (and columns) of A and $$A^\prime$$ correspond to the switching set S and the last h rows correspond to the vertices outside S with exactly $$\frac{1}{2}|S|$$ neighbors in S. Then

\begin{aligned} A^\prime =A+K~(\text{ mod } 2), \quad \text{ where }\; K=\left[ \begin{array}{ccc} O&{}O&{}J\\ O&{}O&{}O\\ J^\top &{}O&{}O \end{array}\right] , \end{aligned}

and J is the $$|S|\times h$$ all-ones matrix. Since 2-rank$$(K)=2$$, the 2-ranks of A and $$A^\prime$$ differ by at most 2. It is well-known that the 2-rank of any adjacency matrix is even (see ), thus we have the following result.

### Proposition 1.3

Suppose 2-rank$$(A)=r$$, then r is even and 2-rank$$(A^\prime )=r-2$$, r, or $$r+2$$.

## 2 Switched symplectic graphs

For $$\nu \ge 3$$, we define the following vectors in $$\mathbb {F}_{2}^{2\nu }$$:

\begin{aligned} v_1=\left[ \begin{array}{c} 1 \\ 0 \\ 1 \\ 0 \\ 1 \\ 0 \\ z\end{array}\right] , \quad v_2=\left[ \begin{array}{c} 1 \\ 0 \\ 0 \\ 1 \\ 0 \\ 1 \\ z\end{array}\right] , \quad v_3=\left[ \begin{array}{c} 0 \\ 1 \\ 1 \\ 0 \\ 0 \\ 1 \\ z\end{array}\right] , \quad v_4=\left[ \begin{array}{c} 0 \\ 1 \\ 0 \\ 1 \\ 1 \\ 0 \\ z\end{array}\right] , \end{aligned}

where z is an arbitrary vector in $$\mathbb {F}_{2}^{2\nu -6}$$.

### Proposition 2.1

The set $$S=\{v_1,v_2,v_3,v_4\}$$ is a Godsil–McKay switching set of $$Sp(2\nu ,2)$$ for $$\nu \ge 3$$.

### Proof

Any two vertices from S are nonadjacent, so the subgraph of $$Sp(2\nu ,2)$$ induced by S is a coclique, and therefore regular. Consider an arbitrary vertex $$x\not \in S$$. Then

\begin{aligned} x^{\top }Kv_1+x^{\top }Kv_2+x^{\top }Kv_3+x^{\top }Kv_4 = x^{\top }K(v_1+v_2+v_3+v_4) = x^\top K \mathbf{0} = 0. \end{aligned}

This implies that the number of edges between x and S is even, and therefore S is a switching set. $$\square$$

Let $$G^\prime$$ be the graph obtained from $$G=Sp(2\nu ,2)$$ by switching with respect to S. We shall now prove that G and $$G^\prime$$ are non-isomorphic.

### Theorem 2.2

For $$\nu \ge 3$$, the graph $$G^\prime$$ obtained from $$Sp(2\nu ,2)$$ by switching with respect to the switching set S given above, is strongly regular with the same parameters as $$Sp(2\nu ,2)$$, but with 2-rank equal to $$2\nu +2$$.

### Proof

Let A be the adjacency matrix of $$G=Sp(2\nu ,2)$$, and assume that the first four rows and columns correspond to S. Then 2-rank$$(A)=2\nu$$ and A has $$2^{2\nu }-1$$ rows. This implies that, over $$\mathbb {F}_{2}$$, every possible nonzero linear combination of a basis of the row space of A is a row of A. Therefore the sum (mod 2) of any two rows of A is again a row of A. Let $$r_5$$ and $$r_6$$ be rows of A corresponding to the vertices $$v_5=[1 0 0 0 0 0 {z^{\top }}]^\top$$ and $$v_6=[0 0 1 0 0 0 {z^{\top }}]^\top$$, respectively. Then $$r_5$$ starts with 0011 and $$r_6$$ starts with 0101. It follows that $$r_7=r_5+r_6$$ is also a row of A starting with 0110. After switching only the first four entries of $$r_5$$, $$r_6$$ and $$r_7$$ change and become 1100, 1010 and 1001, respectively. Let $$r^\prime _i$$ denote the switched version of $$r_i$$ ($$i=5, 6$$ or 7). Then $$r^\prime _5+r^\prime _6+r^\prime _7= 11110\ldots 0$$, and this is in the row space of the switched matrix $$A^\prime$$, but it is not a row of $$A^\prime$$. So $$G^\prime$$ is not isomorphic to G, and by Theorem 1.1 and Proposition 1.3 the 2-rank of $$A^\prime$$ equals $$2\nu +2$$. $$\square$$

The switching set S given above, is not the only one. There are many more and many remain a switching set after switching with respect to S. (Indeed, for any three independent vectors $$v_1$$, $$v_2$$ and $$v_3\in \mathbb {F}_{2}^{2\nu }$$, the set $$\{v_1,\ v_2,\ v_3,\ v_1+v_2+v_3\}$$ is a Godsil–McKay switching set whenever the four vertices induce a regular subgraph.) Therefore we can apply switching several times. However it is not true in general that a second switching increases the 2-rank again, and it looks difficult to make a general statement like in the above theorem. Instead we investigated the repeated switching by computer for the case $$\nu =3$$.

It is also worthwhile to mention that in  upper bounds for the 2-rank of strongly regular graphs in terms of the eigenvalues are given. For graphs with the same parameters of $$Sp(2\nu ,2)$$, the 2-rank of its adjacency matrix A is bounded from above by $$2^{2\nu -1}-2^{\nu -1}$$. But in fact, it can be improved, since the spectrum implies that the matrix

\begin{aligned} E=(2^{2\nu }-1)\left( A+(2^{\nu -1})I\right) -(2^{2\nu -1}+2^{\nu -1})J \end{aligned}

has real rank equal to $$2^{2\nu -1}-2^{\nu -1}-1$$, and therefore the 2-rank of E is at most $$2^{2\nu -1}-2^{\nu -1}-1$$. Since $$A\equiv E$$ (mod 2) and the 2-rank of A must be even, it follows that the 2-rank is upper bounded by $$2^{2\nu -1}-2^{\nu -1}-2$$.

## 3 Repeated switching in Sp(6, 2)

In this section we show that Godsil–McKay switching generates a significant number of non-isomorphic graphs with the same parameters as the symplectic graph Sp(6, 2). By computer we search for all switching sets of size 4 in Sp(6, 2). We switch and compute the 2-rank. With the firstly encountered graph for which the 2-rank has increased, we repeat the procedure. We stop if the 2-rank cannot be increased. By this procedure we obtained 1827 non-isomorphic graphs with the parameters of Sp(6, 2). The possible 2-ranks are: 6, 8, 10, 12, 14, 16 and 18. No doubt we would have obtained many more non-isomorphic graphs with these parameters if we would have continued the search for other graphs for which the 2-rank has increased after switching. But the isomorphism tests are very time consuming, and since we are mainly interested in the 2-ranks, we choose not to do so. We did, however, continue with some other graphs without worrying about isomorphism in the hope to find examples with a 2-rank of 20 (or more), without success.

We will not display all newly obtained strongly regular graphs, instead we just give the sequence of switching sets that increases the 2-rank in each step (vertices are represented as row vectors):

\begin{aligned} \begin{array}{c} \{(100000),(010000),(101000),(011000)\},\\ \{(100000),(010000),(100100),(010100)\},\\ \{(100000),(010000),(100010),(010010)\},\\ \{(100000),(010000),(100001),(010001)\},\\ \{(110000),(001000),(000010),(111010)\},\\ \{(110000),(001000),(000001),(111001)\}. \end{array} \end{aligned}

The number of cospectral graphs obtained in each of the six above iterations is: 4275 with 2-rank 8 (161 are non-isomorphic), 2238 with 2-rank 10 (195 are non-isomorphic), 1242 with 2-rank 12 (301 are non-isomorphic), 818 with 2-rank 14 (489 are non-isomorphic), 508 with 2-rank 16 (508 are non-isomorphic) and 172 with 2-rank 18 (172 are non-isomorphic).

Thus we see that there is still a gap between the constructed cases and the theoretic upper bound for the 2-rank mentioned in Sect. 2, which for Sp(6, 2) is 26.

## 4 Hadamard matrices and 2-ranks

We recall some results of Hadamard matrices. A square $$(+1,-1)$$-matrix H of order n is a Hadamard matrix (or H-matrix) whenever $$HH^{\top }=nI$$. For example

\begin{aligned} H=\left[ \begin{array}{cccc} 1 &{} 1 &{} 1 &{} 1 \\ 1 &{} 1 &{} - &{} - \\ 1 &{} - &{} 1 &{} - \\ 1 &{} - &{} - &{} 1 \end{array} \right] \end{aligned}

is a Hadamard matrix of order 4 (we write $$-$$ instead of $$-1$$). If a row or a column of a Hadamard matrix is multiplied by $$-1$$, it remains a Hadamard matrix. We can multiply rows and columns of any Hadamard matrix by $$-1$$ such that the first row and column consist of all ones. Such a Hadamard matrix is called normalized. A Hadamard matrix H is said to be graphical if H is symmetric and it has constant diagonal. Note that if H is a graphical Hadamard matrix of order n with $$\delta$$ on the diagonal, then $$A=\frac{1}{2}(J-\delta H)$$ is the adjacency matrix of a graph on n vertices. If H is normalized, the obtained graph has an isolated vertex, and it is well-known that for $$n>4$$ the graph on the remaining $$n-1$$ vertices is strongly regular with parameters $$(n-1 , n/2, n/4, n/4)$$. And conversely, any strongly regular graph with the above parameters comes from a graphical Hadamard matrix. For example, the above Hadamard matrix H is graphical and normalized. The corresponding graph is the smallest symplectic graph $$Sp(2,2)=K_3$$ extended with an isolated vertex. It is well known that if $$H_1$$ and $$H_2$$ are Hadamard matrices, then so is the Kronecker product $$H_1\otimes H_2$$. Moreover, if $$H_1$$ and $$H_2$$ are normalized, then so is $$H_1\otimes H_2$$, and if $$H_1$$ and $$H_2$$ are graphical, then so is $$H_1\otimes H_2$$. For a Hadamard matrix H, we define $$A_H = \frac{1}{2}(J-H)$$ and $$\rho (H)=\text{2-rank }(A_{H})$$.

### Lemma 4.1

Let $$H_1$$ and $$H_2$$ be two Hadamard matrices, then $$\rho (H_1\otimes H_2)\le \rho (H_1)+\rho (H_2)$$, with equality if $$H_1$$ and $$H_2$$ are normalized.

### Proof

It is easily seen that

\begin{aligned} A_{H_1\otimes H_2} = (J\otimes A_{H_1}) + (A_{H_2}\otimes J) \quad (\text {mod }2). \end{aligned}

For any integer matrix A we have $$\text{2-rank }(J\otimes A)=\text{2-rank }(A\otimes J)=\text{2-rank }(A)$$. Therefore $$\rho (H_1\otimes H_2)\le \rho (H_1)+\rho (H_2)$$.

To prove the second statement, we define $$V_i$$ to be a matrix consisting of $$\rho (H_i)$$ independent columns of $$A_{H_i}$$ for $$i=1,2$$ (so the columns of $$V_1$$ and $$V_2$$ form a basis for the column space of $$A_{H_1}$$ and $$A_{H_2}$$, respectively). Suppose $$H_1$$ and $$H_2$$ are normalized. Then $$A_{H_1\otimes H_2}$$ contains the columns of $$\mathbf{1}\otimes V_1$$ and $$V_2\otimes \mathbf{1}$$. These $$\rho (H_1)+\rho (H_2)$$ columns are independent (indeed, the first rows of $$V_1$$ and $$V_2$$ are all-zero rows and therefore the only vector in the intersection of the column space of $$\mathbf{1}\otimes V_1$$ and the column space of $$V_2\otimes \mathbf{1}$$ is the zero vector), and hence $$\rho (H_1\otimes H_2)=\rho (H_1)+\rho (H_2)$$. $$\square$$

With the Hadamard matrix H of order 4 given above we define

\begin{aligned} H^{\otimes \nu }=H\otimes H\otimes \cdots \otimes H \ (\nu \ \text{ times }). \end{aligned}

Then clearly $$H^{\otimes \nu }$$ is a normalized graphical Hadamard matrix of order $$4^{\nu }$$, and Lemma 4.1 implies that 2-rank$$(A_{H^{\otimes \nu }})=\rho (H^{\otimes \nu })=2\nu$$. Therefore, by Theorem 1.1 the strongly regular graph associated with $$H^{\otimes \nu }$$ is the symplectic graph $$Sp(2\nu ,2)$$.

In the definition of $$H^{\otimes \nu }$$ we can replace any triple product $$H\otimes H\otimes H$$ by any other regular graphical Hadamard matrix of order 64. By choosing Hadamard matrices coming from the strongly regular graphs with various 2-ranks found by computer in Sect. 3, we obtain normalized graphical Hadamard matrices of order $$4^\nu$$, and the 2-rank of the associated strongly regular can take all even values between $$2\nu$$ and $$2\nu +12\lfloor \nu /3 \rfloor$$. Thus we find:

### Theorem 4.2

For any even $$r\in [2\nu ,\ 2\nu +12\lfloor \nu /3 \rfloor ]$$ there exists a strongly regular graph with parameters $$(2^{2\nu }-1,2^{\nu -1},2^{\nu -2},2^{\nu -2})$$ and 2-rank r.

Another application of Lemma 4.1 is the following. There exist strongly regular graphs with parameters (35, 18, 9, 9) for the 2-ranks 6, 8, 10, 12 and 14; see . Let $$H^*$$ be the associated normalized graphical Hadamard matrix of order 36, and let H be as before, then $$H\otimes H^*$$ is associated with a strongly regular graph with parameters (143, 72, 36, 36). By Lemma 4.1 we find that such strongly regular graphs exist for every even 2-rank between 8 and 16.

## 5 Remarks

A different construction of graphs with the same parameters as $$Sp(2\nu ,2)$$ was given by Munemasa and Vanhove . It would be interesting to know the 2-rank of their construction. It is claimed in  that the construction admits a cyclic difference set, and using Corollary 3.7 from , it follows that the 2-rank is a multiple of $$2\nu$$, and therefore at least $$4\nu$$. So we can conclude that their graphs are not isomorphic to the ones obtained in Theorem 2.2.

A graph associated with a normalized graphical Hadamard matrix is a so-called $$(v,k,\lambda )$$ graph, which means that the adjacency matrix can be interpreted as the incidence matrix of a symmetric 2-$$(v,k,\lambda )$$ design. It is possible that non-isomorphic graphs lead to isomorphic designs. However, if the matrices have different 2-ranks, then obviously also the designs are non-isomorphic. Thus we can conclude by Theorem 4.2 that there exist at least $$1+6\lfloor \nu /3\rfloor$$ non-isomorphic symmetric 2-$$(2^{2\nu }-1,2^{2\nu -1},2^{2\nu -2})$$ designs with distinguishing 2-ranks.