TC08 / 6. Hadamard 3.12.07 SX

Hadamard matrices. Paley’s construction of Hadamard matrices Hadamard codes. Decoding Hadamard codes

Hadamard matrices A of order is a matrix of type whose coefficients are1 or 1 and such that . Note that this relation is equivalent to say that the rows of have norm √ and that any two distinct rows are orthogonal. Since is invertible and , we see that 2 and hence is also a Hadamard matrix. Thus is a Hadamard matrix if and only if its columns have norm √ and any two distinct columns are orthogonal.

If is a Hadamard matrix of order , then det ⁄ . In particular we see that the Hadamard matrices satisfy the equality in Hadamard’s inequality:

/ |det| ∏∑ , which is valid for all real matrices of order . Remark. The expression / is the supremum of the value of det when runs over the real matrices such that 1. Moreover, the equality is reached if and only if is a Hadamard matrix. 3

If we change the signs of a row (column) of a Hadamard matrix, the result is clearly a Hadamard matrix. If we permute the rows (columns) of a Hadamard matrix, the result is another Hadamard matrix. Two Hadamard matrices are called equivalent (or isomorphic) if it is to go from one to the other by means of a sequence of such operations. Observe that by changing the sign of all the columns that begin with 1, and afterwards all the rows that begin with 1, we obtain an equivalent Hadamard matrix whose first row and first column only contain 1. Of such matrices we say that are normalized Hadamard matrices. 1 1 Example. is the unique normalized Hadamard matrix of 11 order 2. More generally, if we define , 2, recursively by the formula 4

, then is a normalized Hadamard matrix of order 2.

It is also easy to check that if and are Hadamard matrices of orders and , then the tensor product is a Hadamard matrix of order (the matrix , also called the Kronecker product of and , can be defined as the matrix obtained by substituting each component

of by the matrix ). For example, if is a Hadamard matrix of order , then is a Hadamard matrix of order 2. Notice also that . 5

Proposition. If is a Hadamard matrix of order 3, then is divisible by 4. Remark. Any two Hadamard matrices of order 4 are equivalent. . The same happens for order 8, but later on we will see that this is no longer the case for order 12.

The Paley construction of Hadamard matrices Suppose that the cardinal of , , is odd, so that with 2, prime. Let : 1 6 be the Legendre character of , namely 1 if is a square ⁄ 1 if not a square

(conventionally we define 0 0). Note that ∑ 0. If we enumerate the elements of (in some order),

0, ,…,, the Paley matrix of ,

, is defined by the formula

.

7

Proposition. if is the matrix with all its entries equal to

1, then has the following properties: 1)

2) 3) 4) 1/.

8

THeorem. iF 10 mod4,1 then the matrix

1 is a Hadamard matrix of order . It is called the Hadamard matrix of . In the case that 1 is not divisible by 4, it is possible to construct a Hadamard matrix of order 2 2, as we will see in the exercises. We are going to use the following concept: a matrix of order 1 is a conference matrix if its principal diagonal is zero, the other elements are 1 and 1. It is immediate to check that the order of a conference matrix is necessarily even.

1 The first ten that satisfy this condition are 7, 11, 19, 23, 27, 31, 37,43, 47, 59. 9

Remark. Let S be the Paley matrix of a , odd, and let 1 if is symmetric and 1 if is skew‐symmetric. Then

0 is a conference matrix of order 1 (it is called the conference matrix of ). This matrix is symmetric if 1 mod 4 and skew‐symmetric if 3 mod 4. Note that in the case 3 mod 4 the matrix is equivalent to the matrix of the previous theorem. Remark. a) If is an skew‐symmetric conference matrix of order ,

is a Hadamard matrix. b) If is a symmetric conference matrix of order , is a Hadamard matrix of order 2. 10 c) If is the conference matrix of a finite field , and 1 is divisible by 4, (b) yields a Hadamard matrix of order 2 2. This matrix will be called the Hadamard matrix de . Remark. The Hadamard matrices , , , have order 4, 8, 16, 32. For 7, 11, 19, 23, 27, 31, the theorem yields Hadamard matrices , , , , , . Part (c) of the preceding remark, applied to the fields , and , provides us with matrices , , . Thus we have Hadamard matrices of orders 4, 8, 12, 16, 20, 24, 28 and 32. Proceeding in similar ways, and with others that are beyond the scope of these notes, we can construct Hadamard matrices for many orders. The first ordre for which no Hadamard matrix is known is n=668 (the previous value was 428, but it was solved by Behruz Tayfeh‐Rezaie in 2004). 11

Is is conjectured that for any that is multiple of 4 there is a Hadamard matrix of order . This is usually called the Hadamard conjecture, but it is probably due to Raymond Paley (1993).

Remark. The matrices and are distinct, but they are equivalent (all the Hadamard matrices of order 8 are equivalent). It can also be seen that the matrices and are equivalent, even though it turns out that there are Hadamard matrices of order 12 that are not equivalent.

12

Code associated to a Hadamard matrix

We associate a of type , 2 to any Hadamard matrix of order as follows: , where () is the binary matrix obtained by the substitution 1 0 in (). Notice that the words in can also be obtain as the complements of the words in . Since two rows of differ in exactly /2 positions, the minimum distance of is /2. Hence is a code of type , 2, /2. In general this code is not linear (a necessary condition for linearity is that be a power of 2).

Note that is not equidistant, as it contains the words and .

13

Example. The code is equivalent to the parity completion of the 7,4,3. In particular, it is a . 1 1 1 1 1 1 1 1 1234 1 0 1 1 0 1 0 0 134 1 0 0 1 1 0 1 0 14 1 0 0 0 1 1 0 1 1 0 1 1 0 0 1 1 0 12 1 0 1 0 0 0 1 1 13 1 1 0 1 0 0 0 1 124 1 1 1 0 1 0 0 0 123 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 2 0 1 1 0 0 1 0 1 23 0 1 1 1 0 0 1 0 234 0 0 1 1 1 0 0 1 34 0 1 0 1 1 1 0 0 24 0 0 1 0 1 1 1 0 3 0 0 0 1 0 1 1 1 4 14

Example. The code 32,64,16 is the code used in the period 1969‐1972 by the Mariner spacecraft to transmit images of Mars (this code also turns out to be linear, and actually equivalent to lineal

5).

Decoding Hadamard codes

Let be the Hadamard code associated to the Hadamard matrix . Let be the order of and /2 1/2 2/4 4/4 its error‐correcting capacity . Given a vector of length , let 1, 1 be the result of performing the substitution 01 in . For example, from the definition of it turns out that if (or ), then (or –) is a row of . 15

Lemma. Let be a binary vector of length , the result of negating an entry of , and any row of . Then ̂| | 2.

Proposition. Let , where is a Hadamard matrix of order . Suppose that is the sent vector, that is the error vector and that is the received vector. Let || and suppose that .

Then there is a unique row of such that ||| /2 and ||| /2 for all other rows of . Moreover, or according to whether | 0 or | 0.

16

Decoding algorithm Input: (the received vector). 1) Calculate . 2) Calculate | for the successive rows of , and stop as soon as || /2 or if there are no more rows. In this second case return Error. 3) Return the result of performing the substitution 1 0 in the vector () if 0 (0).

Exercise. The code is equivalent to the Hadamard code . Hint: If is a control matrix of Ham, then the matrix

1 is a generating matrix of .