HadamardMatrix

HadamardMatrix[n]

returns an n×n Hadamard matrix.

Details and Options

  • Each entry Hrs of the Hadamard matrix is by default defined as , where , is the ^(th) bit in the binary representation of the integer , and .
  • Rows or columns of the HadamardMatrix are basis sequences of the DiscreteHadamardTransform.
  • A Hadamard matrix is its own inverse. »
  • The following options are supported:
  • MethodAutomaticspecifies the sequency ordering method
    WorkingPrecisionthe precision with which to compute matrix elements
  • Possible method settings are: "BitComplement", "Sequency".

Examples

open allclose all

Basic Examples  (1)

A Hadamard matrix:

The Hadamard's basis sequences of length 128:

Options  (2)

Method  (1)

Detect sequency values of rows of a Hadamard matrix:

WorkingPrecision  (1)

By default, an exact matrix is computed:

Use machine precision:

Use arbitrary precision:

Properties & Relations  (3)

The Hadamard transform of a vector is equivalent to the vector multiplied by the Hadamard matrix:

Sylvester's construction of a non-sequency-ordered Hadamard matrix of order 4:

Hadamard matrix is its own inverse:

Introduced in 2012
 (9.0)
 |
Updated in 2014
 (10.0)