Post · 3 min read· pp. 515–517

What Is a Hadamard Matrix?

A Hadamard matrix is an n×nn\times n matrix with elements ±1\pm 1 and mutually orthogonal columns. For example,

[11111−11−111−1−11−1−11]\left[\begin{array}{rrrr} 1 & 1 & 1 & 1\\ 1 & -1 & 1 & -1\\ 1 & 1 & -1 & -1\\ 1 & -1 & -1 & 1 \end{array}\right]

is a Hadamard matrix.

A necessary condition for an n×nn\times n Hadamard matrix to exist with n>2n > 2 is that nn is divisible by 44, but it is not known if a Hadamard matrix exists for every such nn.

A Hadamard matrix of order 428 was found for the first time in 2005. The smallest multiple of 44 for which a Hadamard matrix has not been found is 668.

A Hadamard matrix satisfies HTH=nIH^T H = nI, so H−1=n−1HTH^{-1} = n^{-1}H^T. It also follows that det⁡(H)=±nn/2\det(H) = \pm n^{n/2}. Hadamard’s inequality states that for an n×nn\times n real matrix AA, ∣det⁡(A)∣≤∏k=1n∥ak∥2|\det(A)| \le \prod_{k=1}^n \|a_k\|_2, where aka_k is the kkth column of AA. A Hadamard matrix achieves equality in this inequality (as does any matrix with orthogonal columns).

Hadamard matrices can be generated with a recursive (Kronecker product) construction: if HH is a Hadamard matrix then so is

[HHH−H].\left[\begin{array}{rr} H & H\\ H & -H \end{array}\right].

So starting with a Hadamard matrix of size mm, one can build up matrices of size 2km2^km for k=1,2,…k = 1,2,\dots. The MATLAB hadamard function uses this technique. It includes the following Hadamard matrix of order 12, for which we simply display the signs of the elements:

[+++++1+++++++−+−+++−−−+−+−−+−+++−−−+++−−+−+++−−−+−+−−+−+++−−+−−+−−+−+++−+−−−+−−+−+++++−−−+−−+−+++++−−−+−−+−+++++−−−+−−+−+−+++−−−+−−+++−+++−−−+−−].\left[\begin{array}{rrrrrrrrrrrr} {}+ & + & + & + & + & 1 & + & + & + & + & + & +\\ {}+ & - & + & - & + & + & + & - & - & - & + & -\\ {}+ & - & - & + & - & + & + & + & - & - & - & +\\ {}+ & + & - & - & + & - & + & + & + & - & - & -\\ {}+ & - & + & - & - & + & - & + & + & + & - & -\\ {}+ & - & - & + & - & - & + & - & + & + & + & -\\ {}+ & - & - & - & + & - & - & + & - & + & + & +\\ {}+ & + & - & - & - & + & - & - & + & - & + & +\\ {}+ & + & + & - & - & - & + & - & - & + & - & +\\ {}+ & + & + & + & - & - & - & + & - & - & + & -\\ {}+ & - & + & + & + & - & - & - & + & - & - & +\\ {}+ & + & - & + & + & + & - & - & - & + & - & - \end{array}\right].

Hadamard matrices have applications in optimal design theory, coding theory, and graph theory.

In numerical analysis, Hadamard matrices are of interest because when LU factorization is performed on them they produce a growth factor of at least nn, for any form of pivoting. Evidence suggests that the growth factor for complete pivoting is exactly nn, but this has not been proved. It has been proved that any n×nn\times n Hadamard matrix has growth factor nn for complete pivoting for n=12n = 12 and n=16n = 16.

An interesting property of Hadamard matrices is that the pp-norm (the matrix norm subordinate to the vector pp-norm) is known explicitly for all pp:

∥H∥p=max⁡(n1/p,n1−1/p),1≤p≤∞.\|H\|_p = \max\bigl( n^{1/p}, n^{1-1/p} \bigr), \quad 1\le p\le \infty.

References

This is a minimal set of references, which contain further useful references within.

This article is part of the “What Is” series, available from https://nhigham.com/category/what-is and in PDF form from the GitHub repository https://github.com/higham/what-is.