July 14, 2026
A Hadamard matrix \(H\) of order \(n\) is a square matrix with entries in \(\{+1, -1\}\) such that \(H H^T = n I_n,\) meaning that the rows (and columns) of \(H\) are mutually orthogonal. This implies that each row has Euclidean norm \(\sqrt{n}\), and the inner product between any two distinct rows is zero. There are several well-known constructions of Hadamard matrices, which can be found in [1]–[4]. These include Sylvester Hadamard matrices, Paley Type I and Type II Hadamard matrices, and Williamson Hadamard matrices.
Hadamard matrices play a fundamental role in various areas of applied mathematics, including optimal signal representations, information theory, signal processing, statistical analysis, and quantum computing [4]–[8]. Specifically, in quantum computing, Hadamard matrices are central in the construction of quantum gates and error-correcting codes.
The existence of Hadamard matrices is subject to specific order constraints: it is well known that if a Hadamard matrix of order \(n>2\) exists, then \(n \equiv 0 \pmod{4}\). The Hadamard conjecture asserts that a Hadamard matrix exists for every order divisible by \(4\); however, this remains open in general [4].
Beyond their algebraic properties, Hadamard matrices are also of significant interest in geometry and combinatorics. Indeed, they are closely related to error-correcting codes [9], [10] and symmetric block designs [11]. In particular, as an application to coding theory, we consider the notion of unbiased Hadamard matrices. Two Hadamard matrices \(H\) and \(K\) of order \(n\) are said to be unbiased if \(\frac{1}{\sqrt{n}}HK^{T}\) is itself a Hadamard matrix, or equivalently, if all entries of \(HK^{T}\) have absolute value \(\sqrt{n}\). This concept extends naturally to sets of mutually unbiased Hadamard matrices, and they can be used to construct ternary self-dual and self-orthogonal codes. Conversely, these codes can be used to generate new examples of unbiased Hadamard matrices (see [9]).
Hadamard matrices have been generalized in several directions. One prominent example is the class of weighing matrices [12], [13], which are square matrices of order \(n\) with entries from \(\{0,+1,-1\}\) satisfying \(WW^T=kI_n\). Other significant generalizations include constructions over rings [14] or finite fields [15]–[17].
In [15], [16], the authors propose an extension of the concept of Hadamard matrices into prime fields \(\mathbb{F}_p\), where \(p\) is an odd prime. They work with square matrices over \(\mathbb{F}_p\setminus\{0\}\), where any pairs of rows are mutually orthogonal. Any additions and multiplications are executed modulo \(p\). They referred these matrices as Hadamard-type (or H-type) matrices over \(\mathbb{F}_p\).
In this work, we study a generalization of the weighing matrices and the Hadamard-type matrices presented in [16], called Generalized Weighing-Hadamard (GWH) matrices over \(\mathbb{F}_q\), which are square matrices of order \(n\) satisfying \(HH^T=wI_{n}\) for some \(w \in \mathbb{F}_q\). We further investigate several properties and constructions of this class of matrices, including some adaptations of the constructions given in [16]. Moreover, we provide recursive constructions that enable the generation of new GWH matrices from existing ones. Finally, we establish the conditions for the existence of such matrices over arbitrary finite fields and study its algebraic structure.
The paper is organized as follows. Section 2 reviews the necessary preliminaries. In Section 3, we study the notion of Generalized Weighing-Hadamard matrices and prove their existence over arbitrary finite fields. In Section 4, we analyze their properties and present several constructions. Section 5 introduces an equivalence relation on the set of GWH matrices and establishes some of its algebraic properties. In Section 6, we present several applications, to coding theory, illustrating the usefulness of GWH matrices. Finally, the paper concludes with some final remarks and directions for future research.
Consider \(\mathbb{F}_q\) a finite field with \(q=p^r\) elements, where \(p\) is a prime number and \(r\) a positive integer, and \(\mathbb{F}^{*}_q\) the multiplicative group of \(\mathbb{F}_q\). From now on, let \(\mathsf{Mat}_{k \times n}(\mathbb{F}_q)\) and \(\mathsf{Mat}_n(\mathbb{F}_q)\) be the \(\mathbb{F}_q\)-algebras of \(k \times n\) and \(n \times n\) matrices over \(\mathbb{F}_q\), respectively. The matrices \(I_n\) and \(O_{k \times n}\) denote the square identity and all-zero matrices, respectively. For simplicity, we just write \(O\) to denote the zero matrix of the appropriate size.
Definition 1. An element \(a \in \mathbb{F}_q\) is called a quadratic residue* if there exists \(x \in \mathbb{F}_q\) such that \[x^2 = a.\] If there is no such \(x\), then \(a\) is called a quadratic non-residue. The set of quadratic residues of \(\mathbb{F}_q\) is denoted by \(\mathop{\mathrm{QR}}(q)\) and the set of quadratic non-residues by \(\mathop{\mathrm{QNR}}(q)\).*
Observe that, as a consequence of the Frobenius automorphism \(\sigma: \mathbb{F}_{2^r} \longrightarrow \mathbb{F}_{2^r}\), given by \(\sigma(a)=a^{2}\), all the elements in \(\mathbb{F}_{2^r}\) are quadratic residues.
Definition 2. Let \(\mathbb{F}_q\) be a finite field with \(q\) elements, where \(q\) is odd. The quadratic character* of an element \(a \in \mathbb{F}_q^*\) is defined by \(\chi: \mathbb{F}_q^* \longrightarrow \{-1,1\}\) such that \(\chi(a) = a^{\frac{q-1}{2}}\). To extend, we can consider \(\chi(a)=0\), for the case \(a=0\).*
In [18], authors introduce the characterization of the quadratic residues through the quadratic character of \(\mathbb{F}_q\), which we reflect in the following theorem.
Theorem 1. If \(q\) is odd, an element \(a \in \mathbb{F}_q^*\) is a quadratic residue if and only if \(\chi(a)= 1;\) and a quadratic non-residue if and only if \(\chi(a) = -1.\) Moreover, \(|\mathop{\mathrm{QR}}(q)|=\frac{q-1}{2}=|\mathop{\mathrm{QNR}}(q)|\).
As a consequence of the previous theorem, we obtain some well-known properties of quadratic residues and non-residues over \(\mathbb{F}_q\).
Theorem 2. Let \(a,b \in \mathbb{F}_q ^*\). Then,
\(\chi(ab)=\chi(a)\chi(b)\), so the product of two quadratic residues or two quadratic non-residues is a quadratic residue, whereas the product of a residue and a non-residue gives a non-residue.
\(\chi(a^{-1}) = \chi(a) ^{-1}\), so \(a\) is a residue quadratic if and only if its inverse is a residue quadratic.
\(\chi(a^n) = \chi(a) ^n\).
As noticed in [19], for \(q=p\) a odd prime and \(c \in \mathbb{F}_p ^*\), the quadratic character \(\chi(c)\) coincides with the Legendre Symbol \(\left(\frac{c}{p}\right)\).
In this section, we investigate the class of matrices known as Generalized Weighing-Hadamard matrices. This family emerges as a natural synthesis of two fundamental structures in combinatorial design theory: the classical Hadamard matrices [1], [6], characterized by their orthogonal rows, and the weighing matrices discussed in [12], [13], which relax the entry constraints while preserving a specific inner product property. First, we recall the classic definition of this family of matrices.
Definition 3. A Hadamard matrix* \(H\) of order \(n\) is a square matrix with entries in \(\{+1, -1\}\) such that \(H H^T = n I_n.\) A weighing matrix \(W\) of order \(n\) and weight \(w\) is a square matrix with entries in \(\{ -1, 0, 1 \}\) such that \(W W^T = w I_n.\)*
Now, we are ready to introduce the definition of Generalized Weighing-Hadamard matrix, the main concept of this work.
Definition 4. Let \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) a matrix of order \(n\). We say \(H\) is a Generalized Weighing-Hadamard matrix, or GWH matrix, if there exists an element \(w \in \mathbb{F}_q\) such that \[HH^{T} = w I_n,\] where \(w\) is called the weight* of the GWH matrix.*
GWH matrices are related to what is known in the literature as \(\lambda\)-orthogonal matrices. If a GWH matrix satisfies that \(HH^T=H^TH=wI_n\), then it is known as a \(\lambda\)-orthogonal matrix. These are used in the construction of MDS, LCD, isodual, and self-dual codes [20]. Observe that, if we consider GWH matrices with entries in \(\{-1,0,1\}\), then we have weighing matrices [13]. Moreover, in the case \(w=n\) we obtain the Hadamard matrix if the entries are in \(\{-1,1\}\); and, if we work over \(\mathbb{F}_p\) we get the Hadamard-type matrices given in [15], [16]. If \(w=1\) then we have an orthogonal matrix, which is a matrix \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) such that \(HH^{T}=I_n\).
We now show that, under some conditions, GWH matrices always exist. More precisely, we prove one of the main results of this paper: there exists a GWH matrix \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) of weight \(w\) if and only if \(w\) is a quadratic residue or \(n\) is even. Before proving this result, we establish a couple of preliminary lemmas that will be needed in the proof.
Lemma 1. [21]Any element \(w \in \mathbb{F}_q\) can be expressed as \(w = x^2 + y^2,\) with \(x,y \in \mathbb{F}_q\).
Lemma 2. Let \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) be a GWH matrix of weight \(w\). Then \(\det(H)^2 = w^n\).
Proof. \(\det(H)^2 = \det(H) \det(H^T) = \det(HH^T) = \det(wI_n) = w^n\). ◻
Theorem 3 (Existance of GWH matrices). There exists a GWH matrix \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) of weight \(w\) if and only if \(w\) is a quadratic residue or \(n\) is even.
Proof. Suppose that \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) is a GWH matrix of weight \(w\).
By Lemma 2, we have \(\det(H)^2 = w^n.\) Since \(\det(H) \in \mathbb{F}_q\), it follows that \(w^n\) must be a square in \(\mathbb{F}_q\), and, therefore, \(w^n\) is a quadratic residue. Assume now that \(w\) is a quadratic non-residue and that \(n\) is odd. Then, from Theorem 2 \[\chi(w^n) = \chi(w)^n = (-1)^n = -1.\] It means that \(w^n\) is a quadratic non-residue, which is a contradiction. Hence, \(w\) is a quadratic residue or \(n\) is even.
Now, suppose that \(w\) is a quadratic residue or \(n\) is even.
If \(w\) is a quadratic residue, then \(H = \sqrt{w} I_n\) is clearly a GWH matrix of weight \(w\).
If \(n\) is even, suppose that \(n=2k\) for some positive integer \(k\). Lemma 1 implies that \(w = a^2+b^2\), for some \(a,b \in \mathbb{F}_q\). So, consider the matrix \[M = \left[ \begin{array}{rr} a & -b \\ b & a \end{array} \right],\] then \[MM^T = \left[ \begin{array}{cc} a^2+b^2 & 0 \\ 0 & a^2+b^2 \end{array} \right] = (a^2+b^2) I_2 = w I_2.\] Therefore, \(M\) is a GWH matrix of weight \(w\) of order \(2\). The result follows considering the block matrix \[H = M \otimes I_k = \begin{bmatrix} M \\ & M \\ && \ddots \\ &&& M \end{bmatrix} \in \mathsf{Mat}_{2k}(\mathbb{F}_q).\] ◻
In particular, in fields of characteristic 2, there always exists a GWH matrix for any possible order and weight.
Corollary 1. Let \(\mathbb{F}_q\) be a finite field of characteristic \(2\) and let \(w \in \mathbb{F}_q\). Then, there always exists a matrix \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) such that \(HH^{T} = w I_n.\)
Proof. It is an immediate consequence of the Frobenius automorphism, since any element of a finite field \(\mathbb{F}_q\) of characteristic \(2\) is a quadratic residue. ◻
Notice that Theorem 4 and Corollary 1 of [16] are particular cases of the previous theorem; the case \(w = n\) corresponds to the classical notion of a Hadamard-type matrix in the sense of authors in [16]. We generalize those results in the following corollary.
Corollary 2 (Existence of Hadamard-type matrices). There exists a Hadamard-type matrix \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) of weight \(n\) if, and only if, \(n\) is a quadratic residue or \(n\) is even.
In this section, we introduce some properties and constructions of the GWH matrices. The first important result is that the product of GWH matrices is again a GWH matrix.
Theorem 4. Let \(H_1,\ldots, H_m \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) be GWH matrices of weight \(w_i\), for \(i=1, \ldots, m\), respectively. Then, the product \(P_m=\prod_{i=1}^{m}H_i\) is a GWH matrix of weight \(\prod_{i=1}^{m}w_i\).
Proof. We prove it by induction on \(m\). When \(m=1\), the result is trivial. Assume \[P_{m-1} P_{m-1}^{T} = \left(\prod_{i=1}^{m-1} w_i\right) I_n.\] Let \(P_m = P_{m-1} H_m\). Then \[P_m P_m^{T} = P_{m-1} H_m (P_{m-1} H_m)^{T}= P_{m-1} H_m H_m^{T} P_{m-1}^T.\] Using \(H_m H_m^{T} = w_m I_n\), we get \[P_m P_m^{T} = w_m \, P_{m-1} P_{m-1}^{T} = \left(\prod_{i=1}^{m} w_i\right) I_n.\] ◻
As an immediate consequence of Theorem 4, we have the following corollaries.
Corollary 3. Let \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) be a GWH matrix of weight \(w\) and let \(\alpha \in \mathbb{F}_q\) be an arbitrary element. Then \(\alpha H\) is a GWH matrix of weight \(\alpha^2 w\).
Proof. This result is an immediate consequence of Theorem 4 and the fact that the matrix \(\alpha I_n \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) is a GWH matrix of weight \(\alpha^2\). ◻
Corollary 4. Consider \(A,B \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) orthogonal matrices and \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) a GWH matrix of weight \(w\). Then, \(AHB\) is a GWH matrix of weight \(w\).
Proof. The proof is a consequence of Theorem 4 and the fact that orthogonal matrices are GWH of weight 1. ◻
Next corollary is an immediate consequence of Corollary 3.
Corollary 5. Let \(w\) be a quadratic residue.
If \(A \in \mathsf{Mat}_n(\mathbb{F}_q)\) is an orthogonal matrix, then \(H = \sqrt{w} A\) is GWH matrix of weight \(w\).
Let \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) be a GWH matrix of weight \(w \neq 0\). Then, \(\frac{1}{\sqrt{w}} H\) is a orthogonal matrix, and hence, a GWH matrix of weight \(1\).
Since the class of GWH matrices is closed under matrix multiplication, it is natural to investigate whether it is also closed under addition. The following theorem shows that this requires additional conditions.
Theorem 5. Let \(H_1,\ldots, H_m \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) be GWH matrices of weight \(w_i\), for \(i=1, \ldots, m\), respectively, such that \(H_iH_j^T=-H_jH_i^T\), \(i\not = j\). Then, the sum \(S_m=\sum_{i=1}^{m}H_i\) is a GWH matrix of weight \(\sum_{i=1}^{m}w_i\).
Proof. We prove it by induction on \(m\). When \(m=1\), it is trivial. Assume the result holds for \(m-1\), i.e., \[S_{m-1} S_{m-1}^{T} = \left(\sum_{i=1}^{m-1} w_i\right) I_n.\] Let \(S_m = S_{m-1} + H_m\). Then \[S_m S_m^{T}= ( S_{m-1} + H_m)( S_{m-1} + H_m)^T = S_{m-1} S_{m-1}^{T} + S_{m-1} H_m^{T} + H_m S_{m-1}^{T}+ H_m H_m^{T}.\] By the inductive hypothesis and since \(H_m H_m^{T} = w_m I_n\), we have \[S_m S_m^{T}= \left(\sum_{i=1}^{m} w_i\right) I_n + S_{m-1} H_m^{T} + H_m S_{m-1}^{T}.\] Now, \[S_{m-1}H_m^{T} +H_m S_{m-1}^{T} =\left(\sum_{i=1}^{m-1}H_i\right) H_m^{T} + H_m\left(\sum_{i=1}^{m-1}H_i\right)^T = \sum_{i=1}^{m-1} \big( H_i H_m^{T} + H_m H_i^{T} \big) = O.\] Therefore, \[S_m S_m^{T} = \left(\sum_{i=1}^{m} w_i\right) I.\] ◻
Next examples show some sets of matrices satisfying the conditions of Theorem 5.
Example 1. Let \(\mathbb{F}_q\) be an arbitrary finite field. Consider the set of symmetric Pauli matrices [8], which are related to quantum information theory, \[X = \left[ \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right]\text{and}Z = \left[ \begin{array}{cc} 1 & 0 \\ 0 & -1 \end{array} \right].\] It is easy to check that \(XX^T = ZZ^T = I_2\) and \(XZ^T = -ZX^T\). Hence, \(X\) and \(Z\) are GWH matrices of weight 1. Moreover, \(X + Z\) is a GWH matrix of weight 2.
Example 2. Let \(\mathbb{F}_q\) be an arbitrary finite field and let \(i = \sqrt{-1}\). Consider the set of symmetric Eddington matrices [22] over the extension field \(\mathbb{F}_q(i)\), \[\begin{align} E_1 & = \begin{bmatrix} 0 & i & 0 & 0 \\ i & 0 & 0 & 0 \\ 0 & 0 & 0 & i \\ 0 & 0 & i & 0 \end{bmatrix}, & E_2 & = \begin{bmatrix} i & 0 & 0 & 0 \\ 0 & -i & 0 & 0 \\ 0 & 0 & i & 0 \\ 0 & 0 & 0 & -i \end{bmatrix}, & E_3 & = \begin{bmatrix} 0 & 0 & 0 & i \\ 0 & 0 & -i & 0 \\ 0 & -i & 0 & 0 \\ i & 0 & 0 & 0 \end{bmatrix}. \end{align}\] These matrices satisfy \(E_rE_r^T = -I_3\) for \(r \in \{ 1,2,3 \}\) and \(E_rE_s^T = -E_sE_r^T\) for \(r,s \in \{ 1,2,3 \}\), \(r \neq s\). Moreover, \(E_r+E_s\) is a GWH matrix of weight \(w = -2\) and \(E_1+E_2+E_3\) is a GWH matrix of weight \(-3\).
One of the most relevant consequences of Corollary 3 is the fact that GWH matrices of non-zero weight are non-singular. Another important result is the fact that the property of being GWH matrix is preserved after transposition for non-singular GWH matrices.
Theorem 6. Let \(H\in \mathsf{Mat}_{n}(\mathbb{F}_q)\) be a GWH matrix of weight \(w \neq 0\). Then, \(H\) is non-singular. Moreover, \(H^{-1}\) and \(H^{T}\) are GWH matrices of weight \(w^{-1}\) and \(w\), respectively.
Proof. Definition 4 implies that \(H^{-1} = w^{-1} H^T\), so \(H^T = wH^{-1}\). Thus, \[H^{-1} \left( H^{-1} \right)^T = H^{-1} \left( H^T \right)^{-1} = H^{-1} \left( wH^{-1} \right)^{-1} = w^{-1} H^{-1} H = w^{-1} I_n .\]
In addition, \(H^T (H^T)^T = H^T H = wH^{-1} H = wI_n\), and the result holds. ◻
Remark 1. Notice that if \(w=0\), the transpose \(H^T\) is not necessarily a GWH matrix of weight 0. For example, the matrix \(H= \left[ \begin{array}{cc} 1 &2 \\ 1&2 \end{array} \right]\) is a GWH matrix of weight 0 in \(\mathbb{F}_5\), since \[HH^T= \left[ \begin{array}{cc} 1 & 2\\ 1 & 2 \end{array} \right] \left[ \begin{array}{cc} 1 & 1\\ 2 & 2 \end{array} \right]= \left[ \begin{array}{cc} 0 & 0\\ 0 & 0 \end{array} \right].\] However, \[H^TH= \left[ \begin{array}{cc} 1 & 1\\ 2 & 2 \end{array} \right] \left[ \begin{array}{cc} 1 & 2\\ 1 & 2 \end{array} \right]= \left[ \begin{array}{cc} 2 & 4\\ 4 & 3 \end{array} \right].\]
Now, as consequence of Theorems 4 and 6, we have the following result.
Corollary 6. Let \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) be a GWH matrix of weight \(w\not=0\). The matrix \(H ^m\), for \(m\in\mathbb{Z},\) is a GWH matrix of weight \(w^m\).
We now show that the class of GWH matrices is closed under the action of the automorphism group of \(\mathbb{F}_{q^r}\). Recall that any automorphism on \(\mathbb{F}_{q^r}\) is a power of the Frobenius automorphism on \(\mathbb{F}_{q^r}\).
Theorem 7. Let \(H = [h_{ij}] \in \mathsf{Mat}_{n}(\mathbb{F}_{q^r})\) be a GWH matrix of weight \(w\) and \(\sigma\) an automorphism on \(\mathbb{F}_{q^r}\). Then \(\sigma(H) = [\sigma(h_{ij})] \in \mathsf{Mat}_{n}(\mathbb{F}_{q^r})\) is a GWH matrix of weight \(\sigma(w)\).
Proof. Due to the fact that \(\sigma\) is an automorphism, we have that \[\sigma({H})\sigma({H})^{T}=\sigma({H})\sigma({H}^{T})=\sigma({HH^{T}})=\sigma(wI)=\sigma(w)\sigma(I)=\sigma(w)I.\] ◻
The following result introduces a construction of larger GWH matrices by applying the Kronecker product to a given collection of them.
Theorem 8. Let \(H_i \in \mathsf{Mat}_{n_i}(\mathbb{F}_q)\), for \(i=1,2,\ldots,m\), be GWH matrices with weights \(w_i\), respectively. Then, the Kronecker product \(H_1 \otimes H_2 \otimes \cdots \otimes H_m\) is a GWH matrix of order \(n_1n_2\cdots n_m\) and weight \(w_1w_2\cdots w_m\).
Proof. From the properties of the Kronecker product, we have that \[\begin{align} (H_1\otimes H_2\otimes \cdots \otimes H_m)(H_1\otimes H_2\otimes \cdots \otimes H_m)^T & = (H_1\otimes H_2 \otimes \cdots \otimes H_m)(H_1^T\otimes H_2^T \otimes \cdots \otimes H_m^T)\\ & = (H_1 H_1^T) \otimes (H_2 H_2^T) \otimes \cdots \otimes (H_m H_m^T)\\ &= \left[ (w_1 I_{n_1}) \otimes (w_2 I_{n_2}) \otimes \cdots \otimes (w_m I_{n_m})\right] \\ & = w_1 w_2 \cdots w_m I_{n_1n_2\cdots n_m} \end{align}\] ◻
As a consequence of the previous theorem, we have the following result.
Corollary 7. If \(H \in \mathsf{Mat}_n(\mathbb{F}_q)\) is a GWH matrix of weight \(w\), then the matrix \[\underbrace{H \otimes H \otimes \cdots \otimes H}_{\text{m copies}}\] is a GWH matrix of order \(n^m\) and weight \(w^m\).
The Hadamard product of two matrices \(A=[a_{ij}]\), \(B=[b_{ij}]\) of order \(n\), denoted by \(A \odot B\), is the element-wise product of the matrices. More precisely, it is defined by \[A \odot B = [a_{ij} b_{ij}].\] The Hadamard product is defined only for matrices of the same size and differs from the standard matrix product, since it does not involve summation over indices. The property of being GWH matrix is not preserved after the Hadamard product, as we show in the next example.
Example 3. Consider \(H_1, H_2 \in \mathsf{Mat}_{2}(\mathbb{F}_5)\) GWH matrices of weight \(2\) given by \[\begin{align} H_1 & = \left[ \begin{array}{cc} 1 & 1 \\ 1 & 4 \end{array} \right], \quad H_2 = \left[ \begin{array}{cc} 4 & 4 \\ 4 & 1 \end{array} \right]. \end{align}\] Their Hadamard product is \[H_1 \odot H_2 = \left[ \begin{array}{cc} 1 & 1 \\ 1 & 4 \end{array} \right] \odot \left[ \begin{array}{cc} 4 & 4 \\ 4 & 1 \end{array} \right] = \left[ \begin{array}{cc} 4 & 4 \\ 4 & 4 \end{array} \right],\] which is not a GWH matrix since \[(H_1 \odot H_2)(H_1 \odot H_2)^T = \left[ \begin{array}{cc} 4 & 4 \\ 4 & 4 \end{array} \right] \left[ \begin{array}{cc} 4 & 4 \\ 4 & 4 \end{array} \right]^T = \left[ \begin{array}{cc} 2 & 2 \\ 2 & 2 \end{array} \right].\]
So far, we have discussed methods to derive GWH matrices through operations such as the product of GWH matrices, the sum of GWH matrices under specific restrictions, and the Kronecker product, we now shift our focus to the explicit construction of specific families of these matrices.
Theorem 9. Let \(H \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) be a GWH matrix of weight \(w\) and \(V \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) a matrix such that \(VV^T = \mathop{\mathrm{diag}}(\lambda_1,\lambda_2,\ldots,\lambda_n)\), where all \(\lambda_i\) are non-zero quadratic residues, for \(i=1,2,\ldots, n\). Consider the matrix \[D := \mathop{\mathrm{diag}}\left( \sqrt{\lambda_1^{-1}}, \sqrt{\lambda_2^{-1}}, \ldots, \sqrt{\lambda_n^{-1}} \right).\] Then, \(DVH\) and \(HDV\) are GWH matrices of weight \(w\).
Proof. Notice that \(VV^T=(D^{-1})^2\). Then, \[\left(DVH \right) \left(DVH \right)^T = DVHH^TV^T D ^T = w DVV^TD = w D(D^{-1})^2D = wI_n.\] Analogously, \(\left(HDV \right) \left(HDV \right)^T=wI_n\). ◻
Observe that Corollary 4 is also a consequence of Theorem 9, where \(\lambda_i = 1\) for all \(i=1,2,\ldots,n\). The next example illustrates Theorem 9.
Example 4. Let \(H= \left[\begin{array}{ccc} 1&2&2 \\ 2&1&3 \\ 2&3&1 \\ \end{array} \right]\in \mathsf{Mat}_{3} \left(\mathbb{F}_{5}\right)\) be a GWH matrix of weight \(w=4\) and \(V= \left[\begin{array}{ccc} 1&1&2 \\ 2&4&2 \\ 4&2&2 \\ \end{array} \right]\in\mathsf{Mat}_{3} \left(\mathbb{F}_{5}\right)\). Notice that \(VV^T=\mathop{\mathrm{diag}}(1,4,4)\) whose its entries are all quadratic residues, so consider \(D=\mathop{\mathrm{diag}}(1,2,2) \in \mathsf{Mat}_{3} \left(\mathbb{F}_{5}\right)\). Then, \[DVH= \left[\begin{array}{ccc} 2&4&2 \\ 3&3&1 \\ 4&2&2 \\ \end{array} \right]andHDV= \left[\begin{array}{ccc} 0&0&3 \\ 0&2&0 \\ 2&0&0 \\ \end{array} \right]\] are both GWH matrices of weight 4.
The next theorems give us some methods to construct new GWH matrices of higher order starting with smaller ones.
Theorem 10. Let \(w\neq 0\) and \(w_i \neq 0\) be arbitrary elements of \(\mathbb{F}_q\) such that \(\chi(w)=\chi(w_i)\), for \(i=1,2, \ldots,m\). Define \(v_i:=w w^{-1}_i\). If \(H_1, H_2, \ldots, H_m\) are GWH matrices of order \(n_i\) and weights \(w_i\), respectively, then \[H=\left[ \begin{array}{cccc} \sqrt{v_1}H_1 & & & \\ & \sqrt{v_2}H_2 & & \\ & & \ddots &\\ & & &\sqrt{v_m}H_m\\ \end{array} \right],\] is a GWH matrix of order \(n_1+n_2+\cdots+n_m\) and weight \(w\).
Proof. We have that \[\begin{align} HH^{T}& = \left[ \begin{array}{cccc} \sqrt{v_1}H_1 & & & \\ & \sqrt{v_2}H_2 & & \\ & & \ddots &\\ & & &\sqrt{v_m}H_m\\ \end{array} \right]\left[ \begin{array}{cccc} \sqrt{v_1}H_1^T & & & \\ & \sqrt{v_2}H_2^T & & \\ & & \ddots &\\ & & &\sqrt{v_n}H_m^T\\ \end{array} \right]\\ &= \left[ \begin{array}{cccc} v_1H_1H_1^T & & &\\ & v_2H_2H_2^T & & \\ & & \ddots &\\ & & &v_mH_mH_m^T\\ \end{array} \right] = \left[ \begin{array}{cccc} v_1w_1I_{n_1} & && \\ & v_2w_2I_{n_2} && \\ & & \ddots &\\ & & &v_mw_mI_{n_m}\\ \end{array} \right]\\ & =wI_{n_1+n_2+\cdots+n_m} \end{align}\] ◻
Theorem 11. Let \(H_1, H_2, H_3 \in \mathsf{Mat}_n(\mathbb{F}_q)\) be GWH matrices such that \(H_1\) and \(H_3\) have weight \(w \neq 0\), while \(H_2\) has weight \(w' \neq 0\). Then \[H=\left[ \begin{array}{cccc} H_1 & H_2 \\ -\frac{1}{w} H_3 H_2^T H_1 & H_3 \end{array} \right],\] is a GWH matrix of order \(2n\) and weight \(w+w'\).
Proof. \[\begin{align} HH^T & = \left[ \begin{array}{cccc} H_1 & H_2 \\ -\frac{1}{w} H_3 H_2^T H_1 & H_3 \end{array} \right] \left[ \begin{array}{cccc} H_1^T & -\frac{1}{w} H_1^T H_2 H_3^T \\ H_2^T & H_3^T \end{array} \right] \\ & = \left[ \begin{array}{cccc} H_1H_1^T + H_2H_2^T & O \\ O & \frac{1}{w^2} (H_3H_2^TH_1)(H_3H_2^TH_1)^T + H_3H_3^T \end{array} \right] \\ & = \left[ \begin{array}{cccc} (w+w') I_n & O \\ O & (\frac{w^2w'}{w^2} + w) I_n \end{array} \right] = (w+w') \left[ \begin{array}{cccc} I_n & O \\ O & I_n \end{array} \right]. \end{align}\] ◻
In the next theorem, we aim to construct a triangular version of Theorem 11. However, to ensure that the blocks are non-zero, the matrices must have weight 0, as shown below.
Theorem 12. Let \(H_1, H_2, H_3 \in \mathsf{Mat}_n(\mathbb{F}_q)\) be non-zero GWH matrices of weights \(w_1, w_2,\) and \(w_3\), respectively. The block matrix \[H= \begin{bmatrix} H_1 & H_2\\ O& H_3 \end{bmatrix}\] is a GWH matrix if and only if \(H_2H_3^T=O\) and \(w_1=w_2=w_3=0\). As a consequence, \(H\) is also a GWH matrix of weight 0.
Proof. We have that \[\label{eq:triangular95block95matrix} HH^T= \begin{bmatrix} H_1 & H_2\\ O & H_3 \end{bmatrix} \begin{bmatrix} H_1^T & O\\ H_2^T & H_3^T \end{bmatrix} = \begin{bmatrix} H_1H_1^T + H_2H_2^T & H_2H_3^T\\ H_3H_2^T & H_3H_3^T \end{bmatrix}.\tag{1}\] Since \(H_1,H_2,H_3\) are GWH matrices, we have \[H_1H_1^T=w_1I_n,\qquad H_2H_2^T=w_2I_n,\qquad H_3H_3^T=w_3I_n.\] Hence, \[HH^T= \begin{bmatrix} (w_1+w_2)I_n & H_2H_3^T\\ H_3H_2^T & w_3I_n \end{bmatrix}.\] For the direct implication, suppose that \(H\) is a GWH matrix. Then, it must be satisfied that \[w_3 = w_1+w_2, \quad H_3H_2^T = O, \quad H_2H_3^T = O.\] Now, observe that \[O = H_2^T (H_2H_3^T) = (H_2^TH_2) H_3^T = w_2H_3^T,\] so if \(w_2\not = 0\) then \(H_3^T=O\), which is a contradiction. Necessarily, \(w_2=0\). Analogously, \[O = (H_2H_3^T)H_3 = H_2(H_3^TH_3) = w_3H_2,\] so if \(w_3 \neq 0\) then, \(H_2=O\), which is again a contradiction. Necessarily \(w_3=0\), and therefore \(w_1=w_3-w_2=0\).
For the converse implication, suppose that \(w_1=w_2=w_3=0\) and \(H_2H_3^T=O\). Thus, \(H_1H_1^T = H_2H_2^T = H_3H_3^T = O\). Notice also that \(H_2H_3^T=O\) implies \(H_3H_2^T=O\). From these facts it is easy to check that \(HH^T=O\) by looking at 1 . ◻
The next example shows that there exist matrices satisfying the conditions of the previous theorem.
Example 5. Consider the block matrix over \(\mathbb{F}_5\) given by \[H= \left[ \begin{array}{c|c} H_1 & H_2 \\\hline O & H_3 \end{array} \right] = \left[ \begin{array}{cc|cc} 3 & 4 & 2 & 1\\ 3 & 4 & 2 & 1\\\hline 0 & 0 & 2 & 1 \\ 0 & 0 & 2 & 1 \end{array} \right],\] Observe that the matrices \(H_i\), for \(i=1,2,3\), are GWH of weight \(0\). It is easy to check that \(HH^T=O\).
We now present constructions of circulant and bordered circulant GWH matrices. These constructions provide a systematic way to generate large families of examples with prescribed orthogonality properties.
Theorem 13. A circulant matrix \(C=\mathop{\mathrm{circ}}(c_0,c_1,\ldots, c_{n-1}) \in \mathsf{Mat}_n(\mathbb{F}_q)\) is a GWH matrix of weight \(w\) if and only if the following conditions hold:
\(\sum_{k=0}^{n-1} c_k^2 = w\), and
\(\sum_{k=0}^{n-1} c_k c_{k+d} = 0\) for all \(d=1,\ldots,\left\lfloor\frac{n}{2}\right\rfloor\).
Proof. Since \(C\) is circulant then \(C^T\) is circulant, and hence \(D=CC^T\) is also circulant. Thus, it suffices to describe only the first row of \(D\) in order to determine all its entries. Let \(D= \mathop{\mathrm{circ}}(d_0 , d_1 ,\ldots, d_{n-1})\). Then \[d_\ell = \sum_{j=0}^{n-1} c_j \, c_{j+\ell},\] for each \(\ell \in \{0, 1, \ldots, n-1\}\), where the indices are taken modulo \(n\). Indeed, for any \(0 \le j \le n-1\), each term \(c_jc_{j+r}\) appearing in \(d_r\) also appears in \(d_{n-r}\). In fact, the \((j+r+1 \pmod n)\)-th term of \(d_{n-r}\) is \[c_{j+r}c_{j+r+n-r}=c_{j+r}c_j=c_jc_{j+r},\] which coincides with the \((j+1 \pmod n)\)-th term of \(d_r\). Consequently, \[d_1 = d_{n-1},\quad d_2 = d_{n-2},\quad \ldots,\quad d_{\left\lfloor \frac{n}{2}\right\rfloor} = d_{\left\lceil \frac{n}{2}\right\rceil}.\] Therefore, \(C\) is a GWH matrix of weight \(w\), that is, \(D=CC^T = wI_n,\) if and only if the following conditions hold for every \(0 \le k \le n-1\),
\(\sum_{k=0}^{n-1} c_k^2 = w\), and
\(\sum_{k=0}^{n-1} c_k c_{k+d} = 0\) for all \(d=1,\ldots,\left\lfloor\frac{n}{2}\right\rfloor\).
◻
Based on Theorem 13, families of circulant matrices provide a rich source of GWH matrices with explicit computational advantages, since all rows of a circulant matrix have the same norm and it suffices to verify the orthogonality of the first row with the next \(\left\lfloor \frac{n}{2}\right\rfloor\) rows.
Example 6. Consider the following circulant matrix \[C= \mathop{\mathrm{circ}}(0,1,2,2,4)= \begin{bmatrix} 0 & 1 & 2 & 2 & 4\\ 4 & 0 & 1 & 2 & 2\\ 2 & 4 & 0 & 1 & 2\\ 2 & 2 & 4 & 0 & 1\\ 1 & 2 & 2 & 4 & 0 \end{bmatrix}\in \mathsf{Mat}_{5}(\mathbb{F}_7).\] Since \[w=d_0=\sum_{i=0}^{4} c_i^2 =4, \qquad d_1=\sum_{i=0}^{4} c_i c_{i+1}=0, \qquad d_2=\sum_{i=0}^{4} c_i c_{i+2}=0,\] it follows that \(D=CC^T=4I_5.\) Hence, \(C\) is a GWH matrix of weight \(4\).
Definition 5. A matrix \(A\) is bordered circulant if it is of the form \[A=\begin{bmatrix} \alpha & \beta & \beta & \cdots & \beta \\ \gamma & & & & \\ \vdots & & & C & \\ \gamma & & & & \end{bmatrix},\] where \(C\) is a circulant matrix.
Bordered double circulant constructions play an important role in the construction of isodual codes [23], meaning that the code is equivalent to its dual under a suitable transformation. This property is of special interest in the study of self-orthogonal and LCD codes, as well as in applications to cryptography and quantum error-correcting codes, where duality constraints are essential.
Theorem 14. A bordered circulant matrix \[A=\begin{bmatrix} \alpha & \beta & \beta & \cdots & \beta \\ \gamma & & & & \\ \vdots & & & C & \\ \gamma & & & & \end{bmatrix},\] where \(C=\mathop{\mathrm{circ}}(c_0,c_1, \ldots, c_{n-1})\), is GWH of weight \(w\) if and only if the following properties are satisfied:
\(w=\alpha^{2}+n\beta^{2}\),
\(\alpha\gamma+\beta \sum_{i-0}^{n-1}c_i=0,\) and
\(CC^{T}=wI_{n}-\gamma^{2}J\), where \(J\) is the \(n\times n\) all-one matrix.
Proof. Let us denote by \(s=\sum_{i=0}^{n-1}c_i\) the sum of each row of \(C\) and by \(J\) the \(n\times n\) all-one matrix. Then \[\begin{align} AA^{T} & = \begin{bmatrix} \alpha^2+n\beta^2 &\alpha\gamma+\beta s &\alpha\gamma+\beta s &\cdots &\alpha\gamma+\beta s\\ \alpha\gamma+\beta s & &\\ \alpha\gamma+\beta s & &\multirow{4}{*}{CC^T+\gamma^2J} \\ \vdots & & \\ \alpha\gamma+\beta s && \end{bmatrix}. \end{align}\] Thus, \(AA^T = wI_{n+1}\) for some \(w \in \mathbb{F}_q\), if and only if the following conditions hold: \[\begin{align} \alpha^{2}+n\beta^{2} & = w, \\ \alpha\gamma + \beta s & = 0, \\ CC^{T} + \gamma^{2}J & = wI_{n}, \end{align}\] or equivalently, if and only if, conditions a), b) and c) of the theorem hold. ◻
Corollary 8. Let \(\alpha\in \mathbb{F}_q ^*\), \(\gcd(n+1,q)=1\), \(C=\mathop{\mathrm{circ}}(c_0,c_1,\ldots,c_{n-1})\) and consider \[M = \left[\begin{array}{cccc} \alpha & \alpha & \cdots & \alpha \\ \alpha &&& \\ \vdots && C & \\ \alpha &&& \end{array}\right] \in \mathsf{Mat}_{n+1}(\mathbb{F}_q).\] Then, \(M\) is GWH matrix of weight \(w\not = 0\) if and only if
\((n+1)\alpha^2 =w\),
\(\sum_{k=0} ^{n-1} c_k =-\alpha\)
\(CC^T=wI_n-\alpha^2J_n\), where \(J_n\) denotes the all-one matrix of order \(n\).
Remark 2. Assume that the matrix \(M\) in Corollary 8 is a GWH matrix.
If \(\gcd(n+1,q)\not=1\) or \(\alpha=0\), then the matrix \(M\) is of weight \(w=0\).
Note that, in the particular case where \(q\) is prime, \(\alpha=1\), and \(c_{1}=c_{2}=\cdots=c_{n-1}\), the matrix \(M\) in Corollary 8 is a Standard-form Cyclic H-type matrix as defined in [16]. In this case, \(MM^T=(n+1)I_{n+1}\), that is, \(M\) is a GWH matrix of weight \(n+1\) and order \(n+1\).
Example 7. Let us construct a GWH matrix of weight \(4\) over \(\mathbb{F}_{11}\). Consider the values \(\alpha = 10\) and \(C = \mathop{\mathrm{circ}}(10,1,1)\). It holds: \[(n+1)\alpha^2 = 4 \cdot 10^2 = 4,\] \[\sum_{k=0}^{n-1} c_k = 10+1+1 = -10.\] Moreover, \[CC^T = \begin{bmatrix} 10 & 1 & 1 \\ 1 & 10 & 1 \\ 1 & 1 & 10 \end{bmatrix} \begin{bmatrix} 10 & 1 & 1 \\ 1 & 10 & 1 \\ 1 & 1 & 10 \end{bmatrix} = \begin{bmatrix} 3 & 10 & 10 \\ 10 & 3 & 10 \\ 10 & 10 & 3 \end{bmatrix}\] and \[wI_n-\alpha^2 J_n = \begin{bmatrix} 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \end{bmatrix} - 1 \cdot \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} = \begin{bmatrix} 3 & 10 & 10 \\ 10 & 3 & 10 \\ 10 & 10 & 3 \end{bmatrix}.\] Since \(CC^T = wI_n - \alpha^2 J_n\), the matrix \[H = \begin{bmatrix} 10 & 10 & 10 & 10 \\ 10 & 10 & 1 & 1 \\ 10 & 1 & 10 & 1 \\ 10 & 1 & 1 & 10 \end{bmatrix}\] is a GWH matrix of weight \(w = 4\).
In this section, we define two binary relations between GWH matrices based on Corollary 4. We show that GWH matrices of the same non-zero weight are equivalent. We study the quotient defined by the equivalence relation and show that it has interesting algebraic properties.
Definition 6. Consider \(H, K \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) GWH matrices. We say that \(H\) is GWH-equivalent* to \(K\), denoted by \(H \sim K\), if there exist orthogonal matrices \(P, Q \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) such that \(K = PHQ\). In addition, we say that \(H\) is strongly GWH-equivalent to \(K\), denoted by \(H \sim_{s} K\), if there exist an orthogonal matrix \(Q \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) such that \(K = HQ\).*
Observe that both the GWH-equivalence and strongly GWH-equivalence are equivalence relations. Moreover, strongly GWH-equivalence implies GWH-equivalence as we can take \(P=I_n\). In particular, since \(P\) and \(Q\) are invertible, GWH-equivalent matrices are also equivalent in the classical sense of matrices. Recall that two matrices of the same size are equivalent if and only if they have the same rank [24], so it follows that the rank remains invariant under the GWH-equivalence.
Example 8. Consider the matrices \[H= \left[\begin{array}{ccc} 3& 0& 0\\ 0 &9 & 4\\ 0&7&9 \end{array} \right]\quad \text{and}\quad K= \left[\begin{array}{ccc} 0 & 4 & 9\\ 0 & 9 & 7\\ 3 & 0 & 0\\ \end{array} \right].\] Both matrices are GWH of weight 9 over \(\mathbb{F}_{11}\). It is easy to check that \(K=PHQ\), where \(P\) and \(Q\) are the orthogonal matrices \[P = \left[ \begin{array}{ccc} 0 & 1 & 0\\ 0 & 0 & 1\\ 1 & 0 & 0\\ \end{array} \right], \quad Q = \left[ \begin{array}{ccc} 1 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0\\ \end{array} \right].\] Therefore, \(H\sim K\).
Corollary 4 shows that the GWH-equivalence and the strongly GWH-equivalence preserve the weight. Moreover, when restricting our attention to non-zero weight GWH matrices, it turns out that the weight is precisely the key feature of these equivalence relations, as it is shown in the next theorem.
Theorem 15. Let \(H, K \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) GWH matrices of non-zero weights \(w_1, w_2\), respectively. Then, \(H\) and \(K\) are strongly GWH-equivalent if and only if \(w_1=w_2\).
Proof. Assume that \(H\) and \(K\) are GWH-equivalent. Corollary 4 implies that \(H\) and \(K\) have the same weight. i.e., \(w_1=w_2\). Now, suppose \(w=w_1=w_2\). Then, \(KK^T = wI_n = HH^T\), so \[K = (HH^T)(K^T)^{-1}= H(H^T(K^T)^{-1}).\] According to Theorem 6, \(H^T\) and \((K^T)^{-1}\) are GWH matrices of weight \(w\) and \(w^{-1}\), respectively. Now, Theorem 4 implies that \(H^T(K^T)^{-1}\) is a GWH matrix of weight \(ww^{-1}=1\), i.e., an orthogonal matrix. Hence, taking \(Q = H^T(K^T)^{-1}\), yields the result. ◻
The situation is very different if we consider GWH matrices of weight \(w=0\) since these matrices are not necessarily GWH-equivalent.
Example 9. Consider the matrices \[A= \begin{bmatrix} 1 & 1\\ 0 & 0 \end{bmatrix} \text{ and } B= \begin{bmatrix} 0 & 0\\ 0 & 0 \end{bmatrix}.\] Both are GWH matrices of weight \(0\) over \(\mathbb{F}_2\). However, there are no orthogonal matrices \(P,Q \in \mathsf{Mat}_{2}(\mathbb{F}_2)\) such that \(B=QAP\), since they have different ranks. It follows immediately that, since the matrices are not GWH-equivalent, they cannot be strongly GWH-equivalent.
In the rest of the section we focus on non-zero weight GWH matrices. Let us write \(\mathcal{GWH}_n(\mathbb{F}_q)^*\) to denote the set of all GWH matrices of order \(n\) over \(\mathbb{F}_q\) with weight \(w \neq 0\). The next theorem exhibits the algebraic structure of this set.
Theorem 16.
\(\mathcal{GWH}_n(\mathbb{F}_q)^*\) forms a group with the matrix multiplication.
The set of orthogonal matrices \(\mathcal{O}_n(\mathbb{F}_q)\) is a normal subgroup of \(\mathcal{GWH}_n(\mathbb{F}_q)^*\).
The quotient group is given by \[\mathcal{GWH}_n(\mathbb{F}_q)^*/\mathcal{O}_n(\mathbb{F}_q) \cong \begin{cases} \mathbb{F}_q^* & \text{ if n is even, } \\ \mathop{\mathrm{QR}}(q) & \text{ if n is odd. } \end{cases}\]
Proof.
Consider \(H \in \mathcal{GWH}_n(\mathbb{F}_q)^*\) and \(Q\in \mathcal{O}_n(\mathbb{F}_q)\). Then, Theorems 4 and 6 imply that \[(HQH^{-1})(HQH^{-1})^T=I_n\] Therefore, \(H \mathcal{O}_n(\mathbb{F}_q)H^{-1} \subseteq \mathcal{O}_n(\mathbb{F}_q)\) for any \(H \in \mathcal{GWH}_n(\mathbb{F}_q)^*\).
Consider \(f:\mathcal{GWH}_n(\mathbb{F}_q)^* \longrightarrow \mathbb{F}_q^*\) such that for any GWH matrix \(H\) of weight \(w \neq 0\), \(f(H)=w\). As a consequence of Theorem 4, \(f\) is a group homomorphism. Moreover, \(\ker{(f)}= \mathcal{O}_n(\mathbb{F}_q)\), so the First Isomorphism Theorem implies that \[\mathcal{GWH}_n(\mathbb{F}_q)^*/ \mathcal{O}_n(\mathbb{F}_q) \cong \mathop{\mathrm{Im}}{(f)}.\] From Theorem 3, we have \(\mathop{\mathrm{Im}}{(f)}=\mathbb{F}_q^*\) if \(n\) is even, or \(\mathop{\mathrm{Im}}{(f)}=\mathop{\mathrm{QR}}(q)\), otherwise.
◻
Observe that, while the group \(\mathcal{GWH}_n(\mathbb{F}_q)^*\) is not abelian, its quotient \(\mathcal{GWH}_n(\mathbb{F}_q)^*/ \mathcal{O}_n(\mathbb{F}_q)\) is. This behavior is quite uncommon in matrix group theory. Notice also that, from Definition 6, we have \[\mathcal{GWH}_n(\mathbb{F}_q)^* / \mathcal{O}_n(\mathbb{F}_q) = \mathcal{GWH}_n(\mathbb{F}_q)^* / \sim_{s}.\] The next theorem we provide canonical representatives of any equivalence class of the quotient group.
Theorem 17. Let \(H \in \mathcal{GWH}_n(\mathbb{F}_q)^*\) of weight \(w \neq 0\).
If \(n\) be an even number, then take \(a,b \in \mathbb{F}_q\) such that \(w=a^2+b^2\) and consider
\[\label{mat:R} R:= \left[ \begin{array}{rr} a & -b \\ b & a \end{array} \right] \otimes I_{\frac{n}{2}}.\qquad{(1)}\] Therefore, \(H \sim_s
R\).
If \(n\) be an odd number and \(w \in \mathop{\mathrm{QR}}(q)\), then consider \[\label{mat:D} D:= \sqrt{w}I_{n}.\qquad{(2)}\] It holds that \(H \sim_s D\).
Proof. As it was established in the proof of Theorem 3, the matrices \(R\) and \(D\) belong to \(\mathcal{GWH}_n(\mathbb{F}_q)^*\). Both results are an immediate consequence of Theorem 15 and Lemma 1. ◻
Notice that the canonical representatives exhibited in Theorem 17 are not unique in general, since equations \(x^2 + y^2 = w\) and \(x^2 = w\) can have multiple solutions.
Generalized Weighing-Hadamard matrices over finite fields are important algebraic structures with key applications in combinatorics and information theory [11]. Defined by the condition \(HH^T = wI_n\) over \(\mathbb{F}_q\), these matrices are closely related to coding theory and duality [20]. Specifically, the row-orthogonality of GWH matrices provides a straightforward framework for constructing linear codes, such as self-dual and complementary dual codes, which optimize error-correction efficiency [7]. Additionally, their structural uniformity makes them useful in digital communications for designing orthogonal spreading sequences [25] and in the design of cryptographic primitives [26]. In this section, we show briefly some possible constructions of linear codes employing GWH matrices.
Recall that an \([n,k]-\)linear code \(\mathcal{C}\) is a \(k\)-dimensional subspace of \(\mathbb{F}_q^n\). The dual code of \(\mathcal{C}\) is defined by \(\mathcal{C}^{\perp}=\{\text{\mathversion{bold}x} \in \mathcal{C}: \langle\text{\mathversion{bold}x},\text{\mathversion{bold}y}\rangle = 0 for all \text{\mathversion{bold}y} \in \mathcal{C}\}\), where \(\langle\text{\mathversion{bold}x},\text{\mathversion{bold}y}\rangle=\sum_{i=1}^nx_iy_i\) is the Euclidean inner product. Moreover, if \(\mathcal{C}\subset \mathcal{C}^{\perp}\), then \(\mathcal{C}\) is self-orthogonal; and if \(\mathcal{C}=\mathcal{C}^{\perp}\), then \(\mathcal{C}\) is self-dual. When a code \(\mathcal{C}\) satisfies \(\mathcal{C}\cap \mathcal{C}^{\perp} =\{\boldsymbol{0}\}\), it is called Linear Complementary Dual Codes (LCD). Self orthogonal codes and LCD codes have many applications in cryptography, communication systems, data storage, and quantum coding theory [27]–[30].
Theorem 18. [31] A linear code \(\mathcal{C}\) with generator matrix \(G\) is LCD if and only if \(GG^T\) is invertible.
The next results depict methods to construct self-orthogonal (self-dual) or LCD starting from a GWH matrix.
Theorem 19. Consider \(G \in \mathsf{Mat}_{n}(\mathbb{F}_q)\) a GWH matrix of weight \(w\) and for \(k<n\), the submatrix \(G_k \in \mathsf{Mat}_{k \times n}(\mathbb{F}_q)\) given by \(k\) arbitrary rows of \(G\).
If \(w=0\) and \(\mathop{\mathrm{rank}}(G_k)=k\), then \(G_k\) is a generator matrix of a self-orthogonal code. In particular, if \(n\) is even and \(k=\frac{n}{2}\), then \(G_k\) is a generator matrix of a self-dual code.
If \(w \neq 0\), then \(G_k\) is a generator matrix of a LCD code.
Proof. The proof is an immediate consequence of the fact that \(G_kG_k^T=wI_k.\) ◻
Theorem 20. Let \(A \in \mathsf{Mat}_{n-k}(\mathbb{F}_q)\) be a GWH matrix of weight \(w\) and, for \(k\leq n-k\), the submatrix \(A_k \in \mathsf{Mat}_{k \times (n-k)}(\mathbb{F}_q)\) given by the first \(k\) rows of \(A\). Consider \(\mathcal{C}\) an \([n,k]\)-linear code with generator matrix \(G = [I_k \;| \;A_{k}]\).
If \(w = -1\), then \(\mathcal{C}\) is a self-orthogonal code. In particular, if \(k=\frac{n}{2}\), then \(\mathcal{C}\) is self-dual.
If \(w \neq -1\), then \(\mathcal{C}\) is an LCD code.
Proof. It is an immediate consequence of the fact that \(GG^T= I+A_kA_k^T= (1+w)I_k.\) ◻
Theorem 3 provides gives a proof of next theorem, which is Theorem 4.1.12 of [3].
Theorem 21. Let \(\mathcal{C}\) be \([n,k]\) self-dual code over \(\mathbb{F}_q\) that admits a generator matrix in systematic form. Then either \(-1\) is a quadratic residue over \(\mathbb{F}_q\) or \(k\) is even.
Proof. If \(\mathcal{C}\) admits a generator matrix in systematic form, i.e., \(G = [I_k \mid A]\), then \(AA^T = -I_k\), so \(A \in \mathsf{Mat}_k(\mathbb{F}_q)\) is a GWH matrix of weight \(w = -1\). Theorem 3 implies that \(-1\) is a quadratic residue or \(k\) is even. ◻
In this work, we study the family of GWH matrices. These matrices generalize both classical Hadamard matrices and the \(H\)-type matrices introduced by Kojima.
We establish an existence theorem for GWH matrices and show that the invertible GWH matrices form a group under matrix multiplication. Moreover, we prove that the quotient of this group by the subgroup of orthogonal matrices is abelian. We also introduce a notion of equivalence for GWH matrices and provide several constructions. In particular, we present a construction of circulant GWH matrices. We also show how they can be used to construct self-orthogonal, self-dual and LCD codes.
As future work, we intend to investigate non-square GWH matrices, their applications to coding theory and cryptography, and possible extensions of these constructions over rings. In particular, we plan to study further connections between LCD codes and GWH matrices in the construction of quantum error-correcting codes.
The first author was supported by project FAPEMIG RED-00133-21. The work of the third author was financed in part by the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) - Process Number 405842/2023-6 and by the São Paulo Research Foundation (FAPESP), Brazil, Processes 2024/05051-7 and 2024/00923-6. The second and fourth author were partially supported by the Spanish I+D+i project PID2022-142159OB-I00 of the Ministerio de Ciencia e Innovación, I+D+i project CIAICO/2022/167 of the Generalitat Valenciana, and the I+D+i project VIGROB23-287 and UADIF23-132 of the University of Alicante.