Hadamard Matrix

DOWNLOAD Mathematica Notebook HadamardMatrices

A Hadamard matrix is a type of square (-1,1)-matrix invented by Sylvester (1867) under the name of anallagmatic pavement, 26 years before Hadamard (1893) considered them. In a Hadamard matrix, placing any two columns or rows side by side gives half the adjacent cells the same sign and half the other sign. When viewed as pavements, cells with 1s are colored black and those with -1s are colored white. Therefore, the n×n Hadamard matrix H_n must have n(n-1)/2 white squares (-1s) and n(n+1)/2 black squares (1s).

A Hadamard matrix of order n is a solution to Hadamard's maximum determinant problem, i.e., has the maximum possible determinant (in absolute value) of any n×n complex matrix with elements |a_(ij)|<=1 (Brenner and Cummings 1972), namely n^(n/2). An equivalent definition of the Hadamard matrices is given by

 H_nH_n^(T)=nI_n,
(1)

where I_n is the n×n identity matrix.

A Hadamard matrix of order 4n+4 corresponds to a Hadamard design (4n+3, 2n+1, n), and a Hadamard matrix H_n gives a graph on 4n vertices known as a Hadamard graph

HadamardWalshArrays

A complete set of 2^n Walsh functions of order n gives a Hadamard matrix H_(2^n) (Thompson et al. 1986, p. 204; Wolfram 2002, p. 1073). Hadamard matrices can be used to make error-correcting codes, in particular, the Reed-Muller error-correcting code.

If H_n and H_m are known, then H_(nm) can be obtained by replacing all 1s in H_m by H_n and all -1s by -H_n. For n<=100, Hadamard matrices with n=12, 20, 28, 36, 44, 52, 60, 68, 76, 84, 92, and 100 cannot be built up from lower order Hadamard matrices.

H_2=[1 1; -1 1]
(2)
H_4=[H_2 H_2; -H_2 H_2]
(3)
=[[1 1; -1 1] [1 1; -1 1]; -[1 1; -1 1] [1 1; -1 1]]
(4)
=[1 1 1 1; -1 1 -1 1; -1 -1 1 1; 1 -1 -1 1].
(5)

H_8 can be similarly generated from H_4.

HadamardPaley

Hadamard (1893) remarked that a necessary condition for a Hadamard matrix to exist is that n=1, 2, or a positive multiple of 4 (Brenner and Cummings 1972). Paley's theorem guarantees that there always exists a Hadamard matrix H_n when n is divisible by 4 and of the form 2^e(p^m+1) for some positive integer m, nonnegative integer e, and p an odd prime. In such cases, the matrices can be constructed using a Paley construction, as illustrated above (Wolfram 2002, p. 1073). The number of Paley classes for n=4, 8, ... are 2, 3, 2, 3, 2, 3, 2, 4, 1, ... (OEIS A074070). The values of n for which there are no Paley classes (and hence cannot be constructed using a Paley construction) are 92, 116, 156, 172, 184, 188, 232, 236, 260, 268, ... (OEIS A046116).

Hadamard 428x428 matrix

It is conjectured that H_n exists for all n divisible by 4. Sawade (1985) constructed H_(268). As of 1993, Hadamard matrices were known for all n divisible by 4 up to n<428 (Brouwer et al. 1989, p. 20; van Lint and Wilson 1993). A H_(428) was subsequently constructed (Kharaghani and Tayfeh-Rezaie 2004), illustrated above, leaving the smallest unknown order as 668. However, the proof of the general conjecture remains an important problem in coding theory. The number of distinct Hadamard matrices of orders 4n for n=1, 2, ... are 1, 1, 1, 5, 3, 60, 487, ... (OEIS A007299; Wolfram 2002, p. 1073). Djoković (2009) corrected the list in Colbourn and Dinitz (2007) and found four previously unknown n<10^4 divisible by 4 for which it is possible to construct a Hadamard matrix: 764, 23068, 28324, 32996.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.